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 Kevin Jones <ke...@develop.com> on 2004/05/19 16:40:37 UTC
SimpleType Code Generation Bug?
I'm using 1.2 Beta, this worked in 1.1
I have a WSDL doc that contains a schema and I'm running WSDL2Java -server.
The schema contains a simple type that is a parameter to one of the
'methods' on the web service. The SimpleType looks like this:
<xsd:simpleType name="ISBNType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{3}-[0-9]{3}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="BookAvailabilityByISBN" type="tns:ISBNType"/>
and then the WSDL has this
<message name="getBookAvailabilityByISBNMsg">
<part name="parameters" element="operations:BookAvailabilityByISBN"/>
</message>
The generated Java for this looks like
public AvailabilityDetails getBookAvailabilityByISBN(String parameters)
throws java.rmi.RemoteException;
i.e. it is defined as taking a String and no ISBNType Java type is defined.
The WSDD looks like this
<typeMapping
xmlns:ns="urn:com.develop.ejws:orinoco"
qname="ns:ISBNType"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
and when I browse to the generated WSDL (I'm letting the server re-generate
the WSDL) I get the following
<element name="BookAvailabilityByISBN" type="tns1:ISBNType"/>
but no ISBNType is defined in the WSDL/Schema
Is this a known bug/feature?
Thanks,
Kevin Jones
http://kevinj.develop.com