2 Replies Latest reply on Jun 25, 2008 11:22 PM by sdjn5337

    How to set attribute in SOAP message

    sdjn5337

      I'm looking the use of SOAPClient. But I get a problem about this.
      I use JbossESB 4.3GA

      jboss-esb.xml

      <action name="test"
      class="org.jboss.soa.esb.actions.soap.SOAPClient">
      <property name="wsdl"
      value="http://localhost:18080/test?wsdl"/>
      <property name="SOAPAction" value="testMethod"/>
      </action>


      use code
      map.put("customerOrder.header.customerNumber","123456")

      can generate the SOAP message
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:cus="http://schemas.acme.com">
      <soapenv:Header/>
      <soapenv:Body>
      <cus:customerOrder>
      <cus:header>
      <cus:customerNumber>123456</cus:customerNumber>
      </cus:header>
      </cus:customerOrder>
      </soapenv:Body>
      </soapenv:Envelope>


      If I want to generate the SOAP message like
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:cus="http://schemas.acme.com">
      <soapenv:Header/>
      <soapenv:Body>
      <cus:customerOrder>
      <cus:header cus:customerNumber="123456"> header text
      </cus:header>
      </cus:customerOrder>
      </soapenv:Body>
      </soapenv:Envelope>

      How should I do?