axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kachra Patti" <kachra_pa...@hotmail.com>
Subject Java2WSDL assigns incorrect namespace for the 'anyType' type
Date Fri, 23 Apr 2004 03:05:39 GMT
For an operation having an 'Object' parameter, the WSDL2Java tool generates
a WSDL, with an incorrect namespace 'http://www.w3.org/1999/XMLSchema'
assigned to the 'anyType' type. I was hoping that the
'http://www.w3.org/2001/XMLSchema' namespace would be used. I used
axis-1_2beta. Is it a bug?


The following are the Java class and the generated WSDL:

Java class
======
package example;
public interface Test {
    public String helloWorld(Object objectParamter);
}

Command-line to generate "test.wsdl" in the current working directory
===========================================
java
org.apache.axis.wsdl.Java2WSDL -o"test.wsdl" -l"http://localhost:8080/axis/s
ervices/Test" -n"urn:Example" -p"example" "urn:Example" example.Test


The generated WSDL
==================================
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:Example" xmlns:impl="urn:Example"
xmlns:intf="urn:Example" xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns2="http://www.w3.org/1999/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.2beta
Built on Mar 31, 2004 (12:47:03 EST)-->

   <wsdl:message name="helloWorldResponse">

      <wsdl:part name="helloWorldReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="helloWorldRequest">

      <wsdl:part name="in0" type="tns2:anyType"/>

   </wsdl:message>

   <wsdl:portType name="Test">

      <wsdl:operation name="helloWorld" parameterOrder="in0">

         <wsdl:input name="helloWorldRequest"
message="impl:helloWorldRequest"/>

         <wsdl:output name="helloWorldResponse"
message="impl:helloWorldResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="WidgetPriceSoapBinding" type="impl:Test">

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="helloWorld">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="helloWorldRequest">

            <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:Example"/>

         </wsdl:input>

         <wsdl:output name="helloWorldResponse">

            <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:Example"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="TestService">

      <wsdl:port name="WidgetPrice" binding="impl:WidgetPriceSoapBinding">

         <wsdlsoap:address
location="http://localhost:8080/axis/services/Test"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

Mime
View raw message