axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Lyon" ...@it-innovation.soton.ac.uk>
Subject RE: WS-Addressing : Adding reference parameters?
Date Mon, 13 Aug 2007 14:46:44 GMT
> How easy would it be to implement adding reference params to the 'to'
> header?

I have created a JIRA with a possible patch at:
http://issues.apache.org/jira/browse/AXIS2C-668

The code is working fine for my requirements, but may need slight
modification before inclusion into the trunk.

Thanks,
Jamie


> > -----Original Message-----
> > From: Samisa Abeysinghe [mailto:samisa@wso2.com]
> > Sent: 13 August 2007 11:34
> > To: Apache AXIS C User List
> > Subject: Re: WS-Addressing : Adding reference parameters?
> >
> > 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:samisa@wso2.com]
> > >> 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: axis-c-user-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > >>
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > >
> > >
> > >
> >
> >
> > --
> > 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: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message