Hello
I have created a simple web service that concatenate two string
This is the code of the client that call the web service
SimpleServiceStub service = new SimpleServiceStub("h**p://localhost:8080/axis2/services/SimpleService");
ConcatRequest request = new ConcatRequest();
request.setS1("test");
request.setS2("1234");
ConcatResponse response = service.concat(request);
System.out.println(response.getConcatResponse());
Then i have created a BPEL project that invoke the web service and this the code of the BPEL process client
WS_Invocation_ServiceLocator locator = new WS_Invocation_ServiceLocator();
WS_InvocationRequest req = new WS_InvocationRequest();
req.setInput1("test");
req.setInput2("1234");
String out = locator.getWS_InvocationPort().process(req);
System.out.println("res = " +out);
Now, i've created a secure web service that send signed and encrypted messages. This is the code of the client that call the web service
ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository");
SecureServiceStub stub = new SecureServiceStub(context,"h**p://localhost:8080/axis2/services/SecureService");
stub._getServiceClient().engageModule("rampart");
StAXOMBuilder builder = new StAXOMBuilder("src/main/resources/rampart-config.xml");
OMElement configElement = builder.getDocumentElement();
Policy rampartConfig = PolicyEngine.getPolicy(configElement);
stub._getServiceClient().getAxisService().getPolicySubject().attachPolicy(rampartConfig);
String result = stub.concat("test", "1234");
System.out.println(result);
I have created a BPEL project that invoke the web service in the same way as before.
What's the code of the BPEL process client?
[Updated on: Sat, 28 May 2011 17:09]
Report message to a moderator