I’m trying to access an external web service with SOAPClient but I’ve some trouble with optional elements in SOAP request.
After setting value of mandatory element with OGNL the request contains all optional elements too. Additionally there are some line breaks like below.
<!--Optional:-->
<EXTENSIONOUT>
<!--Zero or more repetitions: - cloned-->
</EXTENSIONOUT>
<MATERIAL>000000000000000023</MATERIAL>
<!--Optional:-->
<INTERNATIONALARTNOS>
<!--Zero or more repetitions: - cloned-->
</INTERNATIONALARTNOS>
Is there a way to remove the optional elements from request with OGNL or do I need to transform (xslt, smooks) the payload to get desired request? This is necessary because web service has problems to parse line breaks. Also it generates unnecessary traffic.
There is a similar thread without an answer (https://community.jboss.org/message/523039).
Thx a lot for help
Pascal
Hi Pascal, we do not have this facility at this moment.
This will be incorporated via https://jira.jboss.org/browse/JBESB-1553
In the meantime you can try using the wise SOAPClient approach. See webservice_consumer_wise quickstarts.