Loading ...
Sorry, an error occurred while loading the content.

Adding header and data elements to envelope

Expand Messages
  • joel.thoren
    Hello the list ! I m using perl to create a client that is expected to exchange quite extensive xml structure according to the soap v 1.1 standard. According
    Message 1 of 1 , Dec 13, 2007
    View Source
    • 0 Attachment
      Hello "the list" !

      I'm using perl to create a client that is expected to exchange quite
      extensive xml structure according to the soap v 1.1 standard.
      According to the specification I'm supposed to send something like
      this

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="..." xmlns:wsu="...">
      <soap:Header>
      <wsha:MyHeader1 ... >
      .
      .
      </wsha:MyHeader1>
      <wsha:MyHeader2 ... >
      .
      .
      </wsha:MyHeader2>
      </soap:Header>
      <soap:Body wsu:Id="BusinessMessage">
      <!-- all xml in body is precompiled and should only be inserted -->
      <?xml version="1.0" encoding="utf-8"?>
      <SwInt:ExchangeRequest>
      .
      .
      </SwInt:ExchangeRequest>
      </soap:Body>
      </soap:Envelope>

      1) The body payload is availble as precompiled xml.
      http://www.soaplite.com/2003/05/composing_messa.html shows how to
      encapsulate raw xml into a soap::Data element but I don't manage to
      include it into the Body exactly as depicted above. Any advices?

      2) What is an overall appropriate approach when I want to add a few
      headers and then also an extensive precompiled xml body. I manage to
      prepare my headers in soap::Header elements in separate variables and
      also my xml body payload in a soap::Data element according to the
      method described in link under point 1 but my main problem is to
      compile it all into one correct soap envelope.

      Some advices here would be most appreciated.

      Kind Regards, Joel
    Your message has been successfully submitted and would be delivered to recipients shortly.