You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Dittmann Werner <we...@siemens.com> on 2004/08/18 16:27:33 UTC

AW: AW: [jira] Created: (WSFX-30) Added a few more test scenarios to TestJAX RPCHandler.java

Venkat,

if it is possible to add the same handler class in
the handler chain twice with different sets of configs
then IMO we can solve the problem.

What about the following idea:

Define more precise deployment ids:
"client-request", "client-response", "server-request"
"server-response" instead of only "client" and "server"

Then, in the server:

if deployment == "client-request" and msgType == request
  doSender
else if deployment == "sender-request" and msgType == request
  doReceiver
else if deployment == "client-response" and msgType == response
  doReceiver
else if deployment == "server-response" and msgType = response
  doSender
else
  error
endif

Thus simulating the Axis way to instanciate different handlers
on the request and response flow. An even better way would be 
to have two different handlerChains - one the the request path,
one for the response path.


The testcase than could go something like that:

config.put("deployment", "client-request");
config.put("action", "Signature Encrypt Timestamp");
config.put("user", "1fb7623be7b2f4831ffc3f3741fa09dd_1e149434-9d3a-4adc-9284-4cfdc595012f");
config.put("passwordCallbackClass", "org.apache.ws.axis.oasis.PWCallback1");
config.put("signatureKeyIdentifier", "DirectReference");
config.put("signaturePropFile", "wsstest.properties");
config.put("encryptionKeyIdentifier", "SKIKeyIdentifier");
config.put("encryptionUser", "c82f74d031dabf9d7546f40ad07c32c0_1e149434-9d3a-4adc-9284-4cfdc595012f");
handlerChain.add(new HandlerInfo(WSS4JHandler.class, config, null));

Thus the handler would look at the response.

This way it is also possible to instanciate two handlers 
with different sets of configs. Similar to

Map other_config = new HashMap();
other_config.put("deployment", "client-response");
other_config.put("action", "Signature ...");
other_config.put("user", "...");
....
handlerChain.add(new HandlerInfo(WSS4JHandler.class, other_config, null));

IMO this could work for programmatically deployment as well as
Axis deployment with deployment descriptors.


Regards,
Werner

> -----Ursprüngliche Nachricht-----
> Von: Venkat Reddy [mailto:vreddyp@gmail.com] 
> Gesendet: Mittwoch, 18. August 2004 15:26
> An: Dittmann Werner
> Cc: fx-dev@ws.apache.org
> Betreff: Re: AW: [jira] Created: (WSFX-30) Added a few more 
> test scenarios to TestJAX RPCHandler.java
> 
> 
> hi Werner,
> 
> In these test cases, I'm adding the JAXRPC Handler (WSS4JHandler)
> programmatically (service.getHandlerRegistry, registry.setHandlerChain
> etc.), instead of deploying them through Client-config.wsdd. This is
> to avoid making changes to the current settings in wsdd file.
> 
> However, i realize that, currently the Client-config.wsdd has
> different sets of handler config parameters for request and response
> flows for the some services. For example, Ping1 has <parameter
> name="action" value="UsernameToken"/> for request flow and has no
> action defined for response flow. But inside WSS4JHandler, the
> doReceiver method, which is invoked for handling the response on
> client-side in this case, also sees the action parameter and expects
> security headers inside the response and fails.
> 
> I was just wondering whether there is a way to specify separate sets
> of handler config parameters for request and response flows while
> deploying the handlers programmatically. If not, what's the best
> solution? That's my problem.
> 
> Hope that is much clearer. You can also look into the file
> test/interop/TestJAXRPCHandler.java (also attached with this mail) to
> see what I'm doing.
> 
> Thanks and regards
> Venkat
> 
> 
> 
> On Wed, 18 Aug 2004 15:02:54 +0200, Dittmann Werner
> <we...@siemens.com> wrote:
> > Venkat,
> > 
> > what is the problem with the not workinf scenarios? Problems
> > in the config (Axis deployment file)? Can you give me some
> > hint what goes wrong there?
> > 
> > Regards,
> > Werner
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: fx-dev@ws.apache.org [mailto:fx-dev@ws.apache.org]
> > > Gesendet: Mittwoch, 18. August 2004 14:46
> > > An: fx-dev@ws.apache.org
> > > Betreff: [jira] Created: (WSFX-30) Added a few more test
> > > scenarios to TestJAX RPCHandler.java
> > >
> > >
> > > Message:
> > >
> > >   A new issue has been created in JIRA.
> > >
> > > 
> ---------------------------------------------------------------------
> > > View the issue:
> > >   http://issues.apache.org/jira/browse/WSFX-30
> > >
> > > Here is an overview of the issue:
> > > 
> ---------------------------------------------------------------------
> > >         Key: WSFX-30
> > >     Summary: Added a few more test scenarios to TestJAX
> > > RPCHandler.java
> > >        Type: Improvement
> > >
> > >      Status: Unassigned
> > >    Priority: Minor
> > >
> > >     Project: WSFX
> > >  Components:
> > >              WSS4J
> > >
> > >    Assignee:
> > >    Reporter: Venkat Reddy
> > >
> > >     Created: Wed, 18 Aug 2004 5:44 AM
> > >     Updated: Wed, 18 Aug 2004 5:44 AM
> > >
> > > Description:
> > > Scenarios 3, 4 and 6 are working fine right now. The code for
> > > the remaining scenarios (1, 2, 5 and 7) also added but yet to
> > > be fixed, and is currently commented out. They fail because
> > > the same set of handler config parameters do not work for
> > > both request and response flows. I'm still thinking on how to
> > > fix this. Does anybody have suggestions on how to fix for this?
> > >
> > > Thanks
> > > Venkat
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > JIRA INFORMATION:
> > > This message is automatically generated by JIRA.
> > >
> > > If you think it was sent incorrectly contact one of the
> > > administrators:
> > >    http://issues.apache.org/jira/secure/Administrators.jspa
> > >
> > > If you want more information on JIRA, or have a bug to report see:
> > >    http://www.atlassian.com/software/jira
> > >
> >
>