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

SOAP::Lite server on Linux not returning correct datatype??

Expand Messages
  • aroth816
    I ran a SOAP::Lite server using Apache on Windows and wrote the client in C#. This worked correctly. When I moved the exactly same SOAP server code over to
    Message 1 of 1 , Jun 27, 2002
    View Source
    • 0 Attachment
      I ran a SOAP::Lite server using Apache on Windows and wrote the
      client in C#. This worked correctly.

      When I moved the exactly same SOAP server code over to linux, and
      used a windows C# client, the correct datatypes were not being sent
      (or so it seems.) Here is the exception:

      System.InvalidOperationException: There is an error in XML document
      (1, 527). ---> System.InvalidCastException: Cannot assign object of
      type System.Object[] to an object of type
      WindowsApplication4.service.ResultSearch[].


      The WSDL file (and the method itself) say that method simpleSearch()
      is to return a ResultArray[] object (And this has worked for me
      before). So then why is C# thinking that it is receiving an Object
      [] ?

      <SNIP>


      <s:complexType name="ResultSearchArray">
      <s:complexContent mixed="false">
      <s:restriction base="soapenc:Array">
      <s:attribute d7p1:arrayType="s0:ResultSearch[]"
      ref="soapenc:arrayType"
      xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/" />
      </s:restriction>
      </s:complexContent>
      </s:complexType>


      <s:complexType name="ResultSearch">
      <s:all>
      <s:element name="itemNumber" type="s:int" />
      <s:element name="itemTitle" type="s:string" />
      </s:all>
      </s:complexType>


      </s:schema>
      </types>


      <message name="simpleSearchRequest">
      <part name="query" type="s:string" />
      </message>
      <message name="simpleSearchResponse">
      <part name="return" type="s0:ResultSearchArray" />
      </message>
      </SNIP>

      Please help.
      Thanks,
      Adam
    Your message has been successfully submitted and would be delivered to recipients shortly.