• Juice
  • NEWBIE
  • 0 Points
  • Member since 2003

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 6
    Replies

I'm trying to update multiple fields for a given entity.  Here's a sample XML SOAP request that results in an "bad field names on insert/update call" for the column expectedAmount:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
    xmlns:tns="salesforce" 
    xmlns:types="salesforce/encodedTypes" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
  <tns:headerStruct id="id1">
    <session_id
xsi:type="xsd:string">{SessionID}</session_id>
    <version xsi:type="xsd:string">2.0</version>
  </tns:headerStruct>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <q1:update xmlns:q1="sfconnector:SalesforceConnector">
    <type xsi:type="xsd:string">opportunity</type>
    <record href="#id1" />
  </q1:update>
  <soapenc:Array id="id1" soapenc:arrayType="tns:mapEntry[3]">
    <Item href="#id2" />
    <Item href="#id3" />
    <Item href="#id4" />
  </soapenc:Array>
  <tns:mapEntry id="id2" xsi:type="tns:mapEntry">
    <key xsi:type="xsd:string">id</key>
    <value xsi:type="xsd:string">{OpportunityID}</value>
  </tns:mapEntry>
  <tns:mapEntry id="id3" xsi:type="tns:mapEntry">
    <key xsi:type="xsd:string">amount</key>
    <value xsi:type="xsd:double">1.0</value>
  </tns:mapEntry>
  <tns:mapEntry id="id4" xsi:type="tns:mapEntry">
    <key xsi:type="xsd:string">expectedAmount</key>
    <value xsi:type="xsd:double">2.0</value>
  </tns:mapEntry>
</soap:Body>
</soap:Envelope>

Can someone provide an XML SOAP sample of a correct call?

Thanks

  • August 11, 2003
  • Like
  • 0

I'm trying to retrieve an opportunity using a modified version of the sample from the API document.  This used to work for me, but it stopped working for me this evening.  I receive an error saying that the select list is not specified.

The SOAP request is as follows:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="salesforce" xmlns:types="salesforce/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<tns:headerStruct id="id1">

<session_id xsi:type="xsd:string">{SessionID}</session_id>

<version xsi:type="xsd:string">2.0</version>

</tns:headerStruct>

</soap:Header>

<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<q1:query xmlns:q1="sfconnector:SalesforceConnector">

<type xsi:type="xsd:string">opportunity</type>

<maxRows xsi:type="xsd:int">200</maxRows>

<scope xsi:type="xsd:string">filter</scope>

<select href="#id1"/>

<filter href="#id2"/>

</q1:query>

<soapenc:Array id="id1" soapenc:arrayType="xsd:string[4]">

<Item>id</Item>

<Item>ownerID</Item>

<Item>name</Item>

<Item>accountID</Item>

<Item>type</Item>

<Item>leadSource</Item>

<Item>amount</Item>

<Item>expectedAmount</Item>

<Item>closeDate</Item>

<Item>nextStep</Item>

<Item>stage</Item>

<Item>probability</Item>

<Item>campaignID</Item>

<Item>description</Item>

<Item>closed</Item>

<Item>won</Item>

<Item>forecastCategory</Item>

<Item>createdDate</Item>

<Item>lastModifiedDate</Item>

</soapenc:Array>

<soapenc:Array id="id2" soapenc:arrayType="xsd:anyType[1]">

<Item href="#id3"/>

</soapenc:Array>

<soapenc:Array id="id3" soapenc:arrayType="tns:mapEntry[3]">

<Item href="#id4"/>

<Item href="#id5"/>

<Item href="#id6"/>

</soapenc:Array>

<tns:mapEntry id="id4" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">field</key>

<value xsi:type="xsd:string">{Field}</value>

</tns:mapEntry>

<tns:mapEntry id="id5" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">value</key>

<value xsi:type="xsd:{ValueType}">{Value}</value>

</tns:mapEntry>

<tns:mapEntry id="id6" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">operator</key>

<value xsi:type="xsd:string">{Operator}</value>

</tns:mapEntry>

</soap:Body>

</soap:Envelope>

  • August 06, 2003
  • Like
  • 0

Does anyone have a sample of a XML SOAP query request that has two or more filter criteria?  For example, retrieve all the opportunities where

stage = "Closed Won" and

CloseDate is greater than "2002-06-01" and

CloseDate is less than "2003-06-01"

 

  • August 05, 2003
  • Like
  • 0

It looks like there have been some changes to sforce since Friday because my query calls are now working.  However, I still can't get the describe and server timestamp calls working.  I get an error about a missing version number, even though it is included in the SOAP request.  These calls were working last week, before the sforce site was updated on Thursday.  Are there plans to update sforce again to address these issues?

As a workaround, it would be great if someone could publish an accurate list of the column names in the various entities.  The 2.0 API documentation seems to be out of sync with the actual SOAP calls when it comes to column names for entities such as account, contact, opportunity, etc.

Thanks.

  • August 04, 2003
  • Like
  • 0
What does the remoteApplication tag do in the login call?  It's in the WSDL but it doesn't seem to be mentioned in the documentation.
  • August 01, 2003
  • Like
  • 0

The documentation mentions that you need to have a user-agent HTTP header for Partner solutions and also a "client name" argument for each call to salesforce.com.  How do I get one and also are there any samples of valid SOAP requests that incorporate these values?

Are these values necessary for just basic testing?

  • August 01, 2003
  • Like
  • 0

I can login and get a valid session id but my other requests stopped working today after 5pm.  I get a SOAP error saying that an invalid XML character (UnicodeL 0x0) was found in the document.

Was there a change to the web services APIs or was the system down?

Message Edited by Juice on 07-31-2003 07:25 PM

  • August 01, 2003
  • Like
  • 0

It seems that there are some discrepancies between the v2.0 API guide and the wsdl found on http://www.sforce.com/us/docs/sforce.wsdl.  Is there an updated WSDL file?

I'm trying to make a search call and the WSDL description is very different from the examples included in the reference guide.  For example, the WSDL requires a "type" field but I cannot find the description of this field in the reference guide.

Are there any other complete examples of a valid SOAP request?

  • July 31, 2003
  • Like
  • 0

I'm trying to retrieve an opportunity using a modified version of the sample from the API document.  This used to work for me, but it stopped working for me this evening.  I receive an error saying that the select list is not specified.

The SOAP request is as follows:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="salesforce" xmlns:types="salesforce/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<tns:headerStruct id="id1">

<session_id xsi:type="xsd:string">{SessionID}</session_id>

<version xsi:type="xsd:string">2.0</version>

</tns:headerStruct>

</soap:Header>

<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<q1:query xmlns:q1="sfconnector:SalesforceConnector">

<type xsi:type="xsd:string">opportunity</type>

<maxRows xsi:type="xsd:int">200</maxRows>

<scope xsi:type="xsd:string">filter</scope>

<select href="#id1"/>

<filter href="#id2"/>

</q1:query>

<soapenc:Array id="id1" soapenc:arrayType="xsd:string[4]">

<Item>id</Item>

<Item>ownerID</Item>

<Item>name</Item>

<Item>accountID</Item>

<Item>type</Item>

<Item>leadSource</Item>

<Item>amount</Item>

<Item>expectedAmount</Item>

<Item>closeDate</Item>

<Item>nextStep</Item>

<Item>stage</Item>

<Item>probability</Item>

<Item>campaignID</Item>

<Item>description</Item>

<Item>closed</Item>

<Item>won</Item>

<Item>forecastCategory</Item>

<Item>createdDate</Item>

<Item>lastModifiedDate</Item>

</soapenc:Array>

<soapenc:Array id="id2" soapenc:arrayType="xsd:anyType[1]">

<Item href="#id3"/>

</soapenc:Array>

<soapenc:Array id="id3" soapenc:arrayType="tns:mapEntry[3]">

<Item href="#id4"/>

<Item href="#id5"/>

<Item href="#id6"/>

</soapenc:Array>

<tns:mapEntry id="id4" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">field</key>

<value xsi:type="xsd:string">{Field}</value>

</tns:mapEntry>

<tns:mapEntry id="id5" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">value</key>

<value xsi:type="xsd:{ValueType}">{Value}</value>

</tns:mapEntry>

<tns:mapEntry id="id6" xsi:type="tns:mapEntry">

<key xsi:type="xsd:string">operator</key>

<value xsi:type="xsd:string">{Operator}</value>

</tns:mapEntry>

</soap:Body>

</soap:Envelope>

  • August 06, 2003
  • Like
  • 0

Does anyone have a sample of a XML SOAP query request that has two or more filter criteria?  For example, retrieve all the opportunities where

stage = "Closed Won" and

CloseDate is greater than "2002-06-01" and

CloseDate is less than "2003-06-01"

 

  • August 05, 2003
  • Like
  • 0

I can login and get a valid session id but my other requests stopped working today after 5pm.  I get a SOAP error saying that an invalid XML character (UnicodeL 0x0) was found in the document.

Was there a change to the web services APIs or was the system down?

Message Edited by Juice on 07-31-2003 07:25 PM

  • August 01, 2003
  • Like
  • 0