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
ritijoshiritijoshi 

Not able to hit the salesforce.com URL with help of cURL

Hi,

 

I  walnt to upload large data with help of bulk api, i am using curl for it. Initially i was getting SSL security error so i used -K , now that issue is resolvedBut now i am getting this error

 

'D:\curl-7.21.3-ssl-sspi-zlib-static-bin-w32><tr><td>You have attempted to reach
a URL that no longer exists on salesforce.com
< was unexpected at this time.'

 

Commant i am giving in command prompt is  ' curl -k https://login.salesforce.com/services/soap/u/20.0 -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: login" -d @login.txt'

 

Please help me on same

 

Thanks

Riti

*werewolf**werewolf*
Should be www.salesforce.com, not login.
Mark SFMark SF

login.salesforce.com is preferred to www.salesforce.com

 

The URL is case sensitive. Use "Soap" instead of "soap"

 

curl -k https://login.salesforce.com/services/Soap/u/20.0 -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: login" -d @login.txt

bbuehnebbuehne

 

I have been having what might be a similar problem.  

 

I’ve read up on the bulk api and have been trying to implement a test of it, but have been running into a/some problems.  I’ve been using the example code in the bulk api documentation and getting an error returned.  Any chance you or someone on your team can tell me where I am going wrong?

 

First I created the following xml document as directed in the documentation:

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

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns:xsi="http://www.we.org/2001/XMLSchema-instance"

    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

  <env:Body>

    <n1:login xmlns:nl="urn:partner.soap.sforce.com">

      <nl:username>user@somplace.com</n1:username>

      <n1:password>password</n1:password>

    </nl:login>

  </env:Body>

</env:Envelope>

 

Then from cURL I enter the following command

curl -k https://www.salesforce.com/services/Soap/u/20.0 -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: login" -d @login.txt

 

and I receive the following response:

C:\accxdev>curl https://login.salesforce.com/services/Soap/u/20.0 -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: login" -k -d @login.txt<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: The prefix &quot;n1&quot; for element &quot;n1:login&quot; is not bound.</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode><sf:exceptionMessage>The prefix &quot;n1&quot; for element &quot;n1:login&quot; is not bound.</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

I have tried substituting the c for the u at /Soap/u/.  I’ve added –k.

 

Any ideas on what I should do?

 

Thanks,

Barry

SuperfellSuperfell

you have a mix of n1 and nl as the namespace prefixes, pick one and use it consistently.

*werewolf**werewolf*

Well, just eyeballing that, you seem to be mixing up the namespaces "n1" and "nl".  Seems like you'd want "nl" given that that's the namespace you're defining.

 

That aside:

 

Why are you all using cURL for this stuff anyway?  Why not use something that abstracts this stuff for you?  There are toolkits available for almost every language under the sun.