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 "Davanum Srinivas (JIRA)" <ax...@ws.apache.org> on 2005/07/27 22:17:50 UTC

[jira] Resolved: (AXIS-1367) Invalid code generation for SimpleTypes

     [ http://issues.apache.org/jira/browse/AXIS-1367?page=all ]
     
Davanum Srinivas resolved AXIS-1367:
------------------------------------

    Resolution: Fixed

I believe this is fixed in Axis 1.2.1 as well. If not, please add a comment and i'll reopen the bug.

-- dims

> Invalid code generation for SimpleTypes
> ---------------------------------------
>
>          Key: AXIS-1367
>          URL: http://issues.apache.org/jira/browse/AXIS-1367
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: current (nightly)
>  Environment: Windows 2003 Server
> JDK 1.4.2_03
>     Reporter: Kevin Jones

>
> I reported this on the dev list to see if it was a bug and had no response:
> 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, so either the type here should be xsd:string or the WSDL needs to contain a definition for ISBNType

-- 
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