SOAP web service calls

Please let me know if anyone has code snippet to make SOAP web services call POST method.

I tried using ‘InvokeWebServiceUseAuth’ but I’m getting cannot create soap envelope error. Although the dame request works from soap ui tool

Also, is there any way to pass requestbody from file?

Any help is appreciated. Thanks.

Hi Murali,
there is an old topic in the forum (search is your friend :wink:)
Web Service - Post method

May be that answers your question.

Regards

2 Likes

Hi,

I tried this approach. But I am still getting below error:
PFA screenshot with code. Any help is appreciated.

Error 500: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given sour

Hello @Murali and welcome to our community!
There seems to be some error regarding the apis you are trying to ping.

I have tried a post method at a random Web API and everything seems to be working fine.

Edit: I had copy and pasted a joke without checking it and it was definitely not in line with our community rules :slight_smile:

Best regards,
J.

2 Likes

Thanks for all your replies.
Issue got resolved. Encode request was true…just turned it onto false and it worked.

1 Like

Glad to hear that @Murali!

Best regards,
J.