How to invoke third party SOAP WS without mapping parameters to program variables

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
dvanoni
Posts: 27
Joined: Wed Dec 02, 2015 3:47 am
Location: Chiasso - Switzerland

How to invoke third party SOAP WS without mapping parameters to program variables

Post by dvanoni » Thu Sep 01, 2016 6:08 am

Hi everybody!

We are trying to invoke a third party SOAP Web Service using Lansa Integrator.

We have created a "solution" of the type "SOAP Agent Wizard" and we have associated the WSDL. Since we need to map additional information over the ones proposed by the operation selected (in the Operations tab),
is it possible to invoke the WebService without mapping parameters to program variables? I mean I want to create the XML Request by hand and pass it to the Integrator function.

We need to do it because we must add additional information in the XML request about security that are not contained in the WSDL and we cannot find a way to do it with Integrator.

Is there a way to do it?

Thanks

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: How to invoke third party SOAP WS without mapping parameters to program variables

Post by Stewart Marshall » Sat Sep 03, 2016 10:31 am

Not my area of expertise, but I'm told that instead of using the SOAP Agent, you can generate the SOAP XML request using the XML bind wizard.

Use the HTTP + OutboundXMLBindHandler or the HTTPOutboundXMLBindService to create the SOAP XML request to send to the SOAP server and to process the response.

Hope this helps
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

alick
Posts: 16
Joined: Fri Sep 02, 2016 2:43 pm

Re: How to invoke third party SOAP WS without mapping parameters to program variables

Post by alick » Mon Sep 05, 2016 6:14 am

Hi,

It is possible to add SOAP header information using Java code.

You can do it via a MessageHandler or a code all in the AGENT_INCLUDE.TXT file.

The AGENT_INCLUDE.TXT file is read when the SOAP Agent Project is being compiled.

/*
Set SOAP Header
*/

com.acme.soap.SOAPAgentStubHelper.setSOAPHeader ( stub, request, user, password, url ) ;

Could you email support and request a sample

dvanoni
Posts: 27
Joined: Wed Dec 02, 2015 3:47 am
Location: Chiasso - Switzerland

Re: How to invoke third party SOAP WS without mapping parameters to program variables

Post by dvanoni » Mon Sep 05, 2016 4:42 pm

Thanks for your replies!

I'll let you know if it works.

Post Reply