Java Callout to SOAP Request

Hey community

I am struggling with the java callout policy.

My intention is to create within the java class a loop of soap requests to a soap web service.

For example, I do have an array of names:

{"names":[{"name":"Rene"},{"name":"Fred"}, {"name":"Steve"}]}

Therefore I would need three soap requests (which can be reduced to one in a loop), but I don't know if I am allowed to do this in the Java class (or how to do this). The github project was not helpful for me.

Many thanks for your help / suggestions on how to do this.

Best regards

Solved Solved
0 2 888
1 ACCEPTED SOLUTION

You can do network calls with Java callout policy and there are no limitations with that (as discussed in this thread). However I personally avoid using Java callout for these simple reasons.

1) It's convenient to use node.js. Especially if these calls can be made asynchronously and the sequence of invocation does not matter. Then you will get performance benefits with node.js. Even with JS you can use the out of the box httpClient utility to make async calls. Is there any reason why you are not using Node.js or JS for your use case?

2) It's easy to debug node.js or JS compared to Java callouts.

View solution in original post

2 REPLIES 2

You can do network calls with Java callout policy and there are no limitations with that (as discussed in this thread). However I personally avoid using Java callout for these simple reasons.

1) It's convenient to use node.js. Especially if these calls can be made asynchronously and the sequence of invocation does not matter. Then you will get performance benefits with node.js. Even with JS you can use the out of the box httpClient utility to make async calls. Is there any reason why you are not using Node.js or JS for your use case?

2) It's easy to debug node.js or JS compared to Java callouts.

Thank you @sudheendra1! So basically I only need to watch if the dependencies will be in the jar and that's it.

1) The reason why using Java instead of JS or Node.js is because I want to see how to do it in Java. That's all.

2) You are right.