Hi,
If the DATATYPE for the variable attachment1 in the class Method1Response is >OMElement, it seems the binary data is sending by value, not by reference when I >traced the SOAP message using TCPMonitor.
Please make sure to set the optimize flag to "true" in the OMText child of that attachment element.. eg: text.setOptimize(true); Also make sure to enable MTOM [1] in the server..
And it also seems that large portion of the attachment data was discarded as >the size of the file is about 3M.
This is an unexpected behaviour.. Axis2 should fail with a fault if it cannot handle the load.. Please log a bug report in the Jira if you continue to experience this behaviour(discarding data)..
May I know How I can set the data type of attachment variable in this approach? >or there is any other alternative way to return complex data structure and >attachment? Many thanks in advance.
You can follow the contract first approach.. Design the WSDL first. Then code generate according to that WSDL using the Axis2 WSDL2Java tool.. There are lot of tools available to help you in designing a WSDL. (Ex: Eclipse WTK).. See here[2] understand how to specify the attachments in the WSDL.. ~Thilina [1] http://wso2.org/library/264 [2] http://ws.apache.org/axis2/1_1/mtom-guide.html#251
best regards yong --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Thilina Gunarathne WSO2, Inc.; http://www.wso2.com/ Home page: http://webservices.apache.org/~thilina/ Blog: http://thilinag.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
