jax ws - ServerSOAPFaultException and how to read it? -
i did request , program spit out
warning: input action on wsdl operation search , @action on associated web method search did not match , cause problems in dispatching requests exception in thread "main" com.sun.xml.internal.ws.fault.serversoapfaultexception: client received soap fault server: client error please see server log find more detail regarding exact cause of failure. @ com.sun.xml.internal.ws.fault.soap11fault.getprotocolexception(soap11fault.java:178) @ com.sun.xml.internal.ws.fault.soapfaultbuilder.createexception(soapfaultbuilder.java:124) @ com.sun.xml.internal.ws.client.sei.stubhandler.readresponse(stubhandler.java:238) .... i see via mitmproxy server sent back
<?xml version='1.0' encoding='utf-8'?> <!--pageview_candidate--> <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soapenv:body> <soapenv:fault> <faultcode>soapenv:client</faultcode> <faultstring>client error</faultstring> <faultactor>http://api.bing.net:80/soap.asmx</faultactor> <detail> <errors xmlns="http://schemas.microsoft.com/livesearch/2008/03/search"> <error> <code>1001</code> <message>required parameter missing.</message> <helpurl>http://msdn.microsoft.com/en-us/library/dd251042.aspx</helpurl> <parameter>searchrequest.appid</parameter> </error> <error> <code>1001</code> <message>required parameter missing.</message> <helpurl>http://msdn.microsoft.com/en-us/library/dd251042.aspx</helpurl> <parameter>searchrequest.sources</parameter> </error> </errors> </detail> </soapenv:fault> </soapenv:body> </soapenv:envelope> how read first bit , details in second bit? don't have access server log, in, log on server hosts web service.
i notice xml elements inside of soapenv:fault don't have xmlns. how soap errors reported back? nonstandard way things? going have rely on mitmproxy debug these kinds of problems web services?
you must create soaphandler intercept soap response/fault.
use tutorial learn how create handler , register service port:
http://www.mkyong.com/webservices/jax-ws/jax-ws-soap-handler-in-client-side/
then remember override handlefault(soapmessagecontext) method intercept server faults.
Comments
Post a Comment