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

Array encodings: soapenc:arrayType vs a simpler format?

Expand Messages
  • jcroall
    Hello, I m new to SOAP and am confused about array encodings. The Java-based service that I am trying to interact with expects the following format:
    Message 1 of 2 , Sep 6, 2009
    • 0 Attachment
      Hello,

      I'm new to SOAP and am confused about array encodings. The Java-based service that I am trying to interact with expects the following format:

      <n1:methodA>
      <arg0>
      <streams>
      <language>CXX</language>
      <name>IProject1</name>
      </streams>
      <streams>
      <language>CXX</language>
      <name>IProject1</name>
      </streams>
      <description>My Description</description>
      <name>IProject1</name>
      </arg0>
      </n1:methodA>

      But my SOAP::Lite client is generating the following:

      <ws:methodA>
      <arg0>
      <name xsi:type="xsd:string">IProject1</name>
      <streams soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array">
      <item>
      <language xsi:type="xsd:string">CXX</language>
      <name xsi:type="xsd:string">IProject1</name>
      <description xsi:type="xsd:string">IProject1</description>
      </item>
      <item>
      <language xsi:type="xsd:string">CXX</language>
      <name xsi:type="xsd:string">IProject1</name>
      <description xsi:type="xsd:string">IProject1</description>
      </item>
      </streams>
      <description xsi:type="xsd:string">My Description</description>
      </arg0>
      </ws:methodA>

      What is the difference between the two? Is there a way to force SOAP::Lite to use the simpler (multi-referenced?) encoding?

      Thanks for your help,

      - James
    • jcroall
      Hello, I m new to SOAP and am confused about array encodings. The Java-based service that I am trying to interact with expects the following format:
      Message 2 of 2 , Sep 6, 2009
      • 0 Attachment
        Hello,

        I'm new to SOAP and am confused about array encodings. The Java-based service that I am trying to interact with expects the following format:

        <n1:methodA>
        <arg0>
        <streams>
        <language>CXX</language>
        <name>IProject1</name>
        </streams>
        <streams>
        <language>CXX</language>
        <name>IProject1</name>
        </streams>
        <description>My Description</description>
        <name>IProject1</name>
        </arg0>
        </n1:methodA>

        But my SOAP::Lite client is generating the following:

        <ws:methodA>
        <arg0>
        <name xsi:type="xsd:string">IProject1</name>
        <streams soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array">
        <item>
        <language xsi:type="xsd:string">CXX</language>
        <name xsi:type="xsd:string">IProject1</name>
        <description xsi:type="xsd:string">IProject1</description>
        </item>
        <item>
        <language xsi:type="xsd:string">CXX</language>
        <name xsi:type="xsd:string">IProject1</name>
        <description xsi:type="xsd:string">IProject1</description>
        </item>
        </streams>
        <description xsi:type="xsd:string">My Description</description>
        </arg0>
        </ws:methodA>

        What is the difference between the two? Is there a way to force SOAP::Lite to use the simpler (multi-referenced?) encoding?

        Thanks for your help,

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