Forum Discussion

peskums's avatar
peskums
New Contributor
9 years ago

Enable/Disable WS-A addressing in SoapUI using groovy script step(Java/groovy script)

Hi,

I have a groovy script step which is invoking the service to a endpoint. I have build this script to create a wrapper class to soapUI so that i can interact with the service without actually creating the SOAPStep is soapUI.

The snippet of code looks like below:

 

        //endpointURL =  my actual endpoint to which i have to invoke my request        

        MessageFactory messageFactory = MessageFactory.newInstance();
           String Request = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "Request")
           InputStream is = new ByteArrayInputStream(Request.getBytes());
          SOAPMessage soapMessage = MessageFactory.newInstance().createMessage(null, is);
        SOAPMessage soapResponse = soapConnection.call(soapMessage, endpointURL);
   

This works in most of the services, but for a specific  service of a client,  this above method throws error  as: "This operation call is not supported.".

When i try the request which is invoked using my groovy script, as a SOAP request step and trigger it, it works and get the expected response.

 

Am able to re-produce the issue of groovy step in SOAP request step, when i Enable the WS-A addressing checkbox is SOAP step.

So i believe in groovy step, the message is sent with WS-A addressing enabled with  headers.

How can i disable this using the groovy step using java code.?

 

Is the WS-A addressing really a issue or is it something to with the soapVersion/HttpVersion , which is depends on the way developer has implemented the service.

 

Any pointers/solution to this would be helpful.

 

Thank You,

Kumarswamy