Question

Use soap xml to GetResult data

  • 25 April 2018
  • 6 replies
  • 9 views

Badge

I am trying to use a soap-xml to get data from a certain site but I do not get the data I want. I tried using a XMLTemplater to create the xml and use this as the response body attribute in the HTTPFetcher with the url_request set to a https://---.com/----.asmx and the HTTP_method set to Post (also tried Get) no result yet. The Get Result xml-template looks like this:

Can anybody tell me what I am doing wrong? (I also read the article at https://knowledge.safe.com/articles/45314/working-with-soap-services.html this also has no result)


6 replies

Userlevel 2
Badge +17

Hi @dth,

Please use the attribute containing the XML for the Upload Body parameter instead of Response Body in the HTTPCaller. To show this parameter in the HTTPCaller, open the Body section of the parameters, which will become active when you choose the POST method.

Set a new attribute name in the Response Body parameter - this will hold the response from the SOAP service.

Badge

Hi @dth,

Please use the attribute containing the XML for the Upload Body parameter instead of Response Body in the HTTPCaller. To show this parameter in the HTTPCaller, open the Body section of the parameters, which will become active when you choose the POST method.

Set a new attribute name in the Response Body parameter - this will hold the response from the SOAP service.

Hi @DaveAtSafe,

 

Thank you for the reply, I did put the xml in the Upload Body (not the Response Body) but because I just got one long line in the Response Body I did not see it is the actual answer I was looking for. I have put a XMLFormatter after the HTTPCaller so I see the whole xml I retrieved with the HTTPCaller. Now I just have to figure out how to put the right elements in an attribute.

 

 

Userlevel 2
Badge +17
Hi @DaveAtSafe,

 

Thank you for the reply, I did put the xml in the Upload Body (not the Response Body) but because I just got one long line in the Response Body I did not see it is the actual answer I was looking for. I have put a XMLFormatter after the HTTPCaller so I see the whole xml I retrieved with the HTTPCaller. Now I just have to figure out how to put the right elements in an attribute.

 

 

Hi @dth,

 

The XMLFragmenter and XMLFlattener transformers will be useful in extracting information from the returned XML.

 

If the response is a single feature, use the flattener. If it is multiple feature, the fragmenter can break up and flatten the XML into feature attributes.

 

Badge
Hi @dth,

 

The XMLFragmenter and XMLFlattener transformers will be useful in extracting information from the returned XML.

 

If the response is a single feature, use the flattener. If it is multiple feature, the fragmenter can break up and flatten the XML into feature attributes.

 

Hi Dave, I used the XMLFlattener and after that a ListExploder and AttributeRenamer but I do have multiple features I would like to flatten. I can not figure out how the XMLFragmenter flattens all the features in once.

 

Could you give me a hint there?

 

 

 

Userlevel 2
Badge +17
Hi Dave, I used the XMLFlattener and after that a ListExploder and AttributeRenamer but I do have multiple features I would like to flatten. I can not figure out how the XMLFragmenter flattens all the features in once.

 

Could you give me a hint there?

 

 

 

Hi @dth,

 

The XMLFragmenter will break up the XML into separate features based on the Elements to Match key.

 

If you Enable Flattening within the Flatten Options, it will also flatten the resulting XML fragments into feature attributes, like the flattener does.

 

Instead of flattening, then breaking the list into features, you break the XML into features, then flatten each feature.

 

Badge

Hi @DaveAtSafe, I will try that as well. Thanks for the hint!

Reply