Hi Thilina,
pls should it work with ADB via MTOM? I have still problems with it:( In
Axis2.xml mtom is enabled. Thaks a lot for response.
WSDL snapshot
<!-- messages for operation
getFinishedOrderBinary-->
<xs:element name="getFinishedOrderBinRequest">
<xs:complexType>
<xs:sequence>
<xs:element
name="login_info"
type="tns:tlogin_info" />
<xs:element name="orderid"
type="tns:torderid" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getFinishedOrderBinResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="document"
type="xs:base64Binary" />
<xs:element name="errorcode"
type="tns:terror_code" />
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- messages for operation
getFinishedOrderBinary-->
/*
login_info - login data
OrderId - identification for filename,which I want to retrieve
errorcode - return code for operation
document - should be mtom attachement via datahandler
*/
server service code:
public stkws.axtypes.GetFinishedOrderBinResponse
getFinishedOrderBin(stkws.axtypes.GetFinishedOrderBinRequest _axisrequest)
{
OrderWs orderws = new OrderWs();
Terror_code terror_code = new Terror_code();
GetFinishedOrderBinResponse axResponse = new
GetFinishedOrderBinResponse();
//some other processing
String fileName =
orderws.getFileNameFromOrderId(_axisrequest.getOrderid().getTorderid(),_axis
request.getLogin_info().getUser(),
_axisrequest.getLogin_info().getPassword());
if(fileName != null)
{
DataHandler dh = new DataHandler(new
FileDataSource(fileName));
axResponse.setDocument(dh);
}
this.setWsErrorFromErrorObj(orderws.getErrorObject(),
terror_code);
axResponse.setErrorcode(terror_code);
return axResponse;
}
client code:
.....
GetFinishedOrderBinRequest binreq = new
GetFinishedOrderBinRequest();
binreq.setLogin_info(login);
binreq.setOrderid(Utils.string2Torderid("a.pdf"));
GetFinishedOrderBinResponse binresp=
stk.getFinishedOrderBin(binreq);
binresp.getDocument().writeTo(new
FileOutputStream("c:\\a2.pdf"));
.....
Vladi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]