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

Re: complexType

Expand Messages
  • mscance
    DOH, Newbie err!! I assumed that `under the hood , SOAP::Lite and the definitions in my WSDL file had more direct interaction than they do with the present
    Message 1 of 3 , Jun 23, 2003
      DOH, Newbie err!! I assumed that `under the hood', SOAP::Lite and the
      definitions in my WSDL file had more direct interaction than they do
      with the present version. I ..thought.. that SOAP::Lite used the WSDL
      to dictate the namespace of a functions return values and relate them
      to the correct <type>...

      An afternoon spent with SOAP::Serializer has put me right!! More to
      the point its shown me how I can make my return values look something
      like the schema specified in my WSDL and keep my MS clients happy!


      best,
      Mark


      --- In soaplite@yahoogroups.com, "mscance" <mark@f...> wrote:
      > Am I right in thinking that SOAP::Lite will ignore any <complexType>
      tags?
      >
      > I want to return a hash ref as the complexType below but am having no
      > luck. After reading the man pages, these groups and 'Programming Web
      > Serivces with Perl', (great book), it seems the only way to get
      > something simular is to define the elments as <parts> within the
      > relevant <message> tag... Can anybody advise me otherwise??
      >
      > <xsd:complexType name="AccountData">
      > <xsd:all>
      > <xsd:element name="id" type="xsd:int"/>
      > <xsd:element name="accounts" type="xsd:string"/>
      > </xsd:all>
      > </xsd:complexType>
      >
      > Any help greatly appreciated.
      > Thx,
      > Mark.
    • xiaoling_leng
      Dear all, I am new user of SOAP::Lite, and have a lot of problem with complexType data structure. Would anyone out there help please. I have a wsdl file with
      Message 2 of 3 , Oct 29, 2004
        Dear all,

        I am new user of SOAP::Lite, and have a lot of problem with
        complexType data structure. Would anyone out there help please.

        I have a wsdl file with complexType data structure as shown below:


        <types>

        <schema targetNamespace="http://npc57.hopewiser.com/TableService"
        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:table="http://npc57.hopewiser.com/TableService"
        xmlns="http://www.w3.org/2001/XMLSchema"
        elementFormDefault="qualified"
        attributeFormDefault="qualified">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="Field">
        <sequence>
        <element name="name" type="xsd:string" minOccurs="0"
        maxOccurs="1" nillable="true"/>
        <element name="type" type="xsd:string" minOccurs="0"
        maxOccurs="1" nillable="true"/>
        <element name="value" type="xsd:string" minOccurs="0"
        maxOccurs="1" nillable="true"/>
        </sequence>
        </complexType>
        <complexType name="ArrayOfField">
        <sequence>
        <element name="tablename" type="xsd:string" minOccurs="0"
        maxOccurs="1" nill able="true"/>
        <element name="fld" type="table:Field" minOccurs="1"
        maxOccurs="unbounded"/>
        </sequence>
        </complexType>
        </schema>
        </types>
        <message name="insertRecRequest">
        <part name="TableDef" type="table:ArrayOfField"/>
        </message>


        And part of my SOAP::Lite client program looks like:
        my $tabname = 'PROV';
        my $arrfld = SOAP::Data
        -> name (fld =>
        [map{
        SOAP::Data->name(item => $_)->type('name')
        } @name],
        [map{
        SOAP::Data->name(item => $_)->type('type')
        } @type],
        [map{
        SOAP::Data->name(item => $_)->type('value')
        } @value]
        );
        my $params = SOAP::Data
        ->name("TableDef" =>
        \SOAP::Data->value(
        SOAP::Data->name(tablename => $tabname),
        SOAP::Data->name(ArrayofField =>
        [map {
        SOAP::Data->name(item => $_)->type('fld')
        } @arrfld
        ])));


        my $tir = $table->insertRec($params);



        All I get in server side is the table name.
      Your message has been successfully submitted and would be delivered to recipients shortly.