I'm calling a web service inside my java program using the JAX-RPC generated artifacts. I want to remove value of a Date field. It accepts a Calendar object and I tried to pass it null as below but no luck
When I use SoapUI, I only need to pass it an empty tag as below
and it worked fine but I don't know how to do it in java.
I've heard you can use the ObjectFactory of JAXB to do this but I have no clue on how to do it. Can you help me please?
What is the result if you supply null as the date parameter?
The problem with generated artifacts, be it JAX-WS or JAX-RPC, is that they help you construct the XML of the request message to be sent to the service.
You have no control over the actual XML generation, except for the parameters you pass in to the generated code.
To obtain a greater degree of influence over the XML generation, you should use a more low-level approach to send XML requests. In JAX-WS you would obtain an object that implements the Dispatch interface. I do not do JAX-RPC, but I think the name of the interface is the same.