• EBender
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Greetings all,

 

I was ondering if something has changed in the way logouts are handled via the entrprise API?  A month or so ago things were working for me when I made calls to the serverURL with the sessionID via a SOAP text message over http, now for some reason I am getting internal server 500 error when I do it instead of the soap response.  Nothing has changed on my end.  I had not been using a client to do the logout, just strict soap text over http.  I do the same thing for logins and custom apex web service calls and everything works fine.

 

WHen I send the logout message through SOAP UI everything works normally, so I am not sure where the issue lays or if it is possible to see a log somewhere on a 500 server error.

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.

I am using Sites to create a custom VF portal login page.  The custom VF portal login page works except when an invalid username and/or password is submitted.  When an invalid username and/or password is submitted, the default SF portal login page is displayed and not the current custom VF portal login page.  Is there a parameter that can be passed to the login_portal.jsp to redirect to the current custom VF portal login page.   Here is the current code:

 

 

Global pageReference login()
  {
    String startURL = 'https://naX.salesforce.com/secur/login_portal.jsp';
    startURL += '?orgId=00Dxxxxxxxxxxx&portalId=060xxxxxxxxxx&loginType=3';
    startURL += '&startURL='; 
    startURL += '&loginURL=';
    startURL += '&useSecure=true';
    startURL += '&un=' + username;
    startURL += '&pw='+ password;
    startURL += '&retURL=http://npifinancial.force.com/SmartSpend';
    
     pageReference p = new PageReference(startURL);
     p.setredirect(true);
     return p;
    
  }

 

 

  • September 22, 2010
  • Like
  • 0