Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2472

WSDL not relating array of objects (base class - children) when deploying in the Apache Tomcat Server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3
    • None
    • None
    • Windows XP, Apache Tomcat 4.1, j2sdk 1.4.2, axis 1.3

    Description

      When deploying a web service into my server, I found it's not the same one create with Java2WSDL.

      I have the following data structure:
      public class SimpleBean implements Serializable { }
      public class UserBean extends SimpleBean

      { private String name; }

      In order to get the wsdl for the client, I execute the following command:
      Java2Wsdl -o ProcessConnector.wsdl -l"http://localhost:8080/gtw/services/ProcessConnector" -n urn:ProcessConnector -p"ProcessConnectorService" urn:ProcessConnectorService com.acriter.gtw.core.connector.WSConnector -a -e com.acriter.strutsclient.beans.UserBean

      Therefore I get a ProcessConnector.wsdl with the following information (which is correct)
      <schema targetNamespace="http://impl.beans.gtw.acriter.com" xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://beans.strutsclient.acriter.com"/>
      <import namespace="urn:ProcessConnector"/>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="SimpleBean">
      <sequence/>
      </complexType>
      </schema>
      <schema targetNamespace="http://beans.strutsclient.acriter.com" xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://impl.beans.gtw.acriter.com"/>
      <import namespace="urn:ProcessConnector"/>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="UserBean">
      <complexContent>
      <extension base="tns2:SimpleBean">
      <sequence>
      <element name="realName" nillable="true" type="soapenc:string"/>
      <element name="username" nillable="true" type="soapenc:string"/>
      </sequence>
      </extension>
      </complexContent>
      </complexType>
      </schema>

      The following step (at the client).. wsdl2java ... -s... which generates correctly all the java classes and I get the deploy.wsdl with the following information:
      <arrayMapping
      xmlns:ns="urn:ProcessConnector"
      qname="ns:ArrayOf_tns2_SimpleBean"
      type="java:com.acriter.gtw.beans.impl.SimpleBean[]"
      innerType="cmp-ns:SimpleBean" xmlns:cmp-ns="http://impl.beans.gtw.acriter.com"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
      xmlns:ns="http://beans.strutsclient.acriter.com"
      qname="ns:UserBean"
      type="java:com.acriter.strutsclient.beans.UserBean"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
      xmlns:ns="http://impl.beans.gtw.acriter.com"
      qname="ns:SimpleBean"
      type="java:com.acriter.gtw.beans.impl.SimpleBean"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />

      Now.. if I deploy at the server with the AdminClient... and I want to retrieve the same wsdl that I had before, it's not coming
      http://localhost:8080/gtw/services/ProcessConnector?wsdl
      The relation in the <extension> tag with the UserBean class does not exist in the ProcessConnector.wsdl, which is different from the one which was generated by java2wsdl.
      But on the server-config.wsdd was binded
      <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns4:UserBean" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.acriter.strutsclient.beans.UserBean" xmlns:ns4="http://beans.strutsclient.acriter.com"/>
      <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns5:SimpleBean" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.acriter.gtw.beans.impl.SimpleBean" xmlns:ns5="http://impl.beans.gtw.acriter.com"/>
      <arrayMapping innerType="ns8:SimpleBean" languageSpecificType="java:com.acriter.gtw.beans.impl.SimpleBean[]" qname="ns7:ArrayOf_tns2_SimpleBean" xmlns:ns7="urn:ProcessConnector" xmlns:ns8="http://impl.beans.gtw.acriter.com"/>

      The array of SimpleBean is being used as a part of another bean as a response for the process.

      Thanks for your help.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kopela Roxana Quiroga Sollinger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: