Hi,
I can send a txt attachment from one service to another service by using SWA
exactly given as in http://wso2.org/library/1675.
Code is like :
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
"C:/Documents and
Settings/rajeevr/workspace/attachmentProject/WebContent/WEB-INF",
null);
ServiceClient sender = new ServiceClient(configContext, null);
OperationClient mepClient =
sender.createClient(ServiceClient.ANON_OUT_IN_OP);
sender.setOptions(options);
MessageContext mc = new MessageContext();
FileDataSource fileDataSource = new FileDataSource(file);
DataHandler dataHandler = new DataHandler(fileDataSource);
mc.addAttachment(dataHandler);
mepClient.addMessageContext(mc);
mepClient.execute(true);
I want to use the current MessageContext like
MessageContext mc = MessageContext.getCurrentMessageContext(); and call the
next service. Reason for that While getting the new MessageContext() it
overwrites the already envelope in it and also it do not adds tags like
relatesto etc automatically added by axis2.
While doing so I get this error:
ServiceContext and OperationContext.parent do not match!
Can some one help to solve this?
Regards,
Rajeev
--
View this message in context:
http://www.nabble.com/ServiceContext-and-OperationContext.parent-do-not-match%21-tp24971884p24971884.html
Sent from the Axis - User mailing list archive at Nabble.com.