I have tried to use a web service that requires the following kind of
request envelope:

... the header left out ...
<myprefix:someMethod xmlns:myprefix="whatever">
  <top>
          <head1>
                 <something>Hello</something>
                 <somethingelse>World</somethingelse>
          </head>
          <head2>
                 <here>Here</here>
                 <iam>I am</iam>
          </head2>
  </top>
</myprefix:someMethod>

I tried to build this request using literal XML encoding style, and it
doesn't seem to work. I can add a Parameter object to the Call, giving
it a name ("top") and passing in an Element object. If the passed
Element already contains a <top> element, I end up with two of them in
the request:
<top>
<top>
...
</top>
</top>

But I cannot just add the two contained elements, because they are two
elements! So how would I build a request structure like the one shown
above? Unless I am overlooking something here (and I hope I do), this
encoding style cannot be used if the request structure contains two or
more children within the root element. Which is a pretty common case.

Any help is greatly appreciated.
Andre



Reply via email to