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

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

Expand Messages
  • Andre Merzky
    Could you please? As said, I am not fit in WSDL, but I could throw a second pairs of eyes on it ;-) A. ... --
    Message 1 of 11 , Jul 20, 2005
    View Source
    • 0 Attachment
      Could you please? As said, I am not fit in WSDL, but I
      could throw a second pairs of eyes on it ;-)

      A.


      Quoting [Gernot Stocker] (Jul 20 2005):
      > From: Gernot Stocker <gernot.stocker@...>
      > To: Andre Merzky <andre@...>
      > Subject: Re: SOAP::Lite client for Axis WebService and complex objects
      > Date: Wed, 20 Jul 2005 11:25:59 +0200
      > Cc: soaplite@yahoogroups.com
      >
      > On Wednesday 20 July 2005 11:11, Andre Merzky wrote:
      > > I am not good at WSDL files, but it seems to me it is
      > > missing a port type and operation.  So, it does not specify
      > > what methods can be called.  Wouldn't that be crucial?
      > >
      > > e.g. 'getCapabilities' does not appear in your wsdl.
      >
      > I included in the problem description just the relevant type part of
      > the wsdl, not the complete wsdl where also the getCapabilities()
      > method is defined. This method was just an example which gets
      > such a JTestVO as a parameter.
      >
      > Should I send a complete WSDL file of the test service?
      >
      > Thanks Gernot
      --
      +-----------------------------------------------------------------+
      | Andre Merzky | phon: +31 - 20 - 598 - 7759 |
      | Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
      | Dept. of Computer Science | mail: merzky@... |
      | De Boelelaan 1083a | www: http://www.merzky.net |
      | 1081 HV Amsterdam, Netherlands | |
      +-----------------------------------------------------------------+
    • Gernot Stocker
      ... Hi, I have attached the WSDL generated by axis after deploying it with the following axis deployment descriptor:
      Message 2 of 11 , Jul 20, 2005
      View Source
      • 0 Attachment
        On Wednesday 20 July 2005 11:38, Andre Merzky wrote:
        > Could you please? As said, I am not fit in WSDL, but I
        > could throw a second pairs of eyes on it ;-)

        Hi,
        I have attached the WSDL generated by axis after deploying it with the following
        axis deployment descriptor:

        <deployment
        xmlns="http://xml.apache.org/axis/wsdd/"
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
        <service name="TestService" provider="java:EJB">
        <parameter name="beanJndiName" value="AxisServiceBean" />
        <parameter name="homeInterfaceName" value="at.tugraz.genome.testservice.AxisServiceBeanHome" />
        <parameter name="remoteInterfaceName" value="at.tugraz.genome.testservice.AxisService" />
        <parameter name="allowedMethods" value="*"/>
        <parameter name="jndiURL" value="jnp://localhost:1099"/>
        <parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory"/>
        <beanMapping qname="myNS:JTestVO" xmlns:myNS="urn:JTestVO" languageSpecificType="java:at.tugraz.genome.testservice.JTestVO" />
        </service>
        </deployment>

        If this problem can/will be solved I would provide the complete code of the axis/java/perl
        TestService-project and a short howto. Then other people don't have to struggle like me.

        Thanks Gernot
        --
        Gernot Stocker,
        Institute for Genomics and Bioinformatics(IGB)
        Petersgasse 14, 8010 Graz, Austria
        Tel.: ++43 316 873 5345
        http://genome.tugraz.at
      • Michael Rasmussen
        Hi Gernot, ...
        Message 3 of 11 , Jul 20, 2005
        View Source
        • 0 Attachment
          Hi Gernot,

          > Date: Wed, 20 Jul 2005 14:32:38 +0200
          > From: Gernot Stocker <gernot.stocker@...>
          > Subject: Re: SOAP::Lite client for Axis WebService and complex
          > objects
          >
          <wsdl:message name="getCapabilitiesResponse">

          <wsdl:part name="getCapabilitiesReturn" type="apachesoap:Vector"/>

          </wsdl:message>

          <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
          <complexType name="JTestVO">
          <sequence>
          <element name="firstname" nillable="true" type="soapenc:string"/>
          <element name="lastname" nillable="true" type="soapenc:string"/>
          </sequence>
          </complexType>

          <complexType name="JTestVOs">
          <complexContent>
          <restriction base="SOAP-ENC:Array">
          <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tnsl:JTestVO[]"/
          >
          </restriction>
          </complexContent>
          </complexType>

          --
          Hilsen/Regards
          Michael Rasmussen

          Get my public GnuPG keys:
          michael <at> rasmussen <dot> cc
          http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xD3C9A00E
          mir <at> datanom <dot> net
          http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE501F51C
          mir <at> miras <dot> org
          http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
          --------------------------------------------------------------
          Seen above a urinal in the men's room at ETSU: Anyone can pee on the
          floor.
          Be a hero: crap on the ceiling.
        • gernot_stocker
          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
          Message 4 of 11 , Jul 21, 2005
          View Source
          • 0 Attachment
            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
          • haltarac
            Gernot, There are already a couple of bugs opened regarding that problem on SourceForge:
            Message 5 of 11 , Jul 22, 2005
            View Source
            • 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.