function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EBenderEBender 

INVALID_SESSION_ID, through Servicemix

Greetings, I am having a bit of an issue getting a custom Apex class to properly work as a webservice.  I have setup the class, generated the WSDL, loaded it in SOAP UI, and through the enterprise wsdl's login operation gotten a valid session ID.  When using that session ID to call the custom class's exposed web service, it works properly and gives a valid response.  However, when I send the request through Servicemix (an ESB) that is simply reflecting the custom class endpoint, I am getting the INVALID_SESSION_ID fault code response from salesforce.  I have checked IP restrictions and such in the security controls and it is set to not restrict by IP.

 

Here is the example SOAP request to the custom class:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/

     xmlns:hot="http://soap.sforce.com/schemas/class/HotelWebService">   

<soapenv:Header>     

<hot:AllowFieldTruncationHeader>         

<hot:allowFieldTruncation>false</hot:allowFieldTruncation>     

</hot:AllowFieldTruncationHeader>

      <hot:SessionHeader>         <hot:sessionId>00DM00000009KUZ!AR4AQNkbfRtxDovp1wjcbunvZZVCmE.BdqCRbKNQ9.S2Oy8_k3w2GjpNCW410MPq8hfy_DE3V53eaBUG9R_rUhm_.hTxPaGK</hot:sessionId>      </hot:SessionHeader>

   </soapenv:Header>

   <soapenv:Body> 

    <hot:addHotel>

         <hot:hotelCode>ABCDE</hot:hotelCode>

         <hot:hotelName>Test</hot:hotelName>

         <hot:hotelCurrency>USD</hot:hotelCurrency>

      </hot:addHotel>

   </soapenv:Body>

</soapenv:Envelope>

 

Does anyone know why the exact same SOAP request would be considered an invalid session ID when it is passed straight through an ESB?  Is there a way to monitor incoming SOAP messages from within the salesforce UI so I can check the headers and such?  It could possibly be a namespace issue, but as far as I can tell everything is setup consistently.  I know the service being exposed on Servicemix works because I have done it for the enterprise WSDL without issue and gotten valid responses and interactions through that just fine.