Good afternoon! Can anyone tell me what the code below would look like in Axis2? I need to create a SOAP client in Axis 2 that allows me to pass the payload and one that allows me to pass the entire message. I understand that I should use the operation client interface and the service client interface, but I can not find an example of using those two without first generating stubs with wsdl2java. I can not use wsdl2java.
Thanks, Doug //create new service to be able to use for call Service service = new Service(); Call call = (Call) service.createCall(); //set the properties for using the SOAPaction call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE); call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAPaction); //set the endpoint url call.setTargetEndpointAddress( new java.net.URL(endpointUrl) ); //add SOAP elements SOAPBodyElement[] input = new SOAPBodyElement[1]; Element inputQuery = doc.getDocumentElement(); input[0] = new SOAPBodyElement(inputQuery); result = (String) call.invoke( input );
