https://jax-rpc.dev.java.net/issues/show_bug.cgi?id=42 Issue #|42
Summary|SOAPDeserializationContext.verifyEncodingStyle throws
|exception when EncodingStyle not provided from remote
|service
Component|jax-rpc
Version|current
Platform|Macintosh
OS/Version|All
URL|
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|spec
Assigned to|issues@jax-rpc
Reported by|uygaryuzsuren
------- Additional comments from
uygaryuzsuren@... Thu May 28 14:53:51 +0000 2009 -------
Hi,
I'm developing some DII client implementations for a variety of web services.
The reason why I use DII instead of stub approach is that AXIS2 client is not
thread safe (multiple simultaneous calls fail for both single stub and multiple
stubs). I tried jwsdp2.0, but wsimport.sh failed. I may also request an
enhancement for wsimport, too.
The problem in DII client is that when I invoke a Call in a one-way fashion, it
works properly, but when I try to invoke the Call and get the result, an
exception occurs:
"unexpected encoding style: expected=
http://schemas.xmlsoap.org/soap/encoding/,
actual=
at
com.sun.xml.rpc.encoding.SOAPDeserializationContext.verifyEncodingStyle(SOAPDeserializationContext.java:168)
..."
I googled the java code of SOAPDeserializationContext, and I found out that the
verifyEncodingStyle method throws an exception when the encoding style parameter
is not provided by the server.
I can see the purpose of the function verifyEncodingStyle, but in such a case
(when web service doesn't specify the encoding style), one cannot use the web
service in the first place.
I think this is a problem since the client may not be the one who had developed
the service at the server side (just like my case).
So, what should be done in my opinion is either to use the expected encoding
style (
http://schemas.xmlsoap.org/soap/encoding/) when not provided by the
server, or to provide a means for the client developer to be able to substitute
one (the developer may not change the service code at the server but he may ask
the encoding style, or he may already know it).
My suggestion is that the corresponding class be modified in the following way:
SOAPDeserializationContext.java
...
public void verifyEncodingStyle(String expectedEncodingStyle) {
if (expectedEncodingStyle == null ||
expectedEncodingStyle.trim().equals("")) {
expectedEncodingStyle = EXPECTED_ENCODING_STYLE;
//
http://schemas.xmlsoap.org/soap/encoding/ }
...
Thank you in advance
---------------------------------------------------------------------
To unsubscribe, e-mail:
issues-unsubscribe@...
For additional commands, e-mail:
issues-help@...