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

         Key: AXIS-2472
         URL: http://issues.apache.org/jira/browse/AXIS-2472
     Project: Apache Axis
        Type: Bug

  Components: Deployment / Registries  
    Versions: 1.3    
 Environment: Windows XP, Apache Tomcat 4.1, j2sdk 1.4.2, axis 1.3
    Reporter: Roxana Quiroga Sollinger


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to