Mai Hữu Lợi
Mai Hữu Lợi

Reputation: 569

When javax.xml.ws.soap.SOAPFaultException happen?

My code to call to a port name getDUNSProfile() looks like this:

public class LookupRequestProcessor 
{
  protected GetCleanseMatchResponse sendRequest(Request request) throws Exception_Exception, GetDUNSProfileFault, PayloadException
  {
    return DNBPortUtil.getDunsService().getDUNSProfile();
  }
}

And I receive an exception as below (Updated with full stacktrace)

    java.lang.Error: javax.xml.ws.soap.SOAPFaultException: Error in operation: 
        at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:478)
        at imx.svb.TemplateDatablockProcessor.run(TemplateDatablockProcessor.java:63)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.ws.soap.SOAPFaultException: Error in operation: 
        at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
        at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
        at com.sun.proxy.$Proxy97.getDUNSProfile(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
        at com.sun.proxy.$Proxy98.getDUNSProfile(Unknown Source)
        at imx.svb.module.getdunsprofile.LookupRequestProcessor.sendRequest(LookupRequestProcessor.java:258)
        at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:472)

Does this mean I called successfully to the port? Or still not reaching it?
Is the message Error in operation from exception returned by the The WS server?

Upvotes: 0

Views: 36739

Answers (1)

Ramachandran.A.G
Ramachandran.A.G

Reputation: 4948

Chances are you have reached the Port. Referencing the documentation of the Fault and this thread on code ranch seems to suggest that a fault is being thrown from the provider of the service. In your code can you add a block to catch the Exception and get the SOAPFault being thrown when invoked. If the fault is well handled , it should ideally give you a reason / code as to why the exception is happening.

Upvotes: 1

Related Questions