A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Web Services
Author
Proper way to define a fault in a WSDL
Bobby Anderson
Ranch Hand
Joined: Oct 28, 2008
Posts: 114
posted
Nov 01, 2009 17:41:45
0
I am having trouble generating a mapping file using
JBoss
's wstools and it is because it does not like my fault I have defined in my wsdl.
I know I should use jax-ws but I have to use jax-rpc for now as I am on a very old legacy system.
here is my wsdl can anyone tell if I am defining the type correctly in the types section and if my fault is correct:
<?xml version="1.0" encoding="UTF-8"?> <definitions name="HelloWorld" targetNamespace="http://hello.org/wsdl/HelloWorld" xmlns:tns="http://hello.org/wsdl/HelloWorld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://hello.org/wsdl/HelloWorld"> <xsd:element name="SayHelloFaultElement" type="xsd:string"/> </xsd:schema> </types> <message name="HelloIF_sayHello"> <part name="String_1" type="xsd:boolean"/> </message> <message name="HelloIF_sayHelloResponse"> <part name="result" type="xsd:string"/> </message> <message name="sayHelloFault"> <part name="fault" element="tns:SayHelloFaultElement"></part> </message> <portType name="HelloIF"> <operation name="sayHello" parameterOrder="String_1"> <input message="tns:HelloIF_sayHello"/> <output message="tns:HelloIF_sayHelloResponse"/> <fault name="fault" message="tns:sayHelloFault"></fault> </operation> </portType> <binding name="HelloIFBinding" type="tns:HelloIF"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="sayHello"> <soap:operation soapAction="http://hello.org/wsdl/HelloWorld/sayHello" /> <input> <soap:body use="literal" namespace="http://hello.org/wsdl/HelloWorld" /> </input> <output> <soap:body use="literal" namespace="http://hello.org/wsdl/HelloWorld" /> </output> <fault name="fault"> <soap:fault use="literal" name="fault" /> </fault> </operation> </binding> <service name="HelloWorld"> <port name="HelloIFPort" binding="tns:HelloIFBinding"> <soap:address location="http://localhost:8080/jaxrpc-simple/simple"/> </port> </service> </definitions>
Thanks!
I agree. Here's the link:
http://aspose.com/file-tools
subject: Proper way to define a fault in a WSDL
Similar Threads
Why would an wsdl document have a targetnamespace attribute set?
Why would an XML document have a targetnamespace attribute set?
How to use wstools in ant
WSDL with overloaded Operations
Problem with arrays of primitive types
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter