You need to sign in to do that
Don't have an account?
jingzhi
INVALID_SESSION_ID exception, using enterprise.wsdl, because of the soap service endpoint changed?
I used enterprise.wsdl (13.0) to generate the Web service stub, then
call the Salesforce Web service in java using loginBySessionId(String sid, String sURL),
while both the sessionId and serviceUrl is sent by virtual force page.
It works fine before the soap service endpoint has changed to 14.0:
https://www.salesforce.com/services/Soap/c/14.0
But it doesn't work now.
I didn't change my java code and page code.
I thought it should work well using the old version soap service, but things not.
Because of the exception, I also tried to update the wsdl file to 14.0, and rebuild my application.
But it doesn't work too.
NOW, my application cannot be used because of this exception.
Do there any one faced the same headache problem?
The following is the exceptions:
AxisFault
faultCode: {urn:fault.enterprise.soap.sforce.com}INVALID_SESSION_ID
faultSubcode:
faultString: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>INVALID_SESSION_ID</ns1:exceptionCode><ns1:exceptionMessage>Invalid Session ID found in SessionHeader: Illegal Session</ns1:exceptionMessage>
call the Salesforce Web service in java using loginBySessionId(String sid, String sURL),
while both the sessionId and serviceUrl is sent by virtual force page.
It works fine before the soap service endpoint has changed to 14.0:
https://www.salesforce.com/services/Soap/c/14.0
But it doesn't work now.
I didn't change my java code and page code.
I thought it should work well using the old version soap service, but things not.
Because of the exception, I also tried to update the wsdl file to 14.0, and rebuild my application.
But it doesn't work too.
NOW, my application cannot be used because of this exception.
Do there any one faced the same headache problem?
The following is the exceptions:
AxisFault
faultCode: {urn:fault.enterprise.soap.sforce.com}INVALID_SESSION_ID
faultSubcode:
faultString: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>INVALID_SESSION_ID</ns1:exceptionCode><ns1:exceptionMessage>Invalid Session ID found in SessionHeader: Illegal Session</ns1:exceptionMessage>
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
....
[ Show » ]
Kunpeng Yang - 13/Oct/08 07:45 PM
AxisFault faultCode:
{urn:fault.enterprise.soap.sforce.com}INVALID_SESSION_ID faultSubcode:
faultString: INVALID_SESSION_ID: Invalid Session ID found in
SessionHeader: Illegal Session faultActor: faultNode: faultDetail:
{urn:fault.enterprise.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>INVALID_SESSION_ID</ns1:exceptionCode><ns1:exceptionMessage>Invalid
Session ID found in SessionHeader: Illegal
Session</ns1:exceptionMessage>
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal
Session
Through my test, the soap service endpoint 13.0 still works well,
but why the sessionId invalid?
faultCode: {urn:fault.enterprise.soap.sforce.com}INVALID_SESSION_ID
faultSubcode:
faultString: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>INVALID_SESSION_ID</ns1:exceptionCode><ns1:exceptionMessage>Invalid Session ID fo
und in SessionHeader: Illegal Session</ns1:exceptionMessage>
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
at com.sforce.soap.enterprise.fault.UnexpectedErrorFault.getDeserializer(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sforce.soap.enterprise.SoapBindingStub.getUserInfo(Unknown Source)
at TestSfdcWSClient.loginBySessionId(TestSfdcWSClient.java:144)
at TestSfdcWSClient.main(TestSfdcWSClient.java:50)
Thanks for your reply.
My visualForce page looks like
<form name="myForm" method="post" >
<input type="hidden" name="sId" value="{!$Api.Session_ID}" />
<input type="hidden" name="sUrl" value="{!$Api.Enterprise_Server_URL_130}" />
....
</form>
Then, I call the Web service in java using loginBySessionId
However, the login(String userName, String password) method still works well,
and the loginBySessionId() method also works well if you call it using the loginResult,
https://www.salesforce.com/services/Soap/c/7.0
the new wsdl has
https://www.salesforce.com/services/Soap/c/14.0
and it no longer works.
Any more ideas on this?
Thanks
Pete