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

Re: Soaplite server, Axis client, no deserializer for SoapStruct

Expand Messages
  • jpeyser
    Scott, Your Perl Server should be returning something similar to this. return SOAP::Data- value( SOAP::Data- name( admin = 1), SOAP::Data- name( guest =
    Message 1 of 6 , Dec 19, 2003
    • 0 Attachment
      Scott,

      Your Perl Server should be returning something similar to this.

      return SOAP::Data->value(
      SOAP::Data->name('admin' => 1),
      SOAP::Data->name('guest' => 2),
      );


      See http://majordojo.com/soaplite/

      Jonathan

      --- In soaplite@yahoogroups.com, "scottalodar" <scott@a...> wrote:
      > Hi, all.
      >
      > I am having a problem, and I have not been able to solve it. I
      have read the docs
      > extensively, but I am a perl newbie, and thus probably missed some
      important stuff.
      >
    • Scott Ellsworth
      Hi, Jonathan. Thank you for the help. I got a chance to try this again. Your hint, and a bit of mucking about, made things work the way I wanted them to. The
      Message 2 of 6 , Jan 9, 2004
      • 0 Attachment
        Hi, Jonathan.

        Thank you for the help. I got a chance to try this again. Your hint,
        and a bit of mucking about, made things work the way I wanted them to.

        The code:
        my %users = %{get_user_ids_by_name(config_name => $config_name)};

        my @entries = ();
        foreach my $username (sort keys %users){
        my $entry =
        SOAP::Data->name('mapItem' =>
        \SOAP::Data->value(
        SOAP::Data->name('key' => $username),
        SOAP::Data->name('value' => $users{$username}),
        )
        );
        $entries[$#entries+1]=$entry;
        }

        return SOAP::Data->value(
        SOAP::Data->name('map' =>
        \SOAP::Data->value(
        @entries
        ),
        )->type('gbibns:map')->attr( { 'xmlns:gbibns' =>
        'http://feature.alodar.com/Alodar/GBIB/' } ),
        );

        successfully returns the XML:

        <?xml version="1.0" encoding="UTF-8"?>
        <SOAP-ENV:Envelope
        xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
        <namesp1:typed_get_user_ids_by_nameResponse
        xmlns:namesp1="http://feature.alodar.com/Alodar/GBIB/SOAPUtils">
        <map xsi:type="gbibns:map"
        xmlns:gbibns="http://feature.alodar.com/Alodar/GBIB/">
        <mapItem>
        <key xsi:type="xsd:string">
        admin
        </key>
        <value xsi:type="xsd:int">
        1
        </value>
        </mapItem>
        <mapItem>
        <key xsi:type="xsd:string">
        guest
        </key>
        <value xsi:type="xsd:int">
        2
        </value>
        </mapItem>
        </map>
        </namesp1:typed_get_user_ids_by_nameResponse>
        </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>

        required by the wsdl

        <types>
        <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://feature.alodar.com/Alodar/GBIB/"
        >
        <!-- import namespace="http://schemas.xmlsoap.org/soap/encoding/" /
        -->

        <complexType name="mapItem">
        <sequence>
        <element name="key" nillable="true" type="anyType" />
        <element name="value" nillable="true" type="anyType" />
        </sequence>
        </complexType>

        <complexType name="map">
        <sequence>
        <element maxOccurs="unbounded" minOccurs="0" name="mapItem"
        type="tns:mapItem" />
        </sequence>
        </complexType>
        </schema>
        </types>

        I still have a number of issues to figure out, such as how to get a
        perl example that can use this wsdl and the like, but this solves the
        main problem I was running into.

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