You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pi...@apache.org on 2007/11/28 10:56:39 UTC
svn commit: r598934 - in /webservices/axis2/trunk/c/samples:
client/mtom/mtom_client.c server/mtom/mtom.c
Author: pini
Date: Wed Nov 28 01:56:38 2007
New Revision: 598934
URL: http://svn.apache.org/viewvc?rev=598934&view=rev
Log:
Fixing jira issue 699
Modified:
webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c
webservices/axis2/trunk/c/samples/server/mtom/mtom.c
Modified: webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c?rev=598934&r1=598933&r2=598934&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c Wed Nov 28 01:56:38 2007
@@ -124,20 +124,25 @@
/* Send request */
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
-
if (ret_node)
{
axis2_char_t *om_str = NULL;
om_str = axiom_node_to_string(ret_node, env);
if (om_str)
{
- printf("\nReceived OM : %s\n", om_str);
- AXIS2_FREE(env->allocator, om_str);
+ if (axis2_svc_client_get_last_response_has_fault(svc_client, env) == AXIS2_TRUE)
+ {
+ printf("\nRecieved Fault : %s\n", om_str);
+ AXIS2_FREE(env->allocator, om_str);
+ }
+ else
+ {
+ printf("\nReceived OM : %s\n", om_str);
+ AXIS2_FREE(env->allocator, om_str);
+ printf("\nmtom client invoke SUCCESSFUL!\n");
+ process_response_node(env, ret_node, to_save_name);
+ }
}
- printf("\nmtom client invoke SUCCESSFUL!\n");
-
- process_response_node(env, ret_node, to_save_name);
-
}
else
{
Modified: webservices/axis2/trunk/c/samples/server/mtom/mtom.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/mtom/mtom.c?rev=598934&r1=598933&r2=598934&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/mtom/mtom.c (original)
+++ webservices/axis2/trunk/c/samples/server/mtom/mtom.c Wed Nov 28 01:56:38 2007
@@ -126,7 +126,7 @@
axis2_msg_ctx_set_doing_mtom (msg_ctx, env, AXIS2_TRUE);
ret_node = build_response2(env, data_handler_res);
}
- else /* attachment has come by value, as non-optimized binary */
+ else if (axiom_node_get_node_type(binary_node, env) == AXIOM_TEXT) /* attachment has come by value, as non-optimized binary */
{
int plain_binary_len = 0;
int ret_len = 0;
@@ -155,6 +155,14 @@
ret_len);
axiom_data_handler_write_to(data_handler, env);
ret_node = build_response1(env, base64text);
+ }
+ else /* nothing came */
+ {
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_ATTACHMENT_MISSING,
+ AXIS2_FAILURE);
+ printf("Echo client ERROR: attachment is missing.\n");
+ return NULL;
}
/* } */
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org