tags:

views:

112

answers:

1

I have a Java WS developed with JAX-WS. This service has only one method with two int parameters as input. Every time I try to call this service the parameters are 0. If I change to type to Integer 0 is transformed in null.

A: 

To figure these things out, you need to trace the messages into and out of the service. If it uses http, then consider a debugging HTTP Proxy like Fiddler2 or (I can't remember the Java version of the proxy). Fiddler2 is not written in Java but it works fine for Java-based apps.

If the service doesn't use HTTP then you'll need some other way to trace the messages.

Normally the problem here is one of XML schema agreement. An incorrect XML namespace on an incoming message will cause the input to be deserialized "null" or zero. Even a one character difference in the namespace - let's say a missing trailing slash - can cause this.

Cheeso