I built a server web-service application in Jdeveloper 11.1.1.7 and deploy it on weblogic 10.3.6 to serves external partner requests.
I tested the application using SoapUI tool and every thing working fine and I am getting proper response from the server.
Use case:
1- Client can not get proper response from the server. They always getting internal server error 500
2- I faced this issue before with other clients because the client was not sending the write xml format which acceptable by the server. Problem is fixed that time when they start sending the right xml format.
3- From the logs I can see the following stack (part of it): (from Google I knew there is something wrong with the xml which client is sending to the server: wso2 - How can i handle this in Wso2ESB which is not passing Respone to Client - Stack Overflow)
4- Now I need a way to know exactly what is reaching my server as xml. Is there any way to log the xml requests coming to weblogic server. Without knowing what is coming to the server I will not know what is goes wrong in the xml file.
<Error> <com.sun.xml.ws.transport.http.HttpAdapter> <BEA-000000> <Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [10,16]
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [10,16]
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:295)
at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:294)
at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:102)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:519)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:253)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:141)
at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:172)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
at weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:311)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:336)
Update 1: I found that I need to add the following lines of code to enable server logging. But I thing the execution is not reaching them and fail before that. Any idea how to set them in before running any request. May be in jdeveloper or weblogic server?
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("javax.net.debug", "true");
Update 2: I just need to set the following java proprieties ( -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true) in the setDomainEnv file this for the server side see this link: How to Log Request and Response With Java JAX-WS web-service Server and Client? But how to log them nicely in files not simply outputting them in the console ?