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

Re: SOAP::Lite client for Axis WebService and complex objects

Expand Messages
  • haltarac
    Gernot, There are already a couple of bugs opened regarding that problem on SourceForge:
    Message 1 of 11 , Jul 22 2:55 PM
    • 0 Attachment
      Gernot,

      There are already a couple of bugs opened regarding that problem on
      SourceForge:

      http://sourceforge.net/tracker/index.php?func=detail&aid=1196592&group_id=66000&atid=513017
      http://sourceforge.net/tracker/index.php?func=detail&aid=1230022&group_id=66000&atid=513017


      It looks like the parameter serialization loop in the generated stub
      is using a generic serializer that has no idea about your schema
      definitions.

      I added this line in the stub:
      print "BEFORE call to as_method:" . Dumper($self->serializer);
      before:
      my $method = 'as_'.$typename;
      my $result = $self->serializer->$method($param, $template->name,
      $template->type, $template->attr);

      My parameter template (in the stub code) looks like:
      parameters => [
      SOAP::Data->new(name => 'who', type => 'tns:XYZ', attr => {}),

      And the dump does not show anything relating to my XYZ type:

      BEFORE call to as_method:$VAR1 = bless( {
      '_typelookup' => {
      'int' => [
      20,
      sub { "DUMMY" },
      'as_int'
      ],
      'time' => [
      70,
      sub { "DUMMY" },
      'as_time'
      ],
      'date' => [
      60,
      sub { "DUMMY" },
      'as_date'
      ],
      'gYear' => [
      45,
      sub { "DUMMY" },
      'as_gYear'
      ],
      'string' => [
      100,
      sub { "DUMMY" },
      'as_string'
      ],
      'dateTime' => [
      75,
      sub { "DUMMY" },
      'as_dateTime'
      ],
      'boolean' => [
      90,
      sub { "DUMMY" },
      'as_boolean'
      ],
      'float' => [
      30,
      sub { "DUMMY" },
      'as_float'
      ],
      'anyURI' => [
      95,
      sub { "DUMMY" },
      'as_anyURI'
      ],
      'long' => [
      25,
      sub { "DUMMY" },
      'as_long'
      ],
      'gDay' => [
      40,
      sub { "DUMMY" },
      'as_gDay'
      ],
      'gMonthDay' => [
      50,
      sub { "DUMMY" },
      'as_gMonthDay'
      ],
      'gYearMonth' => [
      55,
      sub { "DUMMY" },
      'as_gYearMonth'
      ],
      'duration' => [
      80,
      sub { "DUMMY" },
      'as_duration'
      ],
      'base64Binary' => [
      10,
      sub { "DUMMY" },
      'as_base64Binary'
      ],
      'gMonth' => [
      35,
      sub { "DUMMY" },
      'as_gMonth'
      ]
      },
      '_encodingStyle' =>
      'http://schemas.xmlsoap.org/soap/encoding/',
      '_objectstack' => {},
      '_level' => 0,
      '_signature' => [],
      '_soapversion' => '1.1',
      '_maptype' => {},
      '_namespaces' => {
      'http://www.w3.org/2001/XMLSchema'
      => 'xsd',

      'http://schemas.xmlsoap.org/soap/encoding/' => 'soapenc',

      'http://www.w3.org/2001/XMLSchema-instance' => 'xsi',

      'http://schemas.xmlsoap.org/soap/envelope/' => 'soap'
      },
      '_seen' => {},
      '_attr' => {

      '{http://schemas.xmlsoap.org/soap/envelope/}encodingStyle' =>
      'http://schemas.xmlsoap.org/soap/encoding/'
      },
      '_multirefinplace' => 0,
      '_on_nonserialized' => sub { "DUMMY" },
      '_xmlschema' => 'http://www.w3.org/2001/XMLSchema',
      '_use_prefix' => 1,
      '_readable' => 0,
      '_encoding' => 'UTF-8',
      '_autotype' => 1
      }, 'SOAP::Serializer' );

      And of course, the usual error message:
      Type 'XYZ' can't be found in a schema class 'SOAP::Serializer'


      Henri


      --- In soaplite@yahoogroups.com, "gernot_stocker"
      <gernot.stocker@t...> wrote:
      > Hi Michael,
      > from my point of view the return value of the response should not have
      > to do anything with the serializer of the JTestVO. But just to be
      > shure I introduced an additional method which just returns a simple
      > string:
      >
      >
      > <wsdl:message name="getSimpleCapabilitiesRequest">
      > <wsdl:part name="in0" type="tns1:JTestVO"/>
      > </wsdl:message>
      > [...]
      > <wsdl:message name="getSimpleCapabilitiesResponse">
      > <wsdl:part name="getSimpleCapabilitiesReturn"
      > type="soapenc:string"/>
      > </wsdl:message>
      > [...]
      > <wsdl:operation name="getSimpleCapabilities" parameterOrder="in0">
      >
      > <wsdl:input message="impl:getSimpleCapabilitiesRequest"
      > name="getSimpleCapabilitiesRequest"/>
      >
      > <wsdl:output message="impl:getSimpleCapabilitiesResponse"
      > name="getSimpleCapabilitiesResponse"/>
      >
      > </wsdl:operation>
      > [...]
      > <wsdl:operation name="getSimpleCapabilities">
      >
      > <wsdlsoap:operation soapAction=""/>
      >
      > <wsdl:input name="getSimpleCapabilitiesRequest">
      >
      > <wsdlsoap:body
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > namespace="http://testservice.genome.tugraz.at" use="encoded"/>
      >
      > </wsdl:input>
      >
      > <wsdl:output name="getSimpleCapabilitiesResponse">
      >
      > <wsdlsoap:body
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > namespace="http://localhost:8080/csaxis/services/TestService"
      > use="encoded"/>
      >
      > </wsdl:output>
      >
      > </wsdl:operation>
      >
      > The result was unfortunately exactly the same:
      > Type 'JTestVO' can't be found in a schema class 'SOAP::Serializer'
      >
      >
      >
      > --- In soaplite@yahoogroups.com, Michael Rasmussen <mir@m...> wrote:
      > [...]
      > > <wsdl:output name="getCapabilitiesResponse">
      > > <wsdlsoap:body
      > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > > namespace="http://localhost:8080/csaxis/services/
      > > TestService" use="encoded"/>
      > > </wsdl:output>
      > >
      > > I think your problem lies here. As fare as I know the SOAP XSD does
      > not
      > > discribe a datatype Vector. And as you might well have noticed you
      are
      > > using a bean serializer to handle the data type in which case you
      can
      > > only use clients written i Java also. The data type Vector is a
      native
      > > Java data type holding native Java objects. My best guess would be
      > that
      > > you chose one of the string collection data types. E.g StringArray.
      > > These all have a 1-1 mapping with a SOAP data type
      >
      > I've already seen that people could deserialize vectros, but I agree
      > if this would be the problem, it could be solved soon. But
      > unfortunately as the getSimpleCapabilities method(see above) shows,
      > that that it's not the case. The problem seem to be in the serializer
      > and not in the deserializer.
      >
      > Any other ideas?
      >
      > Thanks,
      > Gernot
    Your message has been successfully submitted and would be delivered to recipients shortly.