Hello,
I have a problem calling a webservice from ESB with SoapUI, when optional parmeters are not set. Optional parameter means, that the schema part of the WSDL has an attribute minOccurs="0", like in the generated WSDL when you deploy a EJB3-SSB annotated with @WebService in JBossAS. For calling this service from ESB with SoapUI, I defined an OGNL-Mapping for all parameters. But it may be that I have a mapping, but no value in the incoming ESB-Message. Then the OGNL-Mapping resolves in an empty XML-Tag in the SOAP-Request. And now its up to the SOAP-Library on the server side what happens. With JBossWS from JBossAS 4.2.3 I got the following results:
A not defined Integer generates a call to the setter on the server side with an Integer of value 0
A not defined String generates a call to the setter on the server side with an empty String ("")
A not defined XMLGregorianCalendar, which is defined as xs:timestamp in the WSDL, results to no call to a setter method.
This means it depends on the type if an unset parameter value on the client side generates a call to a setter method on the server. Is this a known behavior? Is there a possibility to delete the empty XML-Tags from the request? It should be possible to use a Smooks-Transformation in the SoapUI-Action for this, but I don't know if this is the preferred way or if the generation of empty XML-Tags is a bug.
Thanks for your help,
Bernd