Yes,
But that is not what i need. The documentation explains on how to test a REST web service using SoapUI UI interface.
I need to make the same call programatically in Java using the SoapUI apis.
Example:
Here is a code snippet to make calls to a soap webservice using the soapui api.
// create new project WsdlProject project = new WsdlProject();
// import amazon wsdl WsdlInterface iface = WsdlInterfaceFactory.importWsdl( "http://www.mycorp.com/somewsdl.wsdl", true )[0];
// get desired operation WsdlOperation operation = (WsdlOperation) iface.getOperationByName( "MyOperation" );
// create a new empty request for that operation WsdlRequest request = operation.addNewRequest( "My request" );
// generate the request content from the schema request.setRequestContent( operation.createRequest( true ) );
// submit the request WsdlSubmit submit = (WsdlSubmit) request.submit( new WsdlSubmitContext(), false );
// wait for the response Response response = submit.getResponse();
// print the response String content = response.getContentAsString(); System.out.println( content ); assertNotNull( content ); assertTrue( content.indexOf( "404 Not Found" ) > 0 ); |
I want the code counterpart in soap ui api for the REST Web service.