Capture Response webservice as string

1
Hi, We would like to capture the full webservice response as string. Currently using XML to Domain mapping, in which the response is stored as multiple objects with relations and attributes. This is good, but we would also like to have the full response as string. (like you see it when testing via soapUI or in the mendix lognode for: "webservice") Any idea's that does not involve manually converting each attribute to string values and concatenating them?  Kr,  Mendel  
asked
5 answers
4

It's a workaround, but you can subscribe to the WebServices log node yourself in a Java action and trace the response from there. The code in the Logging module will give you an idea on how to do this.

answered
0

Store in string variable and apply import mapping is that possible?

answered
0

I didn't see the option to store a response as a string for a web service call, but I did see that option for the export mapping activity. Have you tried using that activity after you import to create the response string?

answered
0

The solution with subscribing to the lognode is the best I would say. Else I have a Java action to call the service and get the response in a string. Let me know if you would like to try this Java action.

answered
0

For the sending part of the webservice this works indeed. We are using this to set the value where we want with the webservice message. BUT, for the incoming response of the webservice call you would need to use the other way around. Ending up with the import XML action as equivalent. But it only can use filedocument, that is in the soapreply (so not a document object) also it has no option to store as variable. 

In conclusion, For the sending part of webservice it is good option. For soap reply of webservice it does not work. (hence my question)

Is there really no way to do it without JAVA? @Mendix, seems a bit odd to me... :(

 

answered