You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Julien Billon (JIRA)" <ji...@apache.org> on 2008/05/29 17:49:46 UTC

[jira] Created: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
----------------------------------------------------------------------------------------------

                 Key: AXIS2C-1165
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
             Project: Axis2-C
          Issue Type: Bug
          Components: core/addressing
    Affects Versions: 1.3.0, 1.4.0
         Environment: Windows XP SP2
            Reporter: Julien Billon


In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:

I have a message with a <soapenv:Header> like

<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
   <wsa:To>http://example.com/services/testSvc</wsa:To>
   <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
   <wsa:Action>http://example.com/actionTest</wsa:Action>
   <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
</soapenv:Header>

In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".

Regards,

Julien


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Re: [jira] Resolved: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by Julien Billon <ju...@gmail.com>.
Hi Milinda, thanks for the fix but I see that you just replaced
attr_value = axiom_attribute_get_localname(om_attr, env);
by
attr_value = axiom_attribute_get_value(om_attr, env);

I think it may be safer to first check the attribute's localname
(IsReferenceParameter) and then check the attribute's value (true)
like :

attr_value = axiom_attribute_get_localname(om_attr, env);
if (axutil_strcmp(attr_value, AXIS2_WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE) == 0)
 {
       attr_value = axiom_attribute_get_value(om_attr, env);
       if(axutil_strcmp(attr_value, AXIS2_WSA_TYPE_ATTRIBUTE_VALUE) == 0)
       axis2_msg_info_headers_add_ref_param(msg_info_headers, env,
header_block_node);
}

Moreover, I think that there is still a problem with the wsa_qname
variable (same function) as it is constructed with a NULL namespace
prefix instead of "wsa" or something like that. As a result,
axiom_element_get_attribute() always returns a NULL pointer as it
looks for IsReferenceParameter in the om_element->attributes hash
table without taking care of the namespace prefix.

Rgds,

julien

On Wed, Jun 25, 2008 at 9:50 AM, Milinda Lakmal Pathirage (JIRA)
<ji...@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Milinda Lakmal Pathirage resolved AXIS2C-1165.
> ----------------------------------------------
>
>       Resolution: Fixed
>    Fix Version/s: Current (Nightly)
>
> Fixed in current SVN Head.
>
>> ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
>> ----------------------------------------------------------------------------------------------
>>
>>                 Key: AXIS2C-1165
>>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>>             Project: Axis2-C
>>          Issue Type: Bug
>>          Components: core/addressing
>>    Affects Versions: 1.3.0, 1.4.0
>>         Environment: Windows XP SP2
>>            Reporter: Julien Billon
>>            Assignee: Milinda Lakmal Pathirage
>>             Fix For: Current (Nightly)
>>
>>
>> In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:
>> I have a message with a <soapenv:Header> like
>> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
>>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
>> </soapenv:Header>
>> In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".
>> Regards,
>> Julien
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>

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


Re: [jira] Commented: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by Julien Billon <ju...@gmail.com>.
What about the status now ? Does your fix work ?

Regards,

Julien

On Wed, Jun 4, 2008 at 4:49 AM, Milinda Pathirage
<mi...@gmail.com> wrote:
> Hi Julien,
> Thanks for the reply. I'll try it and let you know about the status.
>
> Thanks
> Milinda
>
> On Tue, Jun 3, 2008 at 9:56 PM, Julien Billon <ju...@gmail.com>
> wrote:
>>
>> Hi Milinda, I don't have it anymore but I think you can test it with
>> something like that, I did not compile it so there might be some
>> mistakes
>>
>>
>> char* aBufferWSA[] = "<soapenv:Envelope
>> xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">"
>>                                "<soapenv:Header
>> xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"
>> xmlns:test=\"http://example.com/test\">"
>>
>>  "<wsa:To>http://example.com/services/testSvc</wsa:To>"
>>                                "<test:CorrID
>> wsa:IsReferenceParameter=\"true\">123456789</test:CorrID>"
>>
>>  "<wsa:Action>http://example.com/actionTest</wsa:Action>"
>>
>>  "<wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>"
>>                                "</soapenv:Header>"
>>
>>  "<soapenv:Body>TEST</soapenv:Body></soapenv:Envelope>";
>>
>>
>> axiom_soap_envelope_t *aSoapEnvelope = NULL;
>> axis2_handler_t *aWsaHandler = NULL;
>> axutil_allocator_t *allocator = NULL;
>> axis2_msg_info_headers_t *aMsgInfoHeaders = NULL;
>> axutil_array_list_t *aRefParams = NULL;
>> axutil_env_t* _env = NULL;
>> axis2_msg_ctx_t* _msgCtx = NULL;
>> axiom_xml_reader_t* _reader = NULL;
>> axiom_stax_builder_t* _staxBuilder = NULL;
>> axiom_soap_builder_t* _soapBuilder = NULL;
>>
>> // init axis2/c
>> allocator = axutil_allocator_init(NULL);
>> _env = axutil_env_create(allocator);
>> _msgCtx = axis2_msg_ctx_create(_env, NULL, NULL, NULL);
>>
>>
>> //Prepare Parsing
>> _reader = axiom_xml_reader_create_for_memory(_env, aBufferWsa,
>>
>>       axutil_strlen(aBufferWsa),
>>
>>       NULL,
>>
>>       AXIS2_XML_PARSER_TYPE_BUFFER);
>>
>>
>> _staxBuilder = axiom_stax_builder_create(_env, _reader);
>>
>>
>> _soapBuilder = axiom_soap_builder_create(_env, _staxBuilder,
>>
>>  AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
>>
>>
>> // Associate the soap _enveloppe with the message's context
>> aSoapEnvelope = axiom_soap_builder_get_soap_envelope(_soapBuilder, _env);
>> axis2_msg_ctx_set_soap_envelope(_msgCtx, _env, aSoapEnvelope);
>>
>> // Parse Soap Header with WSA info
>> aWsaHandler = axis2_addr_in_handler_create(_env,
>> (axutil_string_t*)("WSAInHandler"));
>> axis2_handler_invoke(aWsaHandler, _env, _msgCtx);
>>
>> // ReferenceParameter
>> aMsgInfoHeaders = axis2_msg_ctx_get_msg_info_headers(_msgCtx, _env);
>> aRefParams = axis2_msg_info_headers_get_all_ref_params(aMsgInfoHeaders,
>> _env);
>>
>>
>> //and then check what you have in your aRefParams array_list
>>
>>
>> On Tue, Jun 3, 2008 at 6:26 AM, Milinda Lakmal Pathirage (JIRA)
>> <ji...@apache.org> wrote:
>> >
>> >    [
>> > https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601827#action_12601827
>> > ]
>> >
>> > Milinda Lakmal Pathirage commented on AXIS2C-1165:
>> > --------------------------------------------------
>> >
>> > Hi Julien,
>> > Can you provide the sample code, which will lead us to regenerate the
>> > bug you have mentioned. I did the fix you suggested, but have to check it
>> > using a sample.
>> >
>> > Thanks
>> > Milinda
>> >
>> >> ReferenceParameter in ws-addressing module: problems with namespace and
>> >> attribute verification
>> >>
>> >> ----------------------------------------------------------------------------------------------
>> >>
>> >>                 Key: AXIS2C-1165
>> >>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>> >>             Project: Axis2-C
>> >>          Issue Type: Bug
>> >>          Components: core/addressing
>> >>    Affects Versions: 1.3.0, 1.4.0
>> >>         Environment: Windows XP SP2
>> >>            Reporter: Julien Billon
>> >>            Assignee: Milinda Lakmal Pathirage
>> >>
>> >> In axis2/c ws-addressing module, I've noticed something strange with
>> >> Reference Parameters in EPR:
>> >> I have a message with a <soapenv:Header> like
>> >> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"
>> >> xmlns:test="http://example.com/test">
>> >>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>> >>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>> >>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>> >>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
>> >> </soapenv:Header>
>> >> In the axis2_addr_in_extract_ref_params() function of the ws-addressing
>> >> module, the wsa_qname variable is defined with axutil_qname_create(env,
>> >> "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as
>> >> you can see, there is no prefix specified whereas the wsa namespace must be
>> >> used according to the w3c recommendation (for ws-addressing). As a result,
>> >> axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've
>> >> replaced the NULL prefix with "wsa" in wsa_qname and
>> >> axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute
>> >> (IsReferenceParameter). The next function axiom_attribute_get_localname()
>> >> returns "IsReferenceParameter" but this value is then compared with "true"
>> >> (axutil_strcmp(attr_value, "true")). I think there's a little
>> >> misunderstanding here between axiom_attribute_get_localname() and
>> >> axiom_attribute_get_value(), we must first check if
>> >> axiom_attribute_get_localname() returns "IsReferenceParameter" and then if
>> >> axiom_attribute_get_value() returns "true".
>> >> Regards,
>> >> Julien
>> >
>> > --
>> > This message is automatically generated by JIRA.
>> > -
>> > You can reply to this email to add a comment to the issue online.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>
>
>
>
> --
> http://mpathirage.com
> http://wso2.org "Oxygen for Web Service Developers"
> http://wsaxc.blogspot.com "Web Services With Axis2/C"

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


Re: [jira] Commented: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi Julien,
Thanks for the reply. I'll try it and let you know about the status.

Thanks
Milinda

On Tue, Jun 3, 2008 at 9:56 PM, Julien Billon <ju...@gmail.com>
wrote:

> Hi Milinda, I don't have it anymore but I think you can test it with
> something like that, I did not compile it so there might be some
> mistakes
>
>
> char* aBufferWSA[] = "<soapenv:Envelope
> xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\<http://www.w3.org/2003/05/soap-envelope%5C>
> ">"
>                                 "<soapenv:Header
> xmlns:wsa=\"http://www.w3.org/2005/08/addressing\<http://www.w3.org/2005/08/addressing%5C>
> "
> xmlns:test=\"http://example.com/test\ <http://example.com/test%5C>">"
>                                "<wsa:To>
> http://example.com/services/testSvc</wsa:To>"
>                                "<test:CorrID
> wsa:IsReferenceParameter=\"true\">123456789</test:CorrID>"
>                                "<wsa:Action>http://example.com/actionTest
> </wsa:Action>"
>
>  "<wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>"
>                                "</soapenv:Header>"
>
>  "<soapenv:Body>TEST</soapenv:Body></soapenv:Envelope>";
>
>
> axiom_soap_envelope_t *aSoapEnvelope = NULL;
> axis2_handler_t *aWsaHandler = NULL;
> axutil_allocator_t *allocator = NULL;
> axis2_msg_info_headers_t *aMsgInfoHeaders = NULL;
> axutil_array_list_t *aRefParams = NULL;
> axutil_env_t* _env = NULL;
> axis2_msg_ctx_t* _msgCtx = NULL;
> axiom_xml_reader_t* _reader = NULL;
> axiom_stax_builder_t* _staxBuilder = NULL;
> axiom_soap_builder_t* _soapBuilder = NULL;
>
> // init axis2/c
> allocator = axutil_allocator_init(NULL);
> _env = axutil_env_create(allocator);
> _msgCtx = axis2_msg_ctx_create(_env, NULL, NULL, NULL);
>
>
> //Prepare Parsing
> _reader = axiom_xml_reader_create_for_memory(_env, aBufferWsa,
>
>     axutil_strlen(aBufferWsa),
>
>     NULL,
>
>     AXIS2_XML_PARSER_TYPE_BUFFER);
>
>
> _staxBuilder = axiom_stax_builder_create(_env, _reader);
>
>
> _soapBuilder = axiom_soap_builder_create(_env, _staxBuilder,
>
>  AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
>
>
> // Associate the soap _enveloppe with the message's context
> aSoapEnvelope = axiom_soap_builder_get_soap_envelope(_soapBuilder, _env);
> axis2_msg_ctx_set_soap_envelope(_msgCtx, _env, aSoapEnvelope);
>
> // Parse Soap Header with WSA info
> aWsaHandler = axis2_addr_in_handler_create(_env,
> (axutil_string_t*)("WSAInHandler"));
> axis2_handler_invoke(aWsaHandler, _env, _msgCtx);
>
> // ReferenceParameter
> aMsgInfoHeaders = axis2_msg_ctx_get_msg_info_headers(_msgCtx, _env);
> aRefParams = axis2_msg_info_headers_get_all_ref_params(aMsgInfoHeaders,
> _env);
>
>
> //and then check what you have in your aRefParams array_list
>
>
> On Tue, Jun 3, 2008 at 6:26 AM, Milinda Lakmal Pathirage (JIRA)
> <ji...@apache.org> wrote:
> >
> >    [
> https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601827#action_12601827]
> >
> > Milinda Lakmal Pathirage commented on AXIS2C-1165:
> > --------------------------------------------------
> >
> > Hi Julien,
> > Can you provide the sample code, which will lead us to regenerate the bug
> you have mentioned. I did the fix you suggested, but have to check it using
> a sample.
> >
> > Thanks
> > Milinda
> >
> >> ReferenceParameter in ws-addressing module: problems with namespace and
> attribute verification
> >>
> ----------------------------------------------------------------------------------------------
> >>
> >>                 Key: AXIS2C-1165
> >>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
> >>             Project: Axis2-C
> >>          Issue Type: Bug
> >>          Components: core/addressing
> >>    Affects Versions: 1.3.0, 1.4.0
> >>         Environment: Windows XP SP2
> >>            Reporter: Julien Billon
> >>            Assignee: Milinda Lakmal Pathirage
> >>
> >> In axis2/c ws-addressing module, I've noticed something strange with
> Reference Parameters in EPR:
> >> I have a message with a <soapenv:Header> like
> >> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"
> xmlns:test="http://example.com/test">
> >>    <wsa:To>http://example.com/services/testSvc</wsa:To>
> >>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
> >>    <wsa:Action>http://example.com/actionTest</wsa:Action>
> >>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
> >> </soapenv:Header>
> >> In the axis2_addr_in_extract_ref_params() function of the ws-addressing
> module, the wsa_qname variable is defined with axutil_qname_create(env,
> "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and
> as you can see, there is no prefix specified whereas the wsa namespace must
> be used according to the w3c recommendation (for ws-addressing). As a
> result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer.
> I've replaced the NULL prefix with "wsa" in wsa_qname and
> axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute
> (IsReferenceParameter). The next function axiom_attribute_get_localname()
> returns "IsReferenceParameter" but this value is then compared with "true"
> (axutil_strcmp(attr_value, "true")). I think there's a little
> misunderstanding here between axiom_attribute_get_localname() and
> axiom_attribute_get_value(), we must first check if
> axiom_attribute_get_localname() returns "IsReferenceParameter" and then if
> axiom_attribute_get_value() returns "true".
> >> Regards,
> >> Julien
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


-- 
http://mpathirage.com
http://wso2.org "Oxygen for Web Service Developers"
http://wsaxc.blogspot.com "Web Services With Axis2/C"

Re: [jira] Commented: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by Julien Billon <ju...@gmail.com>.
Hi Milinda, I don't have it anymore but I think you can test it with
something like that, I did not compile it so there might be some
mistakes


char* aBufferWSA[] = "<soapenv:Envelope
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">"
				"<soapenv:Header
xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"
xmlns:test=\"http://example.com/test\">"
				"<wsa:To>http://example.com/services/testSvc</wsa:To>"
				"<test:CorrID wsa:IsReferenceParameter=\"true\">123456789</test:CorrID>"
				"<wsa:Action>http://example.com/actionTest</wsa:Action>"
				"<wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>"
				"</soapenv:Header>"
				"<soapenv:Body>TEST</soapenv:Body></soapenv:Envelope>";
					

axiom_soap_envelope_t *aSoapEnvelope = NULL;
axis2_handler_t *aWsaHandler = NULL;
axutil_allocator_t *allocator = NULL;
axis2_msg_info_headers_t *aMsgInfoHeaders = NULL;
axutil_array_list_t *aRefParams = NULL;
axutil_env_t* _env = NULL;
axis2_msg_ctx_t* _msgCtx = NULL;
axiom_xml_reader_t* _reader = NULL;
axiom_stax_builder_t* _staxBuilder = NULL;
axiom_soap_builder_t* _soapBuilder = NULL;

// init axis2/c
allocator = axutil_allocator_init(NULL);
_env = axutil_env_create(allocator);
_msgCtx = axis2_msg_ctx_create(_env, NULL, NULL, NULL);


//Prepare Parsing
_reader = axiom_xml_reader_create_for_memory(_env, aBufferWsa,
										 axutil_strlen(aBufferWsa),
										 NULL,
										 AXIS2_XML_PARSER_TYPE_BUFFER);


_staxBuilder = axiom_stax_builder_create(_env, _reader);


_soapBuilder = axiom_soap_builder_create(_env, _staxBuilder,
									AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);


// Associate the soap _enveloppe with the message's context
aSoapEnvelope = axiom_soap_builder_get_soap_envelope(_soapBuilder, _env);
axis2_msg_ctx_set_soap_envelope(_msgCtx, _env, aSoapEnvelope);

// Parse Soap Header with WSA info
aWsaHandler = axis2_addr_in_handler_create(_env,
(axutil_string_t*)("WSAInHandler"));
axis2_handler_invoke(aWsaHandler, _env, _msgCtx);

// ReferenceParameter
aMsgInfoHeaders = axis2_msg_ctx_get_msg_info_headers(_msgCtx, _env);
aRefParams = axis2_msg_info_headers_get_all_ref_params(aMsgInfoHeaders, _env);


//and then check what you have in your aRefParams array_list


On Tue, Jun 3, 2008 at 6:26 AM, Milinda Lakmal Pathirage (JIRA)
<ji...@apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601827#action_12601827 ]
>
> Milinda Lakmal Pathirage commented on AXIS2C-1165:
> --------------------------------------------------
>
> Hi Julien,
> Can you provide the sample code, which will lead us to regenerate the bug you have mentioned. I did the fix you suggested, but have to check it using a sample.
>
> Thanks
> Milinda
>
>> ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
>> ----------------------------------------------------------------------------------------------
>>
>>                 Key: AXIS2C-1165
>>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>>             Project: Axis2-C
>>          Issue Type: Bug
>>          Components: core/addressing
>>    Affects Versions: 1.3.0, 1.4.0
>>         Environment: Windows XP SP2
>>            Reporter: Julien Billon
>>            Assignee: Milinda Lakmal Pathirage
>>
>> In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:
>> I have a message with a <soapenv:Header> like
>> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
>>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
>> </soapenv:Header>
>> In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".
>> Regards,
>> Julien
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>

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


[jira] Commented: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by "Milinda Lakmal Pathirage (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601827#action_12601827 ] 

Milinda Lakmal Pathirage commented on AXIS2C-1165:
--------------------------------------------------

Hi Julien,
Can you provide the sample code, which will lead us to regenerate the bug you have mentioned. I did the fix you suggested, but have to check it using a sample. 

Thanks
Milinda

> ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
> ----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1165
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/addressing
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP SP2
>            Reporter: Julien Billon
>            Assignee: Milinda Lakmal Pathirage
>
> In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:
> I have a message with a <soapenv:Header> like
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
> </soapenv:Header>
> In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".
> Regards,
> Julien

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by "Milinda Lakmal Pathirage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Milinda Lakmal Pathirage reassigned AXIS2C-1165:
------------------------------------------------

    Assignee: Milinda Lakmal Pathirage

> ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
> ----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1165
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/addressing
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP SP2
>            Reporter: Julien Billon
>            Assignee: Milinda Lakmal Pathirage
>
> In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:
> I have a message with a <soapenv:Header> like
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
> </soapenv:Header>
> In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".
> Regards,
> Julien

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2C-1165) ReferenceParameter in ws-addressing module: problems with namespace and attribute verification

Posted by "Milinda Lakmal Pathirage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Milinda Lakmal Pathirage resolved AXIS2C-1165.
----------------------------------------------

       Resolution: Fixed
    Fix Version/s: Current (Nightly)

Fixed in current SVN Head.

> ReferenceParameter in ws-addressing module: problems with namespace and attribute verification
> ----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1165
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1165
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/addressing
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP SP2
>            Reporter: Julien Billon
>            Assignee: Milinda Lakmal Pathirage
>             Fix For: Current (Nightly)
>
>
> In axis2/c ws-addressing module, I've noticed something strange with Reference Parameters in EPR:
> I have a message with a <soapenv:Header> like
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:test="http://example.com/test">
>    <wsa:To>http://example.com/services/testSvc</wsa:To>
>    <test:CorrID wsa:IsReferenceParameter="true">123456789</test:CorrID>
>    <wsa:Action>http://example.com/actionTest</wsa:Action>
>    <wsa:MessageID>6dc6e535-1a70-4544-9715-26f06cdcf7bb</wsa:MessageID>
> </soapenv:Header>
> In the axis2_addr_in_extract_ref_params() function of the ws-addressing module, the wsa_qname variable is defined with axutil_qname_create(env, "IsReferenceParameter", "http://www.w3.org/2005/08/addressing", NULL) and as you can see, there is no prefix specified whereas the wsa namespace must be used according to the w3c recommendation (for ws-addressing). As a result, axiom_element_get_attribute( ..., wsa_qname) returns a NULL pointer. I've replaced the NULL prefix with "wsa" in wsa_qname and axiom_element_get_attribute( ..., wsa_qname) returns the correct attribute (IsReferenceParameter). The next function axiom_attribute_get_localname() returns "IsReferenceParameter" but this value is then compared with "true" (axutil_strcmp(attr_value, "true")). I think there's a little misunderstanding here between axiom_attribute_get_localname() and axiom_attribute_get_value(), we must first check if axiom_attribute_get_localname() returns "IsReferenceParameter" and then if axiom_attribute_get_value() returns "true".
> Regards,
> Julien

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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