You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Irfan Habib <ir...@yahoo.com> on 2006/07/11 10:04:19 UTC
Mtom reply to client
Hi,
I'm building a client which sends a mtom message with
two attachements, now, the server itself replies with
another mtom attachment.
In the client side, how do I convert the response
message to an axiom_node, most examples I've seen go
like, converting the response to text:
AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
buffer =
(axis2_char_t*)AXIS2_XML_WRITER_GET_XML(writer, &env);
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: [Axis2][Fwd: Mtom reply to client]
Posted by Sahan Gamage <sa...@wso2.com>.
Hi,
Irfan Habib wrote:
>I have looked at the server side, however: the
>function is invoked with a node structure passed as
>a parameter, if I have the node structure available
>then I can easily extract the file from the mtom
>message.
>
>
Yes. you get an om_node as the result.
Look at AXIS2_SVC_CLIENT_SEND_RECEIVE(). It returns an om_node. so you
can achieve what is required.
>axiom_node_t *
>axis2_mtom_mtom (axis2_env_t **env, axiom_node_t
>*node)
>
>However in the client samples, the response is read as
>text, rather then stored as a node. So my question is
>how can I store the response as a node.
>
>
We do AXIOM_ELEMENT_GET_TEXT() because we know the result is text. But
if you know the result is binary you can get the binary by applying mtom
functions to the resulting om_node (or resulting om tree)
- sahan
>Thanks
>
>--- Samisa Abeysinghe <sa...@gmail.com>
>wrote:
>
>
>
>>Sahan Gamage wrote:
>>
>>
>>
>>>Forwareded with correct prefix
>>>Irfan Habib wrote:
>>>
>>>
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>I'm building a client which sends a mtom message
>>>>
>>>>
>>with
>>
>>
>>>>two attachements, now, the server itself replies
>>>>
>>>>
>>with
>>
>>
>>>>another mtom attachment.
>>>>In the client side, how do I convert the response
>>>>message to an axiom_node, most examples I've seen
>>>>
>>>>
>>go
>>
>>
>>>>like, converting the response to text:
>>>>
>>>>AXIS2_OM_NODE_SERIALIZE (ret_node, &env,
>>>>
>>>>
>>om_output);
>>
>>
>>>> buffer =
>>>>(axis2_char_t*)AXIS2_XML_WRITER_GET_XML(writer,
>>>>
>>>>
>>&env);
>>
>>
>>>>
>>>>
>>>>
>>>>
>>Please have a look at the server side code of the
>>mtom sample.
>>If you implement the same logic on client side, then
>>you can extract the
>>attachment from the client side.
>>
>>Samisa...
>>
>>
>>
>>
>---------------------------------------------------------------------
>
>
>>To unsubscribe, e-mail:
>>axis-c-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail:
>>axis-c-user-help@ws.apache.org
>>
>>
>>
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>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
Re: [Axis2][Fwd: Mtom reply to client]
Posted by Irfan Habib <ir...@yahoo.com>.
I have looked at the server side, however: the
function is invoked with a node structure passed as
a parameter, if I have the node structure available
then I can easily extract the file from the mtom
message.
axiom_node_t *
axis2_mtom_mtom (axis2_env_t **env, axiom_node_t
*node)
However in the client samples, the response is read as
text, rather then stored as a node. So my question is
how can I store the response as a node.
Thanks
--- Samisa Abeysinghe <sa...@gmail.com>
wrote:
> Sahan Gamage wrote:
>
> >Forwareded with correct prefix
> >Irfan Habib wrote:
> >
> >
> >
> >>Hi,
> >>
> >>I'm building a client which sends a mtom message
> with
> >>two attachements, now, the server itself replies
> with
> >>another mtom attachment.
> >>In the client side, how do I convert the response
> >>message to an axiom_node, most examples I've seen
> go
> >>like, converting the response to text:
> >>
> >>AXIS2_OM_NODE_SERIALIZE (ret_node, &env,
> om_output);
> >> buffer =
> >>(axis2_char_t*)AXIS2_XML_WRITER_GET_XML(writer,
> &env);
> >>
> >>
>
> Please have a look at the server side code of the
> mtom sample.
> If you implement the same logic on client side, then
> you can extract the
> attachment from the client side.
>
> Samisa...
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-c-user-help@ws.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: [Axis2][Fwd: Mtom reply to client]
Posted by Samisa Abeysinghe <sa...@gmail.com>.
Sahan Gamage wrote:
>Forwareded with correct prefix
>Irfan Habib wrote:
>
>
>
>>Hi,
>>
>>I'm building a client which sends a mtom message with
>>two attachements, now, the server itself replies with
>>another mtom attachment.
>>In the client side, how do I convert the response
>>message to an axiom_node, most examples I've seen go
>>like, converting the response to text:
>>
>>AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
>> buffer =
>>(axis2_char_t*)AXIS2_XML_WRITER_GET_XML(writer, &env);
>>
>>
Please have a look at the server side code of the mtom sample.
If you implement the same logic on client side, then you can extract the
attachment from the client side.
Samisa...
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
[Axis2][Fwd: Mtom reply to client]
Posted by Sahan Gamage <sa...@wso2.com>.
Forwareded with correct prefix
Irfan Habib wrote:
>Hi,
>
>I'm building a client which sends a mtom message with
>two attachements, now, the server itself replies with
>another mtom attachment.
>In the client side, how do I convert the response
>message to an axiom_node, most examples I've seen go
>like, converting the response to text:
>
>AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
> buffer =
>(axis2_char_t*)AXIS2_XML_WRITER_GET_XML(writer, &env);
>
>
>Thanks
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>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