Forum Discussion

IanMk1's avatar
14 years ago

get/set Parmeters of SoapRequest via JAVA

Hi,
i'm writing a java programm that uses the soapUi-Api.
I know how to read WSDLs, how to send requsts and how to read the answer.
However I don't know how to set the Parmeters for a SOAP request.

Lets assume the following Code. How do I set the Parmeters value between the <axis:input></axis:input> tags via the Api?

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:axis="http://axishotels.de">
<soap:Header/>
<soap:Body>
<axis:getEcho>
<!--Optional:-->
<axis:input>MyInput</axis:input>
</axis:getEcho>
</soap:Body>
</soap:Envelope>


I'm looking for something like:


WsdlOperation operation = (WsdlOperation) iface.getOperationAt(0); // load Operation from WSDL
operation.getAttributes(); // read out all parmeters
operation.setAttribute('input') = "myValue" // set parmeter value



Thx
Andy
No RepliesBe the first to reply