Loading ...
Sorry, an error occurred while loading the content.
 

Use of HREFs: Array Encoding Question

Expand Messages
  • njudah
    Hi: I m trying to work with a poorly behaved SOAP service that I believe will only accept arrays that use HREF encoding. Specifically, this is SOAP request is
    Message 1 of 1 , May 24, 2003
      Hi:

      I'm trying to work with a poorly behaved SOAP service that I believe
      will only accept arrays that use HREF encoding. Specifically, this
      is SOAP request is valid: (its from the doc, and I tested it raw
      succesfully.)

      <q1:query xmlns:q1="connector">
      <type xsi:type="xsd:string">account</type>
      <maxRows xsi:type="xsd:int">50</maxRows>
      <queryLobs xsi:type="xsd:boolean">false</queryLobs>
      <select href="#id1" />
      <idList href="#id2" />
      </q1:query>
      <soapenc:Array id="id1" soapenc:arrayType="xsd:string[9]">
      <Item>ownerID</Item>
      <Item>name</Item>
      </soapenc:Array>
      <soapenc:Array id="id2" soapenc:arrayType="xsd:string[1]">
      <Item>0010000000072By</Item>
      <Item>001z00000008OVk</Item>
      </soapenc:Array>

      But this is not:

      <ns2:query
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns2="connector">
      <type xsi:type="xsd:string">account</type>
      <maxRows xsi:type="xsd:int">50</maxRows>
      <queryLobs xsi:type="xsd:boolean">false</queryLobs>
      <select xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[2]"
      xmlns:ns3="salesforce"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <item>ownerID</item>
      <item>name</item>
      </select>
      <idList xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[2]"
      xmlns:ns4="salesforce"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <item>0010000000072By</item>
      <item>001z00000008OVk</item>
      </idList>
      </ns2:query>

      Apparently folks who have tried can get this to work with .NET, I'm
      using AXIS (which generated the bottom message), and cannot.

      Questions:
      - Is there "right" way to encode arrays? Is using HREFs (or not
      using them) consider poor form?
      - Does .NET use HREFs by default?
      - Is there any way to force AXIS to use HREF encoding?

      I'm in a pinch here so any help is much appricated?

      TIA.
    Your message has been successfully submitted and would be delivered to recipients shortly.