Hi Yong, The problem is you have configured client side handlers twice. Remove the configuration of WSDoAllSender from the client-config.wsdd and add the parameters to the sandesha.properties in the client side.
Thanks, Jaliya ----- Original Message ----- From: Yong Han To: [EMAIL PROTECTED] Sent: Saturday, December 10, 2005 1:23 PM Subject: Re: question about sandesha integrate with wss4j Hi, Jaliya, Thank you very much for your help. I followed your advice but still has problem. Suppose I have a webservice only need the requestor's UsernameToken using your RMSampleService example in the sandesha sample folder Here is what i did: For server side: I changed the sandesha.properties to: # This is the port in which client side listener listens. CLIENT_LISTENER_PORT = 9090 # This is the SimpleAxisServerImpl running port. Only for testing purposes. SIMPLE_AXIS_SERVER_PORT = 8080 # Any number of handlers can be included as shown below for the response path of the Sender. responseHandler1 = org.apache.ws.axis.security.WSDoAllReceiver responseHandler2 = org.apache.axis.message.addressing.handler.AddressingHandler responseHandler3 = org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler # If there are additional handlers that needs to be included in the Senders request path # then use the following configuration. # requestHandler1 = package.name.DummyHandler # These are the handlers for the Listener's request path. Listener's request path is used to # retrieve asynchronous responses and other RM protocol messages and hence the handlers we put here # should be the RESPONSE handlers with respect to normal invocation. listenerRequestHandler1 = org.apache.axis.message.addressing.handler.AddressingHandler listenerRequestHandler2 = org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler # Define the strategy for executing web service invokes. # This impl uses the apache axis thread pool and configures # it to the given size. invokeStrategy=org.apache.sandesha.server.ThreadPoolInvokeStrategy:threadPoolSize=10 # Define the invoke handler that will execute the web service invokes. # This impl simply delegates to the handler specified by the "invoker" param. server side deploy.wsdd file: <?xml version="1.0" encoding="UTF-8"?> <!-- ====================================================================================== /* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * */ ====================================================================================== --> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java "> <service name="RMSampleService" provider="Handler"> <requestFlow> <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver"> <parameter name="passwordCallbackClass" value="samples.userguide.example2.PWCallback"/> <parameter name="action" value="UsernameToken"/> </handler> <handler type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler> <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handler> </requestFlow> <parameter name="handlerClass" value="org.apache.sandesha.ws.rm.providers.RMProvider"/> <parameter name="className" value="org.apache.sandesha.samples.RMSampleService"/> <parameter name="allowedMethods" value="*"/> <parameter name="scope" value="request"/> </service> <!-- ====================================================================================== --> <!-- Un-comment the following section to deploy, RMService with RMClientProvider as the --> <!-- provider. Deploying RMService with the following configuratoin is required when the --> <!-- web service client becomes another web service that has already been deployed in some --> <!-- server. E.g. Web Service A invokes Web Service B with Reliable Messaging. --> <!-- ====================================================================================== --> <service name="RMService" provider="Handler"> <requestFlow> <handler type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler> <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handler> </requestFlow> <parameter name="handlerClass" value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/> <parameter name="className" value="org.apache.sandesha.client.RMService"/> <parameter name="allowedMethods" value="*"/> <parameter name="scope" value="request"/> </service> </deployment> For Client Side: sandesha.properties: # This is the port in which client side listener listens. CLIENT_LISTENER_PORT = 9090 # This is the SimpleAxisServerImpl running port. Only for testing purposes. SIMPLE_AXIS_SERVER_PORT = 8080 # Any number of handlers can be included as shown below for the response path of the Sender. responseHandler1 = org.apache.axis.message.addressing.handler.AddressingHandler responseHandler2 = org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler # If there are additional handlers that needs to be included in the Senders request path # then use the following configuration. # requestHandler1 = package.name.DummyHandler requestHandler1 = org.apache.ws.axis.security.WSDoAllSender # These are the handlers for the Listener's request path. Listener's request path is used to # retrieve asynchronous responses and other RM protocol messages and hence the handlers we put here # should be the RESPONSE handlers with respect to normal invocation. listenerRequestHandler1 = org.apache.axis.message.addressing.handler.AddressingHandler listenerRequestHandler2 = org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler # Define the strategy for executing web service invokes. # This impl uses the apache axis thread pool and configures # it to the given size. invokeStrategy=org.apache.sandesha.server.ThreadPoolInvokeStrategy:threadPoolSize=10 # Define the invoke handler that will execute the web service invokes. # This impl simply delegates to the handler specified by the "invoker" param. invokeHandler=org.apache.sandesha.server.DelegateInvokeHandler:invoker=org.apache.axis.providers.java.RPCProvider client-config.wsdd file <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java "> <globalConfiguration> <parameter name="adminPassword" value="admin"/> <parameter name="enableNamespacePrefixOptimization" value="true"/> <parameter name="disablePrettyXML" value="true"/> <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/> <parameter name="sendXsiTypes" value="true"/> <parameter name="sendMultiRefs" value="true"/> <parameter name="sendXMLDeclaration" value="true"/> <requestFlow > <handler type="java:org.apache.ws.axis.security.WSDoAllSender" > <parameter name="action" value="UsernameToken"/> <parameter name="user" value="wss4j"/> <parameter name="passwordCallbackClass" value="PWCallback2"/> <parameter name="passwordType" value="PasswordDigest"/> </handler> </requestFlow > </globalConfiguration> <handler name="RMSender" type="java:org.apache.sandesha.client.RMSender"/> <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/> <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/> <transport name="RMTransport" pivot="RMSender"/> </deployment> Thank you very much again for your help. Yong Han On 12/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Yong, Sandesha can be configured with wss4j. This is how you do it. WSS4J handlers should be the last handlers in the out path in the client side as well as in path in the server side. Server side configuration is normal, you have to add a WSS4J handler before RMServerRequestHandler. In the server side, we need to put WSS4J response handler in the response path as well as server side's sender's out path. For that you need to edit the sandesha.properties file in the config directory. That file itself explains how to put handlers after Sandesha layer such as wss4j and we can configure these handlers in client IN/OUT and server IN/OUT locations. Client side also you need to put wss4j handlers in the sandesha.properties file (as explained in the properties file) Sandesha needs the provider as we have mentioned and it will not work without it. But we have tested Sandesha with wss4j as I have explained. Just put the handlers in sandesha.properties as well as in the server side's request path(using server-config.wsdd, that wsss4j request handler in server side) Hope this helps. Let me know if you have any problems. Thanks, Jaliya ----- Original Message ----- From: Yong Han To: [EMAIL PROTECTED] Sent: Friday, December 09, 2005 3:53 PM Subject: question about sandesha integrate with wss4j Hi, Jaliya, My name is Yong Han. I am a programmer in US. I am doing a project using sandesha and wss4j. I could not integrate those two together. I think that it is becasue the provider in the server.wsdd file. If I use "Handler" as provider, I could not get the security header. If I use "java:PRC" as provider, I could not set the addressing header. Do you have any sugestion for this. Thanks Yong Han --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
