JAX-WS server-side SOAPHandler that returns fault gets “Internal Error” on WebSphere v8

后端 未结 5 863
春和景丽
春和景丽 2021-02-05 12:04

I have a server-side JAX-WS SOAPHandler (on WebSphere v8) that in certain cases needs to respond to the client with a SOAP response that it has in a String variable

相关标签:
5条回答
  • 2021-02-05 12:45

    I had the same issue after upgrading the WAS FP 8.5.5.10 to 8.5.5.12. We had two Services with exactly same method name but different targetNameSpace,like DomainService1 has 'get' method and DomainService2 also has 'get' method, but WAS 8.5.5.12 throws this exception and doesn't give any clue to find the root cause. Apparently WAS is more strict in recent version with the naming of the methods.

    This was the exception: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: An internal assertion error occurred. The com.xxx.web.myapp.services.jaxws.GetResponse JAXB object does not have a xxxxxStatus xml

    After changing the name of the method specific to each service 'getABC' and 'getPQR' it worked!!!

    hope this works!

    0 讨论(0)
  • 2021-02-05 12:51

    WebSphere starting with version 8 has a default enabled security feature, just returning the message "Internal Error". This is done to "preventing detailed information regarding why inbound message processing failed from being returned to message senders". Search for "webservices.unify.faults"

    To disable this feature, add a -Dwebservices.unify.faults=false to your JVM custom properties.

    0 讨论(0)
  • 2021-02-05 12:53

    This error can be resolved by disabling the generic Fault handling feature on IBM Websphere Application Servers.

    In order to disable this property navigate to the Admin Console > Servers > Application Servers > > Process Definition > Java Virtual Machine > Custom Properties.

    Enter the Key as 'webservice.unify.faults' and value as 'false'.

    Once updated restart your server and install the EARs to get the Custom WSDL errors for your SOAP transactions.

    0 讨论(0)
  • 2021-02-05 12:59

    The actual problem is not the missing caused by exception, it is rather a unified fault handling in websphere:

    http://www-01.ibm.com/support/docview.wss?uid=swg1PM58524

    Either use the described workaround or install at least 8.0.0.4

    0 讨论(0)
  • 2021-02-05 13:10

    I had the same problem and was able to solve it by disabling the unified fault handling (it's not a bug, it's a feature!).

    On the WAS Developer console

    https://<yourhost>/<yourport>/ibm/console/login.do
    

    do as described here (for WAS8):

    Click Servers > Server Types. , and either WebSphere application servers > server_name or WebSphere proxy servers > server_name. Next, in the Server Infrastructure section, click Java and process management > Process definition , and select either Control, Servant, or Adjunct. Then click Java virtual machine > Custom properties.

    There, add a new property webservices.unify.faults and set the value to false.

    0 讨论(0)
提交回复
热议问题