I didn't notice this before -- there's another problem in your WSDL. A Fault assumes document style, therefore your MyException wsdl:message definition should reference an element definition rather than specify a type definition. You also should remove the encodingStyle and namespace attributes from the soap:fault definition.
 
Anne
----- Original Message -----
Sent: Tuesday, July 29, 2003 9:54 PM
Subject: Re: soap fault and WSDL2Java question

I found the error. I did not have the name attribute of wsdl:fault. I was focusing on the name attribute of the soap:fault, which is not really required:

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

I can run WSDL2Java with the above change without any problem. But CapeClear does not validate this unless I add a name attribute to the soap:fault. Is the name attribute required in soap:fault? I looked at the WSDL spec. section 3.6, but I am still not clear if it is mandatory.


Shantanu Sen
Shantanu Sen <[EMAIL PROTECTED]> wrote:Anne,

Thanks. But even with that change I get the same
error. It seems that javax.xml.BindingFault.getName()
returns null. I am not sure why it is not picking up
the name attribute. I could not step into that part of
the code which is creating the Bindi! ngFault, which is
in the wsdl4j.jar

Thanks,
Shantanu

--- Anne Thomas Manes wrote:
> Shantanu,
>
> The name= attribute should specify a nmtoken, not a
> QName.
> Therefore your WSDL definition should read:
>
> > namespace="http://MyService"
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> />
>
> Regards,
> Anne
>
> ----- Original Message -----
> From: "Shantanu Sen"
> To:
> 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 "MyOper! ation", 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 fi! le is attadched, but here is the
> relvant
> > section:
> >
> >
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >
> > [input]
> > > > namespace="http://MyService"
> >
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> >
> > > > namespace="http://MyService"
> >
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> >
> > > > namespace="http://MyService"
> >
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > />
> >
> >
> >
> >
> >
> > 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 ig! nores the
> name
> > attribute in a soap fault declaration.
> >
> > Any ideas what I am missing?
> >
> > Thanks,
> > Shantanu Sen
>
>
>
----------------------------------------------------------------------------
> ----
>
>
> >
> >
> > > > 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/">
> >
> >
> >
> >
> >
> >

> >
> >
> >
> >

> >
> >
> >
> >

> >
> >
> >
> >

>! ; >
> > [input]
> >
> > > message="tns:MyException"/>
> >
> >

> >
> >
> >
> > > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >
> > [input]
> > > namespace="http://MyService"
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> >
> > > namespace="http://MyService"
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> >
> > > namespace="http://MyService"
>
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> />
> >
> >
> >
> >
> >
> >
> >

> > >
location="http://localhost:8084/webservice/Test//Web+Input+Proxy"/>
> >

> >
> >
> >
> &g! t;
> >
>

Reply via email to