You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/02/20 16:16:31 UTC

DO NOT REPLY [Bug 27113] New: - Setting qname in typeMapping for Java class doesn't work

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27113>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27113

Setting qname in typeMapping for Java class doesn't work

           Summary: Setting qname in typeMapping for Java class doesn't work
           Product: Axis
           Version: 1.2 Alpha
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: seth@oculan.com


In the schema for the typeMapping element in WSDD, it appears that you can
specify the QName of the mapping so that your Java class is mapped to a specific
QName in the WSDL output. However, this setting has no effect on the WSDL output.

For instance, given the following WSDD typeMapping:

<typeMapping 
xmlns:ns="http://totally.new.namespace" 
qname="ns:TotallyNewName" 
languageSpecificType="java:xxx.xxx.ClassX"
serializer="org.apache.axis.encoding.ser.castor.CastorSerializerFactory"
deserializer="org.apache.axis.encoding.ser.castor.CastorDeserializerFactory"
/>

you would expect the following schema to be generated (using RPC/encoded):

<schema targetNamespace="http://totally.new.namespace">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="TotallyNewName">
<sequence>
<element name="beanField" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>

However, instead the java package and class name are still used as the namespace
and type name, respectively.

<schema targetNamespace="http://xxx.xxx">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ClassX">
<sequence>
<element name="beanField" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>

This makes it difficult to map classes from multiple Java packages as arguments
to a single web service (well, the difficulty for me may lie in the client that
I'm using but that's another issue...).