Per the SOAP Binding Schema [1], the name attribute is required in the soap:tFault type:
<xs:complexType name="tFault"> <xs:complexContent> <xs:extension base="soap:tFaultRes"> <xs:attribute name="name" type="xs:NCName" use="required" /> </xs:extension> </xs:complexContent> </xs:complexType> Likewise, per the WSDL Schema [2], the name attribute is also required in the wsdl:tFault type: <xs:complexType name="tFault"> <xs:complexContent> <xs:extension base="wsdl:tExtensibleAttributesDocumented"> <xs:attribute name="name" type="xs:NCName" use="required" /> <xs:attribute name="message" type="xs:QName" use="required" /> </xs:extension> </xs:complexContent> </xs:complexType> [1] http://schemas.xmlsoap.org/wsdl/soap/ [2] http://schemas.xmlsoap.org/wsdl/ Regards, Anne ----- Original Message ----- From: Shantanu Sen To: [EMAIL PROTECTED] 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; > > >