axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18848] New: - Wrong WSDL generated from wrapped web service
Date Wed, 09 Apr 2003 10:33:12 GMT
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=18848>.
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=18848

Wrong WSDL generated from wrapped web service

           Summary: Wrong WSDL generated from wrapped web service
           Product: Axis
           Version: 1.1rc2
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: kevinj@develop.com


I have the following Java class and WSDD file

public class Math
{
    public double add(double d1, double d2)
    {
        return d1+d2;
    }
}

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="axismaths" provider="java:RPC" style="wrapped" use="literal">
        <parameter name="className" value="kevinj.Math"/>
        <parameter name="allowedMethods" value="*"/>
    </service>
</deployment>

If I deploy this and then get it's WSDL, under 1.1RC2 I get this

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
targetNamespace="http://localhost/axismaths/services/axismaths" 
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:apachesoap="http://xml.apache.org/xml-soap" 
    xmlns:impl="http://localhost/axismaths/services/axismaths" 
    xmlns:intf="http://localhost/axismaths/services/axismaths" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:tns1="urn:kevinj:axismath" 
    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:kevinj:axismath" 
xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <complexType name="local">
                <sequence/>
            </complexType>
        </schema>
        <schema targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <element name="add">
                <complexType>
                    <sequence>
                        <element name="d1" type="xsd:double"/>
                        <element name="d2" type="xsd:double"/>
                    </sequence>
                </complexType>
            </element>
            <element name="addResponse">
                <complexType>
                    <sequence>
                        <element name="addReturn" type="xsd:double"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>
    <wsdl:message name="addRequest">
        <wsdl:part element="add" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="addResponse">
        <wsdl:part element="addResponse" name="parameters"/>
    </wsdl:message>
    <wsdl:portType name="Math">
        <wsdl:operation name="add" parameterOrder="">
            <wsdl:input message="impl:addRequest" name="addRequest"/>
            <wsdl:output message="impl:addResponse" name="addResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="axismathsSoapBinding" type="impl:Math">
        <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="add">

            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="addRequest">
                <wsdlsoap:body 
namespace="http://localhost/axismaths/services/axismaths" use="literal"/>
            </wsdl:input>
            <wsdl:output name="addResponse">
                <wsdlsoap:body 
namespace="http://localhost/axismaths/services/axismaths" use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="MathService">
        <wsdl:port binding="impl:axismathsSoapBinding" name="axismaths">
            <wsdlsoap:address 
location="http://localhost/axismaths/services/axismaths"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Notice that the schema has no target namespace and that the element attributes 
in the message elements are defined to be in the default namespace.

This cause code generation to fail

It appears that WSDL generation for wrapped in 1.1RC2 has the same behaviour as 
document.

This works fine if I use 1.1RC1

Kevin Jones

Mime
View raw message