tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Laws <simonsl...@googlemail.com>
Subject Re: Sample for confidentiality on binding.ws
Date Fri, 26 Jun 2009 15:58:31 GMT
Hi Bob

I ran up some samples today. I started
samples/helloworld-ws-service-secure and called it with
samples/helloworld-ws-reference and
samples/helloworld-ws-reference-secure. A attached the output below
[1]

I then tried what I think you tried and changed the configuration of
the client to disable the keystore for helloworld-ws-reference-secure.
The client then fails with

Caused by: java.io.FileNotFoundException: helloworldKeys.jksX (The
system cannot find the file specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at org.apache.ws.security.components.crypto.AbstractCrypto.<init>(AbstractCrypto.java:77)
	at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:72)
	... 40 more

When you say "My web service still works without any errors." do you
mean that the client and server are still able to start and
communicate?

Regards

Simon


[1]
samples/helloworld-ws-service-secure/src/main/java/home/HelloWorldServer.java
output
====================================================================================

26-Jun-2009 16:40:16 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: helloworldws.composite
26-Jun-2009 16:40:18 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution:
file:/C:/simon/tuscany/java-1.x/samples/helloworld-ws-service-secure/target/classes/
26-Jun-2009 16:40:22 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: helloworldws.composite
- Module validation failed: The system is attempting to engage a
module that is not available: rampart
- Module validation failed: The system is attempting to engage a
module that is not available: rampart
26-Jun-2009 16:40:23 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService
26-Jun-2009 16:40:23 org.apache.tuscany.sca.http.jetty.JettyServer
addServletMapping
INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldWsPolicyService
HelloWorld server started (press enter to shutdown)

Printed at the server when called by
samples/helloworld-ws-reference/src/main/java/home/HelloWorldClient.java
=============================================================================================================

- WSDoAllReceiver: Incoming message does not contain required Security header
org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not
contain required Security header
	at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221)
	at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86)
	at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
	at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
	at org.apache.tuscany.sca.core.work.Work.run(Work.java:63)
	at org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run(ThreadPoolWorkManager.java:215)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
- org.apache.axis2.AxisFault: Error in extracting message properties

The client console reported
===========================

26-Jun-2009 16:46:29 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: helloworldwsclient.composite
26-Jun-2009 16:46:31 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution:
file:/C:/simon/tuscany/java-1.x/samples/helloworld-ws-reference/target/classes/
26-Jun-2009 16:46:34 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: helloworldwsclient.composite
Injected helloWorldService
Called getGreetings
Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
org.apache.axis2.AxisFault: The input stream for an incoming message
is null.
	at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediateFault(MediatorImpl.java:317)
	at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:78)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:309)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:156)
	at $Proxy4.getGreetings(Unknown Source)
	at helloworld.HelloWorldServiceComponent.getGreetings(HelloWorldServiceComponent.java:30)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:156)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:309)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:156)
	at $Proxy4.getGreetings(Unknown Source)
	at helloworld.HelloWorldClient.main(HelloWorldClient.java:33)
Caused by: org.apache.axis2.AxisFault: The input stream for an
incoming message is null.
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72)
	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker$1.run(Axis2BindingInvoker.java:172)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:170)
	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:124)
	at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:67)
	... 16 more

Printed at the server when called by
samples/helloworld-ws-reference-secure/src/main/java/home/HelloWorldClient.java
====================================================================================================================

*** Calling Server User/Passwd Handler....
User Id = TuscanyWsUser
Password = TuscanyWsUserPasswd
- Verification successful for URI "#Id-12298774"
- Verification successful for URI "#Timestamp-6461262"
*** Calling Server User/Passwd Handler....
User Id = TuscanyWsUser
Password = null

The client console reported
===========================

26-Jun-2009 16:47:23 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: helloworldwsclient.composite
26-Jun-2009 16:47:25 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution:
file:/C:/simon/tuscany/java-1.x/samples/helloworld-ws-reference-secure/target/classes/
26-Jun-2009 16:47:29 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: helloworldwsclient.composite
- Module validation failed: The system is attempting to engage a
module that is not available: rampart
- Module validation failed: The system is attempting to engage a
module that is not available: rampart
- Module validation failed: The system is attempting to engage a
module that is not available: rampart
Injected helloWorldService
Called getGreetings
*** Calling Client UserId/Password Handler ....
User Id = TuscanyWsUser
Set Password = TuscanyWsUserPasswd
Hello World
Injected helloWorldService
Called getGreetings
*** Calling Client UserId/Password Handler ....
User Id = TuscanyWsUser
Set Password = TuscanyWsUserPasswd
- Verification successful for URI "#Id-24345503"
- Verification successful for URI "#Timestamp-28277251"
Hello WsPolicyWorld
26-Jun-2009 16:47:32 org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: helloworldwsclient.composite

Mime
View raw message