Skip to Content

passing some fields from SOAP lookup response xml string to some fields in target structure in UDF

Feb 07 at 07:44 AM


avatar image
Former Member

Hi All,

In my scenario i have to call a webservice using soap look up and pass some fields from lookup response to somefields in the target structure.

I am able to get response using soap lookup as xml string but i am stuck at passing few fields from response xml to target structure using result list. Can you please guide me how to pass the fields from response xml to target structure.

AbstractTrace trace = container.getTrace();
StringBuilder response = new StringBuilder();
try {
  Channel channel = LookupService.getChannel("Comm Component","Communication Channel");
  SystemAccessor accessor = LookupService.getSystemAccessor(channel);
  /* Construct the SOAP Request Message using the InputParameters.*/     
  String SOAPxml = "input message to soap lookup";
  InputStream inputStream = new ByteArrayInputStream(SOAPxml.getBytes());
  XmlPayload payload = LookupService.getXmlPayload(inputStream);
  Payload SOAPOutPayload = null;
   SOAPOutPayload =;
   BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(SOAPOutPayload.getContent()));
               String line = "";
        while (line != null) {
            line = bufferedReader.readLine();
catch (Exception e){
    trace.addWarning("Error" + e);
  return response.toString();

Please provide your inputs.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Feb 12 at 07:27 PM

Hi All,

I had to select specific element from the UDF and take values only under that., i was able to achieve my requirement.

used below code to parse the xml from output.

NodeList list = document.getElementsByTagName("element");
		for (int i = 0; i < list.getLength(); i++) 
			NodeList childList = list.item(i).getChildNodes();
			for (int j = 0; j < childList.getLength(); j++) 
				Node childNode = childList.item(j);
				if ("TransactionId".equals(childNode.getNodeName())) 
10 |10000 characters needed characters left characters exceeded
Priyanka Anagani Feb 07 at 10:09 AM

Hi Laxmi,

You need to parse the response XML and retrieve the values of XML fields and then map it to target. Refer below.


10 |10000 characters needed characters left characters exceeded