Skip to Content
0
Former Member
Mar 17, 2008 at 12:28 PM

Consuming Salesforce.com webservice from ABAP

452 Views

Hi Experts,

I am trying to call Salesforcce.com web service from SAP using ABAP proxy. I have generated ABAP proxy using Salesforce WSDL. I managed to call salesforce webservice (via HTTPS) login method successfully and got the response (SOAP message with new url and session ID) from Salesforce. After succesfull authentication, I am trying to place a query on Saflesforce system and the response is "URL is not reset, set the url returned from salesforce".

I have to set the new url (i got from login response)in the SOAP header for the subsequent calls to salesforce. How can I get access to SOAP headers in ABAP?

Response payload from SF is as follows:

<?xml version="1.0" encoding="utf-8"?>

http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn: partner.soap.sforce.com" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">

<loginResponse>

<result>

https://tapp0-api.salesforce.com/services/Soap/m/xxxxx...>

<passwordExpired>false</passwordExpired>

https://tapp0-api.salesforce.com/services/Soap/c/xxxxxx....>

<sessionId>xxxxx.....</sessionId>

<userId>xyz....</userId>

<userInfo>

<accessibilityMode>false</accessibilityMode>

<currencySymbol xsi:nil="true"/>

<organizationId>testXXXXX</organizationId>

<organizationMultiCurrency>true</organizationMultiCurrency>

<organizationName>TESTXXX</organizationName>

<profileId>XYZ</profileId>

<roleId>00E20000000umf</roleId>

<userDefaultCurrencyIsoCode>GBP</userDefaultCurrencyIsoCode>

XYZ@xyz.com

<userFullName>Integration User</userFullName>

<userId>XXX......</userId>

<userLanguage>en_US</userLanguage>

<userLocale>en_GB</userLocale>

XYZ@xyz.com

<userTimeZone>Europe/London</userTimeZone>

<userType>Standard</userType>

<userUiSkin>Theme2</userUiSkin>

</userInfo>

</result>

</loginResponse>

</root>

I tried to set the response payload to request payload in my webservice call and it didn't work.. I assumed that url,sessionid and user info defined in request payload are used in webservice call.

How can I set the url and session id returned from salesforce for the subsequent calls?

Has anybody have experience changing the SOAP headers from ABAP.

Thanks,

Anil