axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <a...@manes.net>
Subject Re: soap fault and WSDL2Java question
Date Tue, 29 Jul 2003 23:21:53 GMT
Shantanu,

The name= attribute should specify a nmtoken, not a QName.
Therefore your WSDL definition should read:

<soap:fault  name="MyF"  use="encoded" namespace="http://MyService"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

Regards,
Anne

----- Original Message -----
From: "Shantanu Sen" <ssen@pacbell.net>
To: <axis-user@ws.apache.org>
Sent: Tuesday, July 29, 2003 7:05 PM
Subject: soap fault and WSDL2Java question


> When I use the following WSDL file, I get this error,
> even though the WSDL is validated by Cape Clear WSDL
> editor, and I see the name attribute is there.
>
> java.io.IOException: ERROR: Fault is missing a name=
> attribute in operation "MyOperation", in binding
> {http://MyService}rpc-encoded.        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(Symb
> olTable.java:1988)        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolT
> able.java:1801)        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:577)        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:421
> )        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:408)        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:393)        at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
>         at java.lang.Thread.run(Thread.java:479)
>
> The WSDL file is attadched, but here is the relvant
> section:
>
> <binding name="rpc-encoded" type="tns:MyPort">
>     <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="MyOperation">
>       <soap:operation soapAction="MyOperation"/>
>       <input>
>         <soap:body use="encoded"
> namespace="http://MyService"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded"
> namespace="http://MyService"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>       <fault>
>         <soap:fault  name="tns:MyF"  use="encoded"
> namespace="http://MyService"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> />
>       </fault>
>     </operation>
> </binding>
>
>
> I am declaring the name attribute here, as you can
> see. But with Axis 1.1 I get the above error. It runs
> fine with Axis 1.0, which, I believe ignores the name
> attribute in a soap fault declaration.
>
> Any ideas what I am missing?
>
> Thanks,
> Shantanu Sen


----------------------------------------------------------------------------
----


> <?xml version="1.0" ?>
>
> <definitions name="http://MyService"
>              targetNamespace="http://MyService"
>              xmlns:tns="http://MyService"
>              xmlns:typens="http://MyService"
>              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>              xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>              xmlns="http://schemas.xmlsoap.org/wsdl/">
>
>   <!-- type defs -->
>
>   <!-- message declns -->
>   <message name="MyRequest">
>     <part name="subject" type="xsd:string"/>
>   </message>
>
>   <message name="MyResponse">
>     <part name="confirmation" type="xsd:string"/>
>   </message>
>
>   <message name="MyException">
>     <part name="exception" type="xsd:string"/>
>   </message>
>
>   <!-- port type declns -->
>   <portType name="MyPort">
>     <operation name="MyOperation">
>       <input message="tns:MyRequest"/>
>       <output message="tns:MyResponse"/>
>       <fault name="MyF" message="tns:MyException"/>
>     </operation>
>   </portType>
>
>   <!-- binding declns -->
>   <binding name="rpc-encoded" type="tns:MyPort">
>     <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="MyOperation">
>       <soap:operation soapAction="MyOperation"/>
>       <input>
>         <soap:body use="encoded" namespace="http://MyService"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" namespace="http://MyService"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>       <fault>
>         <soap:fault  name="tns:MyF"  use="encoded"
namespace="http://MyService"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>       </fault>
>     </operation>
>   </binding>
>
>   <!-- service decln -->
>   <service name="MyProvider">
>     <port name="MyPort" binding="tns:rpc-encoded">
>       <soap:address
location="http://localhost:8084/webservice/Test//Web+Input+Proxy"/>
>     </port>
>  </service>
>
> </definitions>
>
>


Mime
View raw message