Call a web service without request input attributes

Looks like the actual error is being sent back to you from the consuming application(web service partner). Reach out to them and share your SOAP request to help them identify the issue.

So far everything you are doing to send the request looks valid.

this is very curious because before testing it on SoapUI with success, I used to call this WS from the ESB Sonic, and it working too…

Hi,

I’ve created a set of Java classes generated with CXF from the WSDL and when I execute it from Eclipse, the WS is well called.
So I suspect an incident on WebMethods…

what SAG commented on your earlier raised incident ?Can you plz share.

Thanks,

Hi,

Here is the support service reply : you were right, all was correct.
But they gave me a workaround for addressing correctly the webservice.

Regards


[i]
Dear Cedric Joubert,

The issue here is that the WSDL does define an “input”, but it is an empty element. When the WSDL is consumed to create the Connectors and the Document types, the IS does define an empty document type and inserts a reference to that in the input to the IClientWebService_getAllPays connector input signature. If you look at the input signature of the Connector you do see the tns:getAllPays field which is a reference to the empty document type.

The problem comes in when invoking the Connector. The way that the IS generates the SOAPRequest is by taking the inputs and generating the XML of the Soap Request. The IS does not supply empty or default fields. If there is nothing named tns:getAllPays in the input of the connector we do not generate the empty XML element on the request.

One simple way to make it work is to ensure that when the Connector is invoked that an empty IData named tns:getAllPays is in the pipeline so the soap call will send that empty value. What I did to make it work locally is to create a small Java Service that took no inputs, but created an empty document as output. Attached is a screenshot of the java code to use. I named the output field tns:getAllPays so it would automatically map on the pipeline.

Then I created a Flow service to invoke my Java service before invoking the connector (see attached screenshot). By having the populated tns:getAllPays in the pipeline the IS generated the SOAPRequest with the empty element and everything seems to work fine.
Alternatively, in the IClientWebService_getAllPays flow I added an Invoke step to call the Java service (see attached screenshot), and from that point on, an instance of a getAllPays document existed in the pipeline, and the soap call was successful.

If you require an empty XML Element in the soapRequest, simply ensure there is an empty iData in the pipeline that can be converted into the XML of the request and it will work.

Please use this Incident number in future correspondence regarding this request. You may reply to this e-mail, or address your message to support@softwareag.com and use the following text in the subject line:

Support Incident: 5219551

With kind regards,

Software AG Global Support Services
[/i]

@Cedric Joubert and the attachment? Thank u

Hi,

The support advised me to develop a java service to call directly in the Connector of the Consumer (this to recreate the input) :

	public static final void JCallConnectorGetAllPays(IData pipeline) throws ServiceException {
		IDataCursor plc1 = pipeline.getCursor();
		IDataUtil.put(plc1, "tns:getAllPays", IDataFactory.create());
		plc1.destroy();
	}

esb-get.JPG

Hi Cedric,

To me, the solution that SAG Support offered you seems more like a workaround.

If at any point you want to regenerate the Connector, you will lose the addition you made and must make a note to be aware of this.

Does not seem like something that is sustainable.

Although WS with no inputs it is not that common, SAG should support this scenario is a standard way.

Maybe a new incident will raise more awareness. Or maybe a Brainstorm entry for future releases.

Best regards,
Vlad Turian

I agree with Vlad that this seems to be a miss of sorts by the WSD implementation.

But I’m even more dismayed that SAG support provided a Java service to simply create a pipeline var. Not necessary. Just define the doc var in a MAP step, then set it with no value. There is no need to use Java to do that.

Hi,

could you please share the code of your small Java Service wgich creates an empty document as Output. We currently have the same issue and this would be very helpful.
Thank you very much in advance.
Kind regards,

Natalie

Ok, I just read that it works when adding a map and the issue is now solved.

[strike]You don’t need Java (though it is there in Cedric’s post). Just define a document in the pipeline. Then set it with no value. You’ll have an empty doc.[/strike]
Oops. I just saw the latest post.