JAXWS style Web Service client jar not working inside a webapp
I have created a web service client project with the netbeans 6.9.1. The jar works like a charm when I run it directly from netbeans or from the console with java -jar. But when I put this jar into a webapplication as a library, It doesn't work. Actually, here is the weird thing about it, I have monitored the network traffic and saw that the responses on both sides are the same, but somehow when the jar is inside a webapp or working from an application server it doesn't manages to parse the response I think.
Long story in short,
The web service client code generated inside netbeans jaxws style(2.1) works by itself, But when it's called inside a web application within an application server , the response methods such as getsomething which resides in the response as sdfds doesn't work, but they work when runned separately. And the responses are exactly the same when I monitor the network traffics.
Can anyone help about this weird situation.
Thanks.
Edit: Also I discovered an exception: com.sun.xml.internal.messaging.saaj.soap.impl.TextImpl cannot be cast to javax.x开发者_如何学运维ml.soap.SOAPElement
Which is not thrown anywhere in my local, bu only running at application servers. Tomcat or weblogic , both.
I encountered the exact sample problem in my SOAPHandler class. It turned out that the white space in the SOAP body is what cause this problem. Below are my SOAP request example from SOAPUI: username password 1 usa 75044 vn usa 75034
SOAP request without white space in SOAP body: username password 1usa75044vnusa75034
精彩评论