You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Abdul Majith <am...@rightworks.com> on 2000/11/24 23:05:30 UTC

How to send java object parameters to Soap Server using apache so ap?

Hi,
   pls help me out in sending the Hashmap object parameter to soap server
and if so how to encode it.pls give me some ex.program for that.
      Thanks in advance.
       Majith
-----Original Message-----
From: Maarten Coene [mailto:MacBelgium@ToughGuy.net]
Sent: Friday, November 24, 2000 6:27 AM
To: soap-dev@xml.apache.org
Subject: SOAP Headers


Hi,

what is the easiest way to create the following SOAP header using Apache
SOAP.

<SOAP-ENV:Header>
         <t:Transaction xmlns:t="some-URI">5</t:Transaction>
</SOAP-ENV:Header>

I could make the above without the namespace declaration, but I don't find 
a way to create it with the namespace declaration. Even though my code 
works, I think there must be an easier way of doing this. My code for 
creating the above header without the namespaces looks like this:

Call call = new Call();
Header header = new Header();

Vector entries = new Vector();
DocumentImpl doc = new DocumentImpl();
ElementNSImpl entry = new ElementNSImpl(doc, "Transaction");
TextImpl entrydata = new TextImpl(doc, "5");
entry.appendChild(entrydata);
entries.addElement(entry);
header.setHeaderEntries(entries);

call.setHeader(header);

thx

Maarten



--
Maarten Coene
K.U.Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee