axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yong Yang <>
Subject re[2]: I can not receive MIME attachment in client
Date Mon, 04 Dec 2006 13:06:21 GMT
Hi Dinesh

     Thank you very much for your kind reply. 

     I  followed the mtom sample service(samples/server/mtom and samples/client/mtom) and
wrote my test program. According to my understanding, the key to send attachment is to enable
 MIME option using AXIS2_OPTIONS_SET_ENABLE_MTOM(options, env, AXIS2_TRUE). I followed your
suggestion and use TCP monitor to trace the SOAP messages between client and server. I found
the content type of SOAP message sent to server is multipart/related and the content type
of SOAP message sent to client is text/xml. There is no attachment in the SOAP message sent
to the client. That is why the client didn't receive the attachment. 

    In my existing server program, I just simply use the statement, AXIS2_OPTIONS_SET_ENABLE_MTOM(options,
env, AXIS2_TRUE). The only difference between my client program and server program is that
the client program has another statement, AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options).
Do I miss something to enable the MTOM in the server program?

    I have another issue regarding fault tolerant. In my test case, the server will be terminated
after the server have received the SOAP message from client. Therefore the client will be
waiting for the response from the server infinitely as I use the send-receive message pattern.
I would like that the client automatically cancel the invokation if it does not receive the
reply in a time period. Currenlty, I just simply use a statement, AXIS2_OPTIONS_SET_TIMEOUT_IN_MILLI_SECONDS(options,
env, XX), to set timeout in my client program. But It seems not working. Could anyone give
me any idea how to configure my client program to achieve that?

    Many thanks in advance.

best regards

>>  Hi Yong,

 >>  Yong Yang <> writes:

 >>  > Hi, I am looking at the AXIS2-C framework and have writen one simple
 >>  > program using AXIS2C. In that program, client sends two parameters
 >>  > and two attachments to the server and the server will return two
 >>  > simple values and two attachments. In that experiment, the server
 >>  > can correctly receive the two parameters and two attachments sent by
 >>  > client. But the client only can receives the two return values and
 >>  > can not receive the attachments as the binary data node for the
 >>  > attachment is null. When I use axiom_xml_writer_t to output the
 >>  > whole return node, I did not see the file content inside the XML
 >>  > file. It seems that the server did not attach the files to client.
 >>  I'm not sure whether, problem in client or server. Did you use
 >>  tcpmonitor to monitor the messages exchanged. If not please use that,
 >>  then you can check, whether attachment is coming from the server.

 >>  If attachment comes from server there is a problem in receiving part.
 >>  You can refer mtom sample service (samples/server/mtom) to get an idea
 >>  about receiving.

 >>  If attachment doesn't come form the server there is a problem in
 >>  attaching part. Please refer mtom sample client (samples/client/mtom)
 >>  to get an idea about attaching.

 >>  BTW. Did you use axis2_data_handler to deal with attachment.

 >>  thanks,
 >>  Dinesh

 >>  ---------------------------------------------------------------------
 >>  To unsubscribe, e-mail:
 >>  For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message