Comments (3)
Never mind got a link from the old google code repo. Could someone put up a similar link in github?
from wsc.
from wsc.
It should be noted that if you try to create a new EnterpriseConnection instance from the passed in ConnectorConfig of the renewSession(..) method that you MUST set the config's sessionId property back to null prior passing it into the EnterpriseConnection constructor in order to trip the internal logic of the EnterpriseConnection's constructor to re-login. Lots of debugging and reading the source code to realize that was preventing my renew to work correctly.
The example that @anand13s linked to above works because they ignore the passed in config object and always create a new config instance (the sessionId property defaults to null in that case).
Here's what my snippet ended up being because I wanted to preserve ALL other settings on the original config object, though I'm not sure if that's recommended or not:
public SessionRenewalHeader renewSession( ConnectorConfig config ) throws ConnectionException {
config.setSessionId( null );
EnterpriseConnection connection = Connector.newConnection( config );
SessionRenewalHeader header = new SessionRenewalHeader();
header.name = new QName( "urn:enterprise.soap.sforce.com", "SessionHeader" );
header.headerElement = connection.getSessionHeader();
return header;
}
from wsc.
Related Issues (20)
- forcedotcom/wsc is this FIPS compliance.
- CANNOT_EXECUTE_FLOW_TRIGGER non handled
- Can help me! Code generation failed HOT 1
- com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:currencySymbol' but found 'urn:partner.soap.sforce.com:chatterExternal' HOT 3
- Problem with apache-maven-3.8.1 HOT 1
- Support OAUTH 2.0 JWT Bearer auth flow for server to server integrations
- Provide a way to get original(raw) response for non-SOAP/HTML content in response HOT 2
- Getting error "Encountered HTML Content when looking for http://schemas.xmlsoap.org/soap/envelope/:Envelope"
- ConnectionException does not show exception message when calling getMessage() HOT 1
- Can't build jar API 54 HOT 1
- commons-logging:1.2 log4j 1.2.17 vulnerability
- Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Fault' but found 'urn:partner.soap.sforce.com:describeSObjectResponse' HOT 2
- Upgrade from older versions (v37)
- Unable to initialize main class HOT 1
- Help with import after building the .jar HOT 1
- Add field enum to aid in querying
- Getting NoSuchMethodError on new EnterpriseConnection HOT 1
- Why is the Force Tooling API not maintained in MvnRepository? HOT 1
- Unable to complete the pull-request CLA signing process HOT 1
- Update WSDLC Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsc.