on 07-14-2008 10:27 AM
Hi,
my scenario is as follows:
ERP --> PI --> System A (3rd party application)
ERP sends data (IDoc) to the PI and is mapped there to a xml structure expected by A.
IDoc --> PI --> target xml structure
On A runs a Web service (Axis Framework) with a method uploadFile that expects one parameter (client of A) and the file for the upload has to come as attachment (call.addAttachment).
I imported already the wsdl and can see the message uploadFile in the IR. The Axis Framework is also available already in the SOAP adapter.
So I have
IDoc --> PI --> target xml structure
but want to call
PI --> uploadFile(client) \[with the target xml structure as attachment\]
How can I map the parameter to uploadFile and get the mapped xml structure as attachment?
Thanks and regards
Patrick
Patrick,
Did you try the PayloadSwapBean? I have practically never worked with handling attachments in a WS scenario. When you use this bean, the payload is converted to attachment and sent. But I am not sure if this will be mapped to your uploadFile parameter.
Give it a try and let me know.
Regards,
Jaishankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your answer. The PayloadSwapBean could be a solution for the problem and I will try to use it.
Here is another (simplified) version of my scenario:
I have one source interface with three data fields
SD1
SD2
SD3
This should get mapped to a target interface with two data fields
TD1
TD2
So if a source message arrives at PI a Message Mapping is called and the message gets mapped to the target structure.
The result of this mapping should get the attachment of a Web service call.
In a sample client for this Web service it looks like:
Service service = new Service();
Call call = (Call) service.createCall();
...
call.setOperationName(new QName(... "uploadFile"));
...
call.addAttachmentPart(...);
The target interface of the Web service is the message uploadFile in an imported wsdl file. This interface has one data field
WSD1
and is independent of the other data fields.
For filling WSD1 another mapping is necessary (or maybe not?).
Regards
Patrick
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.