Hello Shantanu,

In the axis2 conf "axis2.xml" right after <axisconfig name="AxisJava2.0"> the 
entry <module ref="addressing" /> is added.b The axis2Location contains a 
"modules" subdir containing the addressing module.

In code i refer to this config file:

ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem( 
axis2Location , axis2xml);
ServiceClient client = new ServiceClient(ctx, null);
Options options = new Options(); 
options.setMessageId(addressingMessageId);
client.setOptions(options);
OMElement msg = client.sendReceive(getPayload("data"));


private OMElement getPayload(String value) {
           OMFactory factory = OMAbstractFactory.getOMFactory();
           OMNamespace ns = 
factory.createOMNamespace("http://www.tempuri.org","ns1";);
           OMElement elem = factory.createOMElement("ping", ns);
           OMElement childElem = factory.createOMElement("payload", ns);
           childElem.setText(value);
         
           elem.addChild(childElem);
           return elem;
 }


Kind regards,
erwin

-----Oorspronkelijk bericht-----
Van: shantanu chawla [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 18 april 2007 19:28
Aan: [email protected]
Onderwerp: Re: setting wsa:messageId in a Axis2 1.1.1 service


How did u engage / disengage ws-addressing in the client code generated by axis2

Shantanu

On 4/18/07, Erwin Reinhoud <[EMAIL PROTECTED]> wrote:
> Dear users,
>
> I have generated both client and service based on a wsdl. I use ws-addressing 
> and can set these in the client by use of the ServiceClient, but how do i do 
> the same for the service? I let Axis2 generate a skeleton service, but see no 
> way to add wsa header info there. Is the only solution to write you own 
> service?
>
> Thanks in advance.
>
> Kind regards,
>
> Erwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Graduate Student
Department of Computer Science,
San Diego State University

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to