Hi. You must declare type of your fault message. See the example.
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:flt="http://www.otr.com/sufd/cryptoWebService/xml/faultMessage" xmlns:tns="http://www.otr.com/sufd/cryptoWebService" targetNamespace="http://www.otr.com/sufd/cryptoWebService"> <types> <xs:schema targetNamespace="http://www.otr.com/sufd/cryptoWebService"> <xs:element name="signXml" type="xs:base64Binary"/> <xs:element name="signXmlResponse" type="xs:base64Binary"/> </xs:schema> * <xs:schema targetNamespace=" http://www.otr.com/sufd/cryptoWebService/xml/faultMessage">* * <xs:element name="faultDetail">* * <xs:complexType>* * <xs:sequence>* * <xs:element name="fltCode" type="xs:string"/>* * <xs:element name="fltMessage" type="xs:string"/>* * </xs:sequence>* * </xs:complexType>* * </xs:element>* * </xs:schema>* </types> * <message name="faultMessage">* * <part name="faultDetail" element="flt:faultDetail"/>* * </message>* <message name="signXmlRequestMessage"> <part name="xml" element="tns:signXml"> </part> </message> <message name="signXmlResponseMessage"> <part name="sign" element="tns:signXmlResponse"> </part> </message> <portType name="signWebServicePortType"> <operation name="signXml"> <input message="tns:signXmlRequestMessage"/> <output message="tns:signXmlResponseMessage"/> * <fault name="signXmlFaultMessage" message="tns:faultMessage"/>* </operation> </portType> <binding name="signWebServiceBinding" type="tns:signWebServicePortType"> <soap:binding style="document" transport=" http://schemas.xmlsoap.org/soap/http"/> <operation name="signXml"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> * <fault name="signXmlFaultMessage">* * <soap:fault name="signXmlFaultMessage" use="literal"/>* * </fault>* </operation> </binding> <service name="signWebService"> <port name="signWebServicePort" binding="tns:signWebServiceBinding"> <soap:address location="No Target Address"/> </port> </service> </definitions> 2011/10/24 Hugo Terelle <[email protected]> > Hi everybody, > > I need to send a message like the following: > > <?xml version="1.0" ?> > <soapenv:Envelope > xmlns:soapenv="http://www.w3.**org/2003/05/soap-envelope<http://www.w3.org/2003/05/soap-envelope>" > xmlns:ter="http://www.onvif.**org/ver10/error<http://www.onvif.org/ver10/error>" > xmlns:xs="http://www.w3.org/**2000/10/XMLSchema<http://www.w3.org/2000/10/XMLSchema> > "> > <soapenv:Body> > <soapenv:Fault> > <soapenv:Code> > <soapenv:Value>fault code </soapenv:Value> > <soapenv:Subcode> > <soapenv:Value>ter:fault subcode</soapenv:Value> > <soapenv:Subcode> > <soapenv:Value>ter:fault subcode</soapenv:Value> > </soapenv:Subcode> > </soapenv:Subcode> > </soapenv:Code> > <soapenv:Reason> > <soapenv:Text xml:lang="en">fault reason</soapenv:Text> > </soapenv:Reason> > <soapenv:Node>http://www.w3.**org/2003/05/soap-envelope/** > node/ultimateReceiver<http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver> > </**soapenv:Node> > <soapenv:Role>http://www.w3.**org/2003/05/soap-envelope/** > role/ultimateReceiver<http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver> > </**soapenv:Role> > <soapenv:Detail> > <soapenv:Text>fault detail</soapenv:Text> > </soapenv:Detail> > </soapenv:Fault> > </soapenv:Body> > </soapenv:Envelope> > > > But it seems that the SoapFault class doesn't manage everything needed > (like the SubCode object embedded in another SubCode object). > > Can someone provide me some help? > > Greetings, > Hugo Terelle > > >
