on 04-03-2012 5:46 AM
Hi,
I have a file to soap scenario where I have to map the entire contents of the file to a single field in the soap request.
How do I map the entire contents of a file to a single node?
Thanks for the quick responses. I'm not sure if they answer my question so let me add some further detail.
I have an outbound text file and the contents is structured, but I don't know for this exercise if that is relevant. I need to map the entire contents of an outbound text file to a specific node in the inbound soap call.
e.g contents of text file is "VGhpcy BpcyBhIHRlc 3QgZmlsZQ" the contents of the corresponding soap node needs to be
<fileContent>VGhpcy BpcyBhIHRlc 3QgZmlsZQ</fileContent>
regards
Julian
Hi,
you can use CDATA as per my blog:
doing a concat will be too difficult as you may have too many fields and "return as XML" option will not work as your XML will have a wrong structure and SOAP may not be able to handle that - so please use the CDATA to do it properly
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
we do have similar requirement of sending whole EDi file in one field of SOAP request.
we read the whole text file into single field using sender FCC and passed it to the target field.
i hope in the target WSDL you have a specific field for it.
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
How did you read the entire file contents into a single target field using FCC?
Reading this post http://scn.sap.com/message/8544862#8544862 reading to a single xml node is not possible. I am hoping you can prove them wrong.
regards
Julian
Hi Suresh,
Thanks for the feedback. I still can't get it to work. Would you mind looking at this information and let me know if you can see anything obvious? I am working on 7.1.
Thanks in advance
Julian
Message Mapping
Content conversion
Input file
hello world line 1
line 2
line 3
Output file
<?xml version="1.0" encoding="UTF-8"?>
<ns0:soap_mt xmlns:ns0="urn:julian_test">
<fileType>File type value</fileType>
<Filename>File name value</Filename>
<content>hello world line 1</content></ns0:soap_mt>
Inbound Payload
<?xml version="1.0" encoding="utf-8" ?>
</content_in>
</content_in>
</content_in>
</ns:file_mt>
Hi Julian,
I have a similar scenario FILE to SOAP, in which I need to map complete content of flat file into a single xml node in the target structure.
I have used sender File Adapter(FCC), and maintained FCC parameters as used by you and Suresh.
But I am also getting XML as multiple lines of the same node.
My flat file have more than one lines, and what I observed is that it is creating one file content node for every line in the flat file.
What I want is the complete file(all lines) should go in one single XML field.
Please share how you overcome this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.