.Net WCF Service and Java Client - Handling SOAP Fault -


I am implementing a WCF Web Service (SOAP based) using the Java client. Customer AAPA CXF is generated using the wsdl2java utility when the driven service responds with a mistake, so I am not able to use it (javax.xml.ws.soap.SOAPFaultException) to capture it, however when I I start using the service, I see a valid soap reaction with the fault envelope. Code snippet: Try

  {iServiceInterface.postDataToSPOnline (USERNAME, PASSWORD, loExpense); } Hold (SOAPFaultException soap) {try {// does not include System.out.println ("SOAPFaultException"); } Hold (exception extension) {// does not include System.out.println ("exception"); } At the end of the {// Control Service system, here comes after calling. Out.println ("Finally"); }  

Soapiae response to returning a mistake in the service:

  & lt; S: envelope xmlns: s = "http: // schema .xmlsoap.org / soap / envelope /" & gt; & Lt; S: body & gt; & Lt; S: defect & gt; & Lt; Faultcode xmlns: a = "http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher" & gt; A: Internal service service & lt; / Faultcode & gt; & Lt; Fault string xml: lang = "en-US" & gt; Object references are not set to an instance of an object. & Lt; / Faultstring & gt; & Lt; Expansion & gt; & Lt; Exception DSTMLX = "http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns: i = "http://www.w3.org/2001/XMLSchema-instance" & gt; & Lt; HelpLink i: nil = "true" /> & Lt; InnerException i: nil = "true" /> & Lt; Message & gt; Object references are not set to an object instance. & Lt; / Message & gt; & Lt; StackTrace & gt; On the system Servicemodel. Dispatcher. MessageRPC Processes (Boolean IoporticocontaxSet) & lt; / StackTrace & gt; & Lt; Type & gt; System.NullReferenceException & lt; / Type & gt; & Lt; / ExceptionDetail & gt; & Lt; / Extension & gt; & Lt; / S: defect & gt; & Lt; / S: Body & gt; & Lt; / S: envelope & gt; 


Comments