Calling soap webservice using pub.client:http

IS 10.5

full version

I am calling a soap webservice by giving its wsdl url in pub.client.http service and using post method. The issue is that I am not getting any error after running the service and i am getting everything ok but the output i.e. need to generate audio.mp3 file is not happening in the file location on the server. However when I am calling the same soap webservice from SOAPUI it is working fine and the audio.mp3 file is creating in the specified location on the server.

Hi Azhar,

you will have to create a Consumer WSD by importing the WSDL in Designer first.
After that you can invoke this Consumer service.

Regards,
Holger

Hi, Holger,
Thanks for the response. So according to you, i need to use the connector in a flow service?
But I need to call the webservice using pub.client:http. I am specifying the url, ‘methos’: post, ‘loadas’:stream.


and the result after running this http_invoke is in the image below:

You can consume a SOAP WS via HTTP, a consumer object is not needed - I’ll respond later today with more details.

However, can you ensure that this target WS is working as expected in the first place?
Does it create the file, when you are NOT invoking via HTTP?

KM

thanks KM
Yes, the target WS is working fine and the file is created everytime I am running the service.

You said that you’re posting to the WSDL URL, but you must be using the Endpoint URL.
You can get the endpoint URL from the WSDL content, or you can import the WSDL on SOAP UI and it will show you the URL that you must be posting to.

KM

1 Like

Yes, I am using the Endpoint URL after importing on SOAPUI, still the file is not creating and the status is 200 coming. I have tried with the provide wsdl url and also with cosumer url too.

A “200 OK” indicates that the service executed without a failure, but it doesn’t mean that the service performed the functional action. Perhaps there’s an exception that’s being handled in the catch and not propagated to indicate failure, so it’s treated as a successful “execution”.

Use the “Save pipeline” option, and see if the inputs are being populated as expected, when you restore it.

Post the actual Endpoint URL as well here - I’d like to see the second half of it (the screenshot shows the first half).

KM

Hi KM, I am attaching the word doc in which I have specify each step. Please check it.
Steps.docx (373.2 KB)

And when I am running http WS while putting base64Decode WS in save pipeline mode and then checking base64… in restorepipeline in debug mode then no data is coming.

That’s what I thought because I saw a “?” in your screenshot above - you are still using the WSDL URL (ends with ?WSDL) and not the Endpoint URL.

Open SOAP UI, create a SOAP project, provide the WSDL URL.
Once you do, it will give generate the project and you a request, with a longer URL (without “?WSDL”) - that’s the one you must use.

Post a screenshot after the import, if you need guidance.

KM

Now i am using this url.

That’s the correct URL (i.e., Endpoint URL).

You are not setting Headers in your HTTP invocation. When you’re invoking a WS via HTTP, the IS doesn’t automatically know which WSD Operation you’re invoking (even if there’s only 1 Operation on the WSD).

Pass a Header variable named “SOAPAction” - the value for this variable will be available in the WSDL file. Open the WSDL URL in a browser and look for SOAPAction in it.

I’m unable to recollect some specifics or provide you an example, so you’ll have to perform trials - there’s plenty of info available online on what Headers to set while invoking a WSD via HTTP.

KM


Now I have used SoapAction also as you said but the issue still coming. However I am trying to find out about headers part on the internet as you said.
Please check my data>>args>>inputfile,loadAs, outputfile(variables) are in correct way?
Thanks

Do follow what I’ve mentioned about using save and restore pipeline, to see if your variables are reaching the target service, in the way it expects.
It’s not possible to say if this correct, because the target (file creation) service may have the inputs structured/named differently and the mapping may be off.

KM