cancel
Showing results for 
Search instead for 
Did you mean: 

passing whole xml to a string

Former Member
0 Kudos

Dear Experts,

i want to pass the whole input xml as a string to the UDF which does a soap look up . how do we do it ?

It is file to soap lookup to jdbc.

Qos would normally be that of the sender. In the case of soap lookup , where do we specify the QOS?

Does the soap reciever adapter make use of wsdl while creating the soap request , and if yes , how ?

Thanks,

Aju

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Aju,

If you want to total payload of the xml file as single line then you can use XSLT or Java Mapping.

Go throgh the following there they provided some solutions by using the UDF also.

Regards

Goli Sridhar

Former Member
0 Kudos

Hi Aju,

UDF which does a soap look up

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5001] [original link is broken] [original link is broken] [original link is broken];

Read Input Text File as a Single Field

[https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/readInputTextFileasaSingle+Field.]

Regards,

RajeshKumar.D

former_member194786
Active Contributor
0 Kudos

Hi Aju,

Passing the whole input as a string can be easily achieved through java mapping. Use the following code in the execute method of your java class:

StringBuffer strbuffer = new StringBuffer();

byte[] b = new byte[[4096]];

for (int n; (n = in.read(b)) != -1;)

{

strbuffer.append(new String(b, 0, n));

}

data = strbuffer.toString();

For more on SOAP lookUp use this blog:

Thanks and Regards,

Sanjeev.

iprieto
Contributor
0 Kudos

Hello,

The best way for do it is to develop a Java Mapping. This Java mapping have a target message with one tag where you put the whole XML message. It would be better convert this message to BASE64 format because the parser don´t let you put '<' and '>' characters and will fail the parsing if you use this characters.

Into the UDF function the first step is decode BASE64 message.

Best Regards

Iván

Edited by: Carlos Ivan Prieto Rubio on Dec 3, 2008 10:17 AM