0

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?

Mai Hữu Lợi
  • 559
  • 2
  • 8
  • 18
  • That doesn't look like the whole stack trace. Usually there's a "Caused by" exception further down in the stack, which should tell you the problem. If this is all you have, your only hope is to run through the debugger and see what happens when the exception is thrown. – Brad Sep 12 '16 at 03:59
  • I have updated for the full stack, I was trying to make it less confusing. I can do debug due to service only reachable when deploying the Jaxws client side on Linux which has special configuration. – Mai Hữu Lợi Sep 12 '16 at 04:08
  • *** I can not do debug **** Edit above comment – Mai Hữu Lợi Sep 12 '16 at 04:14
  • If you can convince the server admins, you can remote debug a Java process. They have to add a few options to the server's startup configuration, see [this question](http://stackoverflow.com/questions/975271/remote-debugging-a-java-application). – Brad Sep 12 '16 at 04:18

1 Answers1

1

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.

Ramachandran.A.G
  • 4,788
  • 1
  • 12
  • 24
  • Thank you, I have block to catch the Exception already, that's where I get the stack trace as from the Post. I googled for "Error in operation", but seem there is no type of that message from JAXWS, so I guess it is custom by the provider of the service. – Mai Hữu Lợi Sep 12 '16 at 04:03
  • 1
    Got it. May be just to check , you could try getFault and see if you get any further details that have been added in SOAPFault – Ramachandran.A.G Sep 12 '16 at 04:05
  • Ok, let me try, I will post result here – Mai Hữu Lợi Sep 12 '16 at 04:13