Jump to content


  • Posts

  • Joined

  • Last visited

nvpapworth's Achievements


Newbie (1/7)



  1. Ah that's perfect. That's what I was hoping was in the specs somewhere, but I missed it. And that probably is why we couldn't find a way to do it, it's not valid ! Many thanks for your valuable time.
  2. Thanks for that. It's a bizarre environment. The actual SOAP client application is bypassing the WSDL itself, and using an HTTP client to send generated SOAP envelope/body elements. Which means that, for example, in the WSDL it can say a parameter is 5-10 digits. But they can send 20 if they want and the server gets it. If they were using a proper client and WSDL I assume the client wouldn't even send it (and would generate a local error/fault). It's these kind of errors I need to trap. Just plain wrong in my opinion. Then they want an application error saying "parameter XXX is too long". gSOAP in this case is picking this up perfectly and sending a <Fault> back ! From what information I could find on <Fault> I didn't see anything that said anywhere that if included if must be the only thing in the <body> etc., which I was hoping to find.
  3. I'm relatively new to SOAP, so please forgive any lack of knowledge I should have... We have a server application with a SOAP interface, and the SOAP operation response data contains an element which is a complex type, which looks something like : <myResult code="123" description="invalid parameter NAME"> When (for any reason) the server fails to process, or reject a request, at the SOAP level, which results in a Fault element to be in the response, the client would also like to receive an appropriate application response data element like in <myResult> above. My question is this, when a response is sent (presumably with an HTTP response code of 500) containing a Fault element, is it allowed/recommended to ALSO include application level response data ? The Fault can/does contain enough information, basically the same information. For example, is this kind of response allowed, a basic Fault with a <myResult> element added : <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Server Error</faultstring> <detail> ... </detail> </SOAP-ENV:Fault> <myResult code="123" description="invalid parameter NAME"> </SOAP-ENV:Body></SOAP-ENV:Envelope> As background we are using gSOAP, and when a SOAP error occurs, a callback function is called, and the Fault element populated. What we may need to implement is something that grabs the <faultcode> and <faultstring> and puts this into the <myResult> element attributes, but I'm not sure if this is "allowed" or recommended...
  • Create New...