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
Michael Lambert 9Michael Lambert 9 

Data integration

Hi Guys,

We would like to do automated data integration with SF. I'm using a platform that has SOAP capabilities.
We are trying to login using this URL: http://login.salesforce.com/services/Soap/c/38.0

then posting the following:
  <?xml version="1.0" encoding="UTF-8" ?> 
- <tns:login xmlns:tns="urn:enterprise.soap.sforce.com">
  <tns:username>myName@Company123.com</tns:username> 
  <tns:password>passwordToken</tns:password> 
  </tns:login>

But I get the below error:
   <sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode>
                    <sf:exceptionMessage>The processing instruction target matching &quot;[xX][mM][lL]&quot; is not allowed.</sf:exceptionMessage>

any suggestions?

Thanks.

 
Best Answer chosen by Michael Lambert 9
Michael Lambert 9Michael Lambert 9
Hi Tejas,

Thanks, found that a couple hours ago, but you are right and just missing the header info.
That what really threw me off.

So the call would look like this:
http://login.salesforce.com/services/Soap/c/38.0

Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Body>
      <urn:login>
         <urn:username>username@company.com</urn:username>
         <urn:password>passwordToken</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

but thanks a mill for the help...!!!!!

All Answers

Tejas KardileTejas Kardile
Hi,

I think you need to remove <?xml version="1.0" encoding="UTF-8" ?>  and then try.

Thanks

 
Michael Lambert 9Michael Lambert 9
Hi Tejas,

That worked, but now I get this.
<faultcode>soapenv:VersionMismatch</faultcode>
<faultstring>The SOAP request must use SOAP 1.1, did not recieve a SOAP 1.1 Envelope as the document root</faultstring>
I've Googled and searched, but there is no clear sample of the SOAP 1.1
Do you know where I can find some good trouble shooting tips or sample code ?

Thanks.

 
Tejas KardileTejas Kardile
Please see below URL which provide sample code for SOAP 1.1 request and response:
https://www.w3.org/TR/2000/NOTE-SOAP-20000508/

Also please see below sample code which i have extacted from SOAPUI for login method from enterprise wsdl:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Body>
      <urn:login>
         <urn:username></urn:username>
         <urn:password></urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

Let me know if this help you in trouble shooting.

Thanks
Michael Lambert 9Michael Lambert 9
Hi Tejas,

Thanks, found that a couple hours ago, but you are right and just missing the header info.
That what really threw me off.

So the call would look like this:
http://login.salesforce.com/services/Soap/c/38.0

Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Body>
      <urn:login>
         <urn:username>username@company.com</urn:username>
         <urn:password>passwordToken</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

but thanks a mill for the help...!!!!!
This was selected as the best answer
Tejas KardileTejas Kardile
If your issue got resolved then please close this tread and mark the solution as best solution so that other can get help from this.