Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » BPEL process client(Invoke a secure Web service with Eclipse BPEL designer)
BPEL process client [message #674812] Sat, 28 May 2011 17:05 Go to next message
Vincenzo  is currently offline Vincenzo Friend
Messages: 1
Registered: May 2011
Junior Member
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

Re: BPEL process client [message #675898 is a reply to message #674812] Wed, 01 June 2011 21:07 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Vincenzo,

This forum is meant specifically for discussions of the BPEL Designer and not for general BPEL questions. If you need help with BPEL, I suggest searching the web for tutorials and examples.

Cheers!
Bob
Previous Topic:Error while creating the HelloWorld Tutorial
Next Topic:open a bpel file programmatically
Goto Forum:
  


Current Time: Sat Nov 11 08:33:38 GMT 2023

Powered by FUDForum. Page generated in 0.01314 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top