use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class Client method main.
public static void main(String[] args) throws Exception {
if (args.length == 0) {
System.out.println("please specify wsdl");
System.exit(1);
}
URL wsdlURL;
File wsdlFile = new File(args[0]);
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(args[0]);
}
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdlURL, SERVICE_NAME);
GreeterRPCLit greeter = (GreeterRPCLit) service.getPort(PORT_NAME, GreeterRPCLit.class);
System.out.println("Invoking sayHi...");
System.out.println("server responded with: " + greeter.sayHi());
System.out.println();
System.out.println("Invoking greetMe...");
System.out.println("server responded with: " + greeter.greetMe(System.getProperty("user.name")));
System.out.println();
MyComplexStruct argument = new MyComplexStruct();
MyComplexStruct retVal = null;
String str1 = "this is element 1";
String str2 = "this is element 2";
int int1 = 42;
argument.setElem1(str1);
argument.setElem2(str2);
argument.setElem3(int1);
System.out.println("Invoking sendReceiveData...");
retVal = greeter.sendReceiveData(argument);
System.out.println("Response from sendReceiveData operation :");
System.out.println("Element-1 : " + retVal.getElem1());
System.out.println("Element-2 : " + retVal.getElem2());
System.out.println("Element-3 : " + retVal.getElem3());
System.out.println();
System.exit(0);
}
use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class ProviderRPCClientServerTest method testPayloadModeWithSAXSourceData.
@Test
public void testPayloadModeWithSAXSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit6");
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
assertNotNull(service);
doGreeterRPCLit(service, portName, 1, false);
}
use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class ProviderRPCClientServerTest method testSOAPMessageModeWithDOMSourceData.
@Test
public void testSOAPMessageModeWithDOMSourceData() throws Exception {
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit2");
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
assertNotNull(service);
doGreeterRPCLit(service, portName, 2, false);
}
use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class ProviderRPCClientServerTest method testMessageModeWithSAXSourceData.
@Test
public void testMessageModeWithSAXSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit4");
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
assertNotNull(service);
doGreeterRPCLit(service, portName, 1, false);
}
use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class ProviderRPCClientServerTest method testMessageModeWithStreamSourceData.
@Test
public void testMessageModeWithStreamSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit5");
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
assertNotNull(service);
doGreeterRPCLit(service, portName, 1, false);
}
Aggregations