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

Re: complexTypes to a .NET client

Expand Messages
  • perlmedian
    ... Thanks for the reference but it only helps me with understanding what is expected from .NET not how to implement it in SOAP::Lite. I have read through most
    Message 1 of 3 , Jun 23, 2003
      See inline:

      --- In soaplite@yahoogroups.com, "jpeyser" <jpeyser@p...> wrote:
      > Nik,
      > First, the MS SOAP Toolkit comes with a User Guide that contains
      > explanations and sample code for handling complex data types.

      Thanks for the reference but it only helps me with understanding what
      is expected from .NET not how to implement it in SOAP::Lite. I have
      read through most examples of SOAP::Lite but data on complexTypes is

      > Second, the response from the server contains too many namespaces.
      > The response should be simpler, as such.

      I fixed that. You are right I went a bit crazy with the namespaces,
      but the types are required because of the interoperability issues
      with .NET all data needs the types explicitly defined, (it doesn't
      like it any other way).

      > Third, as found in the aforementioned user's guide, the WSDL type
      > definition can be simpler.
      > <types>
      > <schema
      > xmlns="http://www.w3.org/2001/XMLSchema"
      > targetNamespace="getFileRevision/ns2.xsd"
      > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:ns2="getFileRevision/ns2.xsd"
      > xmlns:ns="getFileRevision">
      > <complexType name="groupsArray">
      > <sequence>
      > <element name="file" type="xsd:string"/>
      > <element name="revision" type="xsd:string"/>
      > </sequence>
      > </complexType>
      > <complexType name="getFileRevisionResponse">
      > <all>
      > <element name="Files" type="ns2:groupsArray" minOccurs="0"
      > maxOccurs="0"/>
      > </all>
      > </complexType>
      > </schema>
      > </types>

      Thanks for the info. The WSDL works fine as is for me now. I don't
      want to change it until I get further with the server. The WSDL I
      used came straight from the 'Web Services With Perl' OReilly book. (I
      didn't know WSDL prior to that).

      > Last, not being a vb programmer, I haven't figured out how to load
      > the results into an array. The best I can do is to put the results
      > into a string.

      I am not to worried about the .NET end. The WSDL is what works and
      how I want to the server's data to be. Plus it's going into C# really
      and he has a grasp on the work.

      > [SNIP]

      Here's where I have come to, thanx to a e-mail from another member
      who sent me some of his code, I am stuck on what to put in
      the 'whatgoeshere???' part of my server return.

      Please any help is appreciated.

      Here's what I am returning from my SOAP::Lite server:
      return ('string')->uri('urn:FileInfo'),
      ('whatgoeshere???:ArrayOfFileRevPairs' =>
      [ map SOAP::Data->type( 'whatgoeshere???:FileRevPairs' =>
      { file =>
      revision =>
      }), @{$files} ]

      some of the WSDL:
      <xsd:complexType name="FileRevPair">
      <xsd:element name="file" type="xsd:string"/>
      <xsd:element name="revision" type="xsd:string"/>

      <xsd:complexType name="ArrayOfFileRevPairs">
      <xsd:restriction base="enc:Array">
      <xsd:attribute ref="enc:arrayType"
      wsdl:arrayType="tns:FileRevPair[]" />


      <message name="getFileRevisionResponse">
      <part name="Files" type="tns:ArrayOfFileRevPairs" />

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