I have a situation where I a client is using an element instead of a type for a message parameter in my WSDL file (simplified example attached). When I generate the stubs, the operation name call looks like this:
_call.setOperationName(new javax.xml.namespace.QName("http://www.xyz.com/schema/Elements", "anElement")); rather than the expected: _call.setOperationName(new javax.xml.namespace.QName("http://www.xyz.com/soap-services", "anOperation")); I read the comments for getOperationQName and someone wrote: // NOTE: it is possible for someone to define a part as an element // while using rpc/encoded, which is wrong and we might want to catch it // here. Is this actually true ? Could someone point me to the spec that points this out ? It seems that this could be easy to fix by adding @@ -566,6 +566,9 @@ if (ns == null) { ns = ""; } + else { + return new QName(ns, operationName); + } to Utils.java, revision RC1 regards, Chris Burnley
<schema version="1.0" targetNamespace="http://www.xyz.com/schema/Elements" xmlns:types="http://www.xyz.com/schema/Types" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://www.xyz.com/schema/Types" schemaLocation="Types.xsd"/> <element name="anElement" type="types:AType"/> </schema>
<schema version="1.0" targetNamespace="http://www.xyz.com/schema/Types" xmlns="http://www.w3.org/2001/XMLSchema"> <simpleType name="AType"> <restriction base="string"> <maxLength value="9"/> </restriction> </simpleType> </schema>
<definitions name="AxisBug" targetNamespace="http://www.xyz.com/soap-services" xmlns:tns="http://www.xyz.com/soap-services" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ele="http://www.xyz.com/schema/Elements" xmlns="http://schemas.xmlsoap.org/wsdl/"> <import namespace="http://www.xyz.com/schema/Elements" location="Elements.xsd"/> <message name="AMessage"> <part name="aParameter" element="ele:anElement"/> </message> <portType name="APortType"> <operation name="anOperation"> <input message="tns:AMessage"/> </operation> </portType> <binding name="ABinding" type="tns:APortType" > <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http/" namespace="http://www.xyz.com/soap-services"/> <operation name="anOperation"> <input> <soap:body use="encoded" namespace="http://www.xyz.com/soap-services" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> </operation> </binding> <service name="CalypsoService"> <port name="CalypsoPort" binding="tns:ABinding"> <soap:address location="http://www.xyz.com/soap/servlet/rpcrouter"/> </port> </service> </definitions>