1 Reply Latest reply on May 28, 2010 2:35 AM by Magesh Bojan

    Optional elements in soap request

    Pascal Naef Newbie

      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