Thx Paul!!
You were right...
It was this stupid error
 
Thx a lot
 
 
----- Original Message -----
Sent: Monday, July 31, 2006 5:18 PM
Subject: Re: [AXIS2] ReferenceParameter

Fabien

I think maybe its a simple code mistake.

You never do sender.setOptions(options) in the code you are showing here.
So the options you are setting up arent used.

Paul

On 7/31/06, Fabien Couble <[EMAIL PROTECTED]> wrote:
Hi all,
I have a problem with the addressing module!!!
Actually this is the code of my client:
 
   WSTransferServiceStub stub = new WSTransferServiceStub(configContext, "http://localhost:8080/axis2/services/WSTransferService ");
   ServiceClient sender = stub._getServiceClient();
   
   EndpointReference epr = new EndpointReference("http://localhost:8080/axis2/services/WSTransferService ");
   epr.addReferenceParameter(new QName("wsman=http://schemas.xmlsoap.org/ws/2005/06/management","ResourceURI"), "http://harddisk" );
   epr.addReferenceParameter(new QName("wsman=http://schemas.xmlsoap.org/ws/2005/06/management","SelectorSet"), "3" );
   
   System.out.println("EPR = "+ epr.ListReferenceParameters());

   Options options = new Options();
   options.setTo(epr);
   options.setAction("http://schemas.xmlsoap.org/ws/2004/09/transfer/GET ");
   
   stub._setServiceClient(sender);
 
The SOAP message generated is the following:
<?xml version='1.0' encoding='utf-8'?>
    <soapenv:Header>
        <wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo>
        <wsa:MessageID>urn:uuid:BA4666E7C889EB8DB711543552270621</wsa:MessageID>
        <wsa:Action>Get</wsa:Action>
    </soapenv:Header>
    <soapenv:Body>
        <Get />
    </soapenv:Body>
</soapenv:Envelope>
 
The problem is that my reference parameters are not added to the SOAP message.
I have checked into the code and it is due to a null reference in the method processToEPR of the addressing module.
Moreover, the Action field is strange because it is not http://schemas.xmlsoap.org/ws/2004/09/transfer/GET.
 
Personnally, I think the problem is located in the method _setServiceClient.
 
First of all, I'd like to know if I'm using the correct way to do this!!
Secondly, I'd like to know if you have heard about this possible problem.
Any advices is welcome!
 
Thx a lot
Fabien
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.




--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Reply via email to