I tried creating the OMElement with a QName , but the problem is that in the client code where do I add this OMElement . I tried using client.addHeader(elem); but that does not work . Is there some other method I can use to add it to the outgoing message.
-----Original Message----- From: Narayan S Dhillon [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 5:40 PM To: rampart-dev@ws.apache.org Subject: Re: How to insert NameSpace in the Soap envelop from the client you dont have to declare namespace in soap envelope, it could be defined in your payload element. If you have auto generated the service class from wsdl, then you could declare namespace for your payload inside wsdl schema section; and then generated binding classes will generate namespace qualified elements. If you are not using binding then you could create OMElement with QName. Regards, Narayan On 21/01/2008, Anil Misra <[EMAIL PROTECTED]> wrote: > > Hi Narayan, > > The purpose to add namespace is to get the payload elements having > a namespace tag like: mytag:<element> , now "mytag" is not defined and > is giving ,me error. And to add this to the soap envelop I need to > method to be able to get the soap envelope from the client. How could I > do this ? , I would appreciate your reply. > > Thanks, > -Anil > > > -----Original Message----- > From: Narayan S Dhillon [mailto:[EMAIL PROTECTED] > Sent: Friday, January 18, 2008 7:00 PM > To: rampart-dev@ws.apache.org > Subject: Re: How to insert NameSpace in the Soap envelop from the client > > Hi Ramesh, > > What is the purpose of adding the namespace? Are you trying to get all > your > payload elements namespace qualified? for later you could use > elementFormDefault="qualified" > in xml schema. > > Regards, Narayan > > On 17/01/2008, Anil Misra <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > I followed the sample 04 of rampart module and implemented the > > client. I got the following message from the monitor : > > > > > > > > POST /iarws/services/TransactionService HTTP/1.1 > > > > Content-Type: text/xml; charset=UTF-8 > > > > SOAPAction: "myAction" > > > > User-Agent: Axis2 > > > > Host: localhost:7002 > > > > Transfer-Encoding: chunked > > > > > > > > 5f3 > > > > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:wsa="http://www.w3.org/2005/08/addressing"><soapenv:Header> > > > > <wsse:Security > > > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse > > curity-secext-1.0.xsd" soapenv:mustUnderstand="1"><wsu:Timestamp > > > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec > > urity-utility-1.0.xsd" > > > wsu:Id="Timestamp-367156"><wsu:Created>2008-01-17T18:35:12.241Z</wsu:Cre > > > ated><wsu:Expires>2008-01-17T18:40:12.241Z</wsu:Expires></wsu:Timestamp> > > ....................... > > > > > > > > > > > > I want to include a NameSpace in the < soapenv:Envelope .. tag . > > like xmlns:myspace=http://.... <http://..../> > > > > > > > > How would I be able to do so in the client code. Any help would be > > appreciated. > > > > > > > > Thanks, > > > > -Anil Misra > > > > > > > > >