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 "Håkon Rydland (JIRA)" <ax...@ws.apache.org> on 2005/02/10 16:59:14 UTC

[jira] Updated: (AXIS-1331) WSDL2Java genetates incorrect code from WSDL

     [ http://issues.apache.org/jira/browse/AXIS-1331?page=history ]

Håkon Rydland updated AXIS-1331:
--------------------------------

    Attachment: JavaSkelWriter.java.patch

I've fixed this problem by applying this patch, but I don't know if this is the right way to do it. I hope someone familiar with this code can evaluate my patch. I have not run any axis test cases, so I don't know whether this will break anything, but java code generation runs fine for me now.

> WSDL2Java genetates incorrect code from WSDL
> --------------------------------------------
>
>          Key: AXIS-1331
>          URL: http://issues.apache.org/jira/browse/AXIS-1331
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Windows 2000 service Pack 4
> j2sdk1.4.1_03
> Axis1.2b
>     Reporter: Joe Rattz
>  Attachments: JavaSkelWriter.java.patch, WEJOEI.wsdl
>
> WSDL2Java seems to generate invalid code from WSDL.  The parameters of my web service operation have invalid names throughout when using the WSDL at the bottom of this description.  For example, in the skeleton code:
>             new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("urn:types:WEJOEI:genpt.com", "partInquiry_t>divNumber"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false), 
> Notice the "partInquiry_t>divNumber" part.  It should be just "divNumber".  This seems propogated throughout the generated code and even in the WSDL that Axis provides at ?wsdl.  Here is what it looks like:
> <element name="partInquiry">
>     <complexType>
>         <sequence>
>             <element name="partInquiry_t>divNumber" type="xsd:string" /> 
> Again, notice the "partInquiry_t>" prepended onto the front of the element name.
> Here is the WSDL that produced this:
> <?xml version="1.0" encoding="UTF-8" ?>
> <wsdl:definitions targetNamespace="urn:WEJOEI:genpt.com" xmlns:impl="urn:WEJOEI:genpt.com" xmlns:intf="urn:WEJOEI:genpt.com"
>     xmlns:tns1="urn:types:WEJOEI:genpt.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>     <wsdl:types>
>         <schema targetNamespace="urn:types:WEJOEI:genpt.com" xmlns="http://www.w3.org/2001/XMLSchema"
>             elementFormDefault="qualified">
>             <complexType name="messageData_t">
>                 <sequence>
>                     <element minOccurs="0" maxOccurs="1" name="dcAbbreviation" nillable="true" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="messageNumber" nillable="true" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="messageText" nillable="true" type="xsd:string" />
>                 </sequence>
>             </complexType>
>             <complexType name="returnData_t">
>                 <sequence>
>                     <element name="statusCode" type="xsd:int" />
>                     <element maxOccurs="unbounded" name="messageDataCollection" nillable="true" type="tns1:messageData_t" />
>                 </sequence>
>             </complexType>
>             <element name="partInquiry" type="tns1:partInquiry_t" />
>             <complexType name="partInquiry_t">
>                 <sequence>
>                     <element minOccurs="0" maxOccurs="1" name="divNumber" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="dcNumber" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="custNumber" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="quantity" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="partId" type="xsd:string" />
>                     <element minOccurs="0" maxOccurs="1" name="lineId" type="xsd:string" />
>                 </sequence>
>             </complexType>
>             <xsd:element name="partInquiryResponse" type="tns1:partInquiryResponse_t" />
>             <xsd:complexType name="partInquiryResponse_t">
>                 <xsd:sequence>
>                     <xsd:element minOccurs="0" maxOccurs="1" name="partInquiryResult" type="tns1:returnData_t" />
>                 </xsd:sequence>
>             </xsd:complexType>
>         </schema>
>     </wsdl:types>
>     <wsdl:message name="partInquiryRequest">
>         <wsdl:part element="tns1:partInquiry" name="parameters" />
>     </wsdl:message>
>     <wsdl:message name="partInquiryResponse">
>         <wsdl:part element="tns1:partInquiryResponse" name="parameters" />
>     </wsdl:message>
>     <wsdl:portType name="WEJOEI">
>         <wsdl:operation name="partInquiry">
>             <wsdl:input message="impl:partInquiryRequest" name="partInquiryRequest" />
>             <wsdl:output message="impl:partInquiryResponse" name="partInquiryResponse" />
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="WEJOEISoapBinding" type="impl:WEJOEI">
>         <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="partInquiry">
>             <wsdlsoap:operation soapAction="urn:WEJOEI:genpt.com/PartInquiry" />
>             <wsdl:input name="partInquiryRequest">
>                 <wsdlsoap:body use="literal" />
>             </wsdl:input>
>             <wsdl:output name="partInquiryResponse">
>                 <wsdlsoap:body use="literal" />
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="WEJOEI">
>         <wsdl:port binding="impl:WEJOEISoapBinding" name="WEJOEI">
>             <wsdlsoap:address location="http://localhost:8080/axis/services/WEJOEI" />
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> Thanks.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira