Re: WS-Addressing : Adding reference parameters?

2007-08-12 Thread Samisa Abeysinghe

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



Re: Axiom Questions

2007-08-12 Thread Samisa Abeysinghe

Subra A Narayanan wrote:

Hello everyone,

Its Monday morning and I am back with my questions. :-)

Not sure if these questions belong here but will ask anyways. Please 
let me know if I should be sending this mail to some other mailing list.


I am using Axis2 and have 2 basic questions about Axiom. I did some 
searching on the web and tried looking through the Axis2/C source code 
but don't have my answer. Here it goes:


Q1) I have a web service with 4 operations. The first 3 parameters are 
the same for all the 4 operations. In other words, the first 3 child 
elements inside the Name> are the same for the 4 operations. So I created a 
function, called ReadFirst3Params which gets called from all the 4 
operations. Since, Axiom is based on a pull parser, I know I have to 
have a reference to the 3rd parameter node to be able to read the 4th 
parameter. Now my question is, do I need to return a reference to the 
3rd parameter node from my ReadFirst3Params function so that I can 
continue reading the other params in the operation.
Not really, one can read the rest of the OM tree the way they want, as 
an example, using the qname (see axiom_element_get_children_with_qname).


Or is there any other way of doing this. For e.g. an internal pointer 
that Axiom maintains which will tell me the position with in the XML 
document. (I hope my question makes sense)


Q2) One of the operation returns an attachment to the client as an 
mtom attachment. I use axiom_data_handler_create to read in the binary 
file. I have a requirement to be able to read in a part of the file 
rather than the whole file. Just like pread function in 'C' where I 
can specify an offset and the file is read from the beginning to the 
offset. Is there a function in axiom to be able to do that? If not, 
how do I solve the above problem?
We do not have provision to read part of the attachment as of now. Is 
there any way you can break the attachment to multiple parts and send 
that in the SOAP message. If you can do that, then you can read only the 
first attachment and forget about the rest and pass it on, I hope.


Samisa...



Thanks again for ur help!


Subra






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



Axiom Questions

2007-08-12 Thread Subra A Narayanan
Hello everyone,

Its Monday morning and I am back with my questions. :-)

Not sure if these questions belong here but will ask anyways. Please let me
know if I should be sending this mail to some other mailing list.

I am using Axis2 and have 2 basic questions about Axiom. I did some
searching on the web and tried looking through the Axis2/C source code but
don't have my answer. Here it goes:

Q1) I have a web service with 4 operations. The first 3 parameters are the
same for all the 4 operations. In other words, the first 3 child elements
inside the  are the
same for the 4 operations. So I created a function, called ReadFirst3Params
which gets called from all the 4 operations. Since, Axiom is based on a pull
parser, I know I have to have a reference to the 3rd parameter node to be
able to read the 4th parameter. Now my question is, do I need to return a
reference to the 3rd parameter node from my ReadFirst3Params function so
that I can continue reading the other params in the operation. Or is there
any other way of doing this. For e.g. an internal pointer that Axiom
maintains which will tell me the position with in the XML document. (I hope
my question makes sense)

Q2) One of the operation returns an attachment to the client as an mtom
attachment. I use axiom_data_handler_create to read in the binary file. I
have a requirement to be able to read in a part of the file rather than the
whole file. Just like pread function in 'C' where I can specify an offset
and the file is read from the beginning to the offset. Is there a function
in axiom to be able to do that? If not, how do I solve the above problem?


Thanks again for ur help!


Subra


Re: [Axis2/C]: SOAP request with line breaks fails

2007-08-12 Thread Subra A Narayanan
Thanks Samisa..I will run axis http server with gdb and send u the
trace.



On 8/9/07, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote:
>
> Samisa Abeysinghe wrote:
> > Subra A Narayanan wrote:
> >> Hey Samisa,
> >>
> >> It still doesn't work. Anything else that I can do to solve this
> >> problem?
> > I tested it on my machine, with newlines in the payload, and it works
> > with the latest svn. I tested with a PHP client and echo service.
> > You seem to have tested with SOAP 1.1 in place. I am not sure if this
> > is related to SOAP version. I tested with SOAP 1.2, I will test with
> > SOAP 1.1 and let you know.
> I tested with SOAP 1.1 as well, and it seems to work fine with the
> latest svn when there are newlines in the payload.
> To help solve the problem, what you can do is to run Axis2/C server with
> gdb and send us the back trace of the crash point.
>
> Thanks,
> Samisa...
>
> --
> Samisa Abeysinghe : 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]
>
>