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

array deserialization issue between .net wsdl 1.0.3705.0 and wsad

Expand Messages
  • Ozgur Kurt
    hi all, i m trying to wrap a session bean with a webservice in wsad 5.0.1. btw, wsad uses apache soap underneath. web service will be called by a .net client.
    Message 1 of 1 , Jun 10, 2003
    • 0 Attachment
      hi all,

      i'm trying to wrap a session bean with a webservice in wsad 5.0.1.
      btw, wsad uses apache soap underneath. web service will be called by
      a .net client. first problem i had was: .net wsdl tool was unable to
      process wsdl files with imports. so i tried to combine wizard
      generated files into a single wsdl service file. and then wsdl tool
      created csharp file. i have a complexType, and there are two methods,
      one using the complexType as a parameter, and the other uses array of
      that complexType. single parameter method works ok, but when i try
      array parameter method it fails with a message on client side:

      --------------------
      System.Web.Services.Protocols.SoapHeaderException: No Deserializer
      found to deserialize a ':samples' using encoding
      style 'http://schemas.xmlsoap.org/soap/encoding/'.
      at
      System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse
      (SoapClientMessage message, WebResponse response, Stream
      responseStream)
      at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke
      (String methodName, Object[] parameters)
      at nom.kurt.TestBean.TestBeanService.testMethod2(Sample[] samples)
      at SimpleWebServicesClient.Main()
      --------------------

      since single parameter method works nicely, i believe, there is a
      problem with array. as far as i understood, arrays should work
      without any further effort. i'm really confused with this situation,
      any help will be appreciated. fyi, definitions are here, since i
      tried variations of array definition, all variations failed with the
      same message. they are all below:

      1-
      <xsd:complexType name="Sample">
      <xsd:all>
      <xsd:element name="age" type="xsd:int"/>
      <xsd:element name="name" nillable="true" type="xsd:string"/>
      </xsd:all>
      </xsd:complexType>

      <xsd:complexType name="ArrayOfSample">
      <xsd:complexContent>
      <xsd:restriction base="soapenc:Array">
      <xsd:sequence/>
      <xsd:attribute ref="soapenc:arrayType"
      wsdl:arrayType="tns:Sample[]"/>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>


      2-
      <xsd:complexType name="ArrayOfSample">
      <xsd:complexContent>
      <xsd:restriction base="soapenc:Array">
      <xsd:sequence>
      <xsd:element name="item" type="tns:Sample"
      maxOccurs="unbounded" />
      </xsd:sequence>
      <xsd:attribute ref="soapenc:arrayType"
      wsdl:arrayType="tns:Sample[]"/>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>


      3-
      <xsd:complexType name="ArrayOfSample">
      <xsd:complexContent>
      <xsd:restriction base="soapenc:Array">
      <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="unbounded"
      name="ArrayOfSample" nillable="true" type="tns:Sample" />
      </xsd:sequence>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>



      kind regards,
      ozgur
    Your message has been successfully submitted and would be delivered to recipients shortly.