[JBossWS] - Re: SOAP Intermediary Forwarding
by lightenex
yeah, there are many ways that about SOAP intermediary and forwarding, in this case, it is all about the service routing, and your SOAP implementation can be act as a service router, generally speaking, you can implement it in two ways.
The first one, SOAP header has a field called actor, if you set this field, the resource/service represented by the actor will be the first place for the request handling, within that service, you can locate the destination and forward the SOAP body to that destination.
The second one is, implement the service router module, passes service name as a in parameter, lookup the service routing table, find out the destination, forward the SOAP body part, don't forget to address the source address to the SOAP header
good luck :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963402#3963402
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963402
19 years, 9 months
[JBossWS] - Re: Using WSSecurityHandlerOutbound in a DII client
by ShadenS
Uff.. I don't know how to adapt examples and suggestions to my source code :(
I have a DII client that works fine without ws-security (sure, also web service without ws-security).
Follow copy/paste my code...
maybe, you are some idea about how "transform" my DII client for contacting a "secure" webservice (ws-security, chapter 14).
In any case, I can deploy also dii client within AS if this solve problem :(
| public void WhatTimeAccessDII()
| {
| String endpoint = "http://notebook:8080/July-EjbWs-181/TimeBean";
| String qnameService = "WhatTimeService";
| String qnamePort = "ClockTime";
| String BODY_NAMESPACE_VALUE = "http://src/jaws";
| String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
| String NS_XSD = "http://www.w3.org/2001/XMLSchema";
| String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
|
| try {
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(new QName(qnameService));
|
| QName port = new QName(qnamePort);
|
| //create JAX-RPC Call using JAX-RPC Service's createCall() method.
| Call call = service.createCall(port);
|
| // Configure your Call instance with its setter methods
| call.setTargetEndpointAddress(endpoint);
| call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
| call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
| call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
| QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
| call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "whatTimeIsIt"));
| call.setReturnType(QNAME_TYPE_STRING);
|
| call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);
| String[] params = { "Dr. Emmet Brown " };
|
| // Invoke the WS operation using the JAX-RPC Call's invoke method
| String result = (String) call.invoke(params);
|
| System.out.println(result);
|
| } catch (SOAPFaultException ex) {
| System.out.println("Error about Soap messages.");
| ex.printStackTrace();
| } catch (RemoteException e) {
| System.out.println("Errore sulla call.invoke");
| e.printStackTrace();
| } catch (ServiceException e) {
| System.out.println("Errore sulla Service o createService");
| e.printStackTrace();
| }
| }
|
How can I add to this client ws-security features? I follow jbossWS guide but I don't succeed.
I repeat: in the worst of case, I can also deploy client into AS ;)
Heeeeeeeeeeeeeeeeeeeeeeeeeeeeelp!!
:_(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963392#3963392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963392
19 years, 9 months