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

glue - soap::lite complex data type serializer

Expand Messages
  • Chuck Rock
    Hello, I am a newbie to soap::lite. I am trying to interoperate glue java server and soap::lite client. At this point, I try to interoperate with a complex
    Message 1 of 1 , Dec 13, 2002
    • 0 Attachment
      Hello,

      I am a newbie to soap::lite. I am trying to interoperate glue
      java server and soap::lite client. At this point, I try to
      interoperate with a complex datatype.

      My problem is that soap::lite not correct differ between num
      and string types in comlex datatypes. Although soap::lite knows
      the maptyp through the xml-schema.

      ------snip-------
      <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'

      targetNamespace='http://www.themindelectric.com/package/com.beancounter.webservice.datatransfer/'>
      <xsd:complexType name='CustomerDDTO'>
      <xsd:sequence>
      <xsd:element name='name' nillable='true' type='xsd:string'/>
      <xsd:element name='preName' nillable='true' type='xsd:string'/>
      <xsd:element name='dateOfBirth' nillable='true'
      type='xsd:string'/>
      <xsd:element name='placeOfBirth' nillable='true'
      type='xsd:string'/>
      <xsd:element name='martialStatus' nillable='true'
      type='xsd:string'/>
      <xsd:element name='nationality' nillable='true'
      type='xsd:string'/>
      <xsd:element name='steet' nillable='true' type='xsd:string'/>
      <xsd:element name='houseNumber' nillable='true'
      type='xsd:string'/>
      <xsd:element name='zipCode' nillable='true' type='xsd:string'/>
      <xsd:element name='place' nillable='true' type='xsd:string'/>
      <xsd:element name='privatePhone' nillable='true'
      type='xsd:string'/>
      <xsd:element name='businessPhone' nillable='true'
      type='xsd:string'/>
      <xsd:element name='email' nillable='true' type='xsd:string'/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      ------snip-------

      This is the client source code (I tried with plain perl structure approach).
      Without num values work the sample also fine but the translation work not
      correct.

      ------snip-------
      use SOAP::Lite;

      my $ddto = bless
      {
      name => "Neubauer",
      preName => "Falk",
      dateOfBirth => "16.06.1970",
      placeOfBirth => "Berlin",
      martialStatus => "ledig",
      nationality => "deutsch",
      street => "Berliner Ring 12",
      houseNumber => "not",
      zipCode => "84682",
      place => "E-Dorf",
      privatePhone => "",
      businessPhone => "",
      email => "fneubau1\@..."
      } => 'CustomerDDTO';

      my $service = SOAP::Lite
      -> service("http://localhost:8004/glue/urn:BankService.wsdl")
      -> maptype({
      CustomerDDTO =>
      'http://www.themindelectric.com/package/com.beancounter.webservice.datatransfer/',
      });

      $service->openAccount($ddto);
      ------snip-------

      The request looks unfortunately with an int-type for the zipCode and
      not with the correct string-type.

      ------snip-------
      [SOAP] request for /urn:BankService
      <?xml version='1.0' encoding='UTF-8'?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
      xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'>
      <SOAP-ENV:Body>
      <namesp3:openAccount
      xmlns:namesp3='http://tempuri.org/com.beancounter.webservice.BankService'>
      <ddto
      xmlns:ns='http://www.themindelectric.com/package/com.beancounter.webservice.datatransfer/' xsi:type='ns:CustomerDDTO'>
      <nationality xsi:type='xsd:string'>deutsch</nationality>
      <dateOfBirth xsi:type='xsd:string'>18.12.1978</dateOfBirth>
      <preName xsi:type='xsd:string'>Falk</preName>
      <businessPhone xsi:type='xsd:string'>richter</businessPhone>
      <placeOfBirth xsi:type='xsd:string'>Karl-Marx-Stadt</placeOfBirth>
      <name xsi:type='xsd:string'>Neubauer</name>

      <zipCode xsi:type='xsd:int'>09573</zipCode>

      <privatePhone xsi:type='xsd:string'>richter</privatePhone>
      <houseNumber xsi:type='xsd:string'>hello</houseNumber>
      <email xsi:type='xsd:string'>fneubau1@...</email>
      <place xsi:type='xsd:string'>E-Dorf</place>
      <martialStatus xsi:type='xsd:string'>ledig</martialStatus>
      <street xsi:type='xsd:string'>Chemnitzer Strasse</street>
      </ddto>
      </namesp3:openAccount>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      ------snip-------



      Could someone please clarify on that, because right now
      interoperability seems no more than a hype to me.

      Thanks, Falk.

      --
      +++ GMX - Mail, Messaging & more http://www.gmx.net +++
      NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
    Your message has been successfully submitted and would be delivered to recipients shortly.