Jamie Lyon wrote:
Okay, this now works fine for adding parameters for things such as
replyto, however does Axis2/C support binding message address
properties, as per the spec below?
http://www.w3.org/TR/ws-addr-soap/#bindrefp

I've tried doing the following:
axiom_node_t* node = NULL;
axiom_namespace_t* ns = axiom_namespace_create( this->axisEnv,
"http://nsuri";, "prefix" );
axiom_element_t* element = axiom_element_create( this->axisEnv, NULL,
"EleName", ns, &node );
axiom_element_set_text( element, this->axisEnv, "sometext", node );

axis2_endpoint_ref_t* endpointRef = axis2_endpoint_ref_create(
this->axisEnv, this->endpoint.c_str() );
axis2_endpoint_ref_add_ref_param( endpointRef, this->axisEnv, node );
axis2_options_set_to( options, this->axisEnv, endpointRef );

But no reference parameters are added.

Any suggestions?
Looks like there is a bug here, when you set the ref, params to to header.
However, because the ref params should go in the header as normal headers, a workaround is to use axis2_svc_client_add_header function on top of service client instance.

HTH.

Regards,
Samisa...
Thanks,
Jamie

-----Original Message-----
From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED]
Sent: 13 August 2007 06:07
To: Apache AXIS C User List
Subject: Re: WS-Addressing : Adding reference parameters?

Jamie Lyon wrote:
Hi,

Is there anything special you need to do to add a reference
parameter
other than what's contained in the following block?

--------------------

axiom_node_t* node = NULL;

axiom_namespace_t* namespace = axiom_namespace_create(
this->axisEnv,
"http://url/";, "prefix" );

axiom_element_t* element = axiom_element_create( this->axisEnv,
NULL,
"ConversationID", namespace, &node );

axiom_element_set_text( element, this->axisEnv, "some text", node );

axis2_options_add_reference_parameter( options, this->axisEnv, node
);
--------------------

I do this just before sending the message using
axis2_svc_client_send_receive. All other ws-addressing elements are
present (To, Action, MessageID), plus ws-security, just not the
reference parameter I just created.

In the addressing spec, as I understand, the reference parameters are
sent associated to the addressing elements such as RplyTo.
Hence you have to do something like:
endpoint_ref = axis2_endpoint_ref_create(env,

"http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_
OU
T_IN__");
axis2_endpoint_ref_add_ref_param(endpoint_ref, env, node);
axis2_options_set_reply_to(options, env, endpoint_ref);

This will ensure that the given node is sent as a ref param in the
replyTo headrer. This was done in sync with the test cases given here:
http://www.w3.org/2002/ws/addr/testsuite/testcases/

axis2_options_add_reference_parameter in-fact is an outdated method,
and
really does nothing. It is a bug to have that in the header and should
be removed.

Thanks,
Samisa...
Any ideas?

Thanks,

Jamie

--
Samisa Abeysinghe : WSO2 WSF/C

"http://wso2.org/projects/wsf/c?WSO2 Web Services Framewo
rk
/C -

 Open source C library for providing 
an
d consuming Web services"


---------------------------------------------------------------------
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]




--
Samisa Abeysinghe : WSO2 WSF/C
"http://wso2.org/projects/wsf/c?WSO2 Web Services Framework/C - Open source C library for providing and consuming Web services";


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

Reply via email to