You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by he...@alice.it on 2006/06/21 16:37:40 UTC

R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Hi Martin 
Thank for your help, I'm sorry for all my mistake I'm new of wss4j and I'm developing a service for my degree.

I understand what you say, in effect  I  don't need use  username and password so i change my deploy.wsdd:
<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- Services from PerformWSService WSDL service -->

  <service name="PerformWService" provider="java:RPC" style="rpc" use="encoded">
      <parameter name="wsdlTargetNamespace" value="urn:PerformWService"/>
      <parameter name="wsdlServiceElement" value="PerformWSService"/>
      <parameter name="wsdlServicePort" value="PerformWService"/>
      <parameter name="className" value="PerformWS.PerformWServiceSoapBindingSkeleton"/>
      <parameter name="wsdlPortType" value="PerformWS"/>
      <parameter name="typeMappingVersion" value="1.2"/>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="scope" value="Session"/>
<requestFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
     <parameter name="action" value="Signature"/>
     <parameter name="signaturePropFile"
value="cryptoReceiver.properties" />
   </handler>
</requestFlow>
  </service>
</deployment>

and move cryptoReceiver and my keystore cacert.jks in the folder axis/Web-Inf/classes.

even the client move the cryptoSender and x509pri.12 in PerformWeb/Web-Inf/classes

now I've a problem with the code that you send me and so it gives me an error on this:
this.deployTransport("http", new SimpleTargetedChain(new org.apache.axis.transport.http.HTTPSender));
on new org.apache.axis.transport.http.HTTPSender says misplaced consructor

and the last thing of the code you send me
w.setOption I don't understad what i need to insert in, I think that I've to set cryproSender.properties but I don't understand how.

Thank you very much for your help

Hermann


-----Messaggio originale-----
Da: Martin Kuba [mailto:makub@ics.muni.cz]
Inviato: mer 21/06/2006 15.08
A: hescot@alice.it
Oggetto: Re: [WSS4J 1.5] WS-Security Help Client-Server Configuration
 
Hermann,

try to think more about what you want to do. You  are
just trying things randomly.
Also there are some obvious errors, see below:

hescot@alice.it wrote:
> Hi All,
> 
> I've a problem with the client of a WS Security application
> 
>   <service name="PerformWService" provider="java:RPC" style="rpc" 
> use="encoded">
>       <parameter name="wsdlTargetNamespace" value="urn:PerformWService"/>
>       <parameter name="wsdlServiceElement" value="PerformWSService"/>
>       <parameter name="wsdlServicePort" value="PerformWService"/>
>       <parameter name="className" 
> value="PerformWS.PerformWServiceSoapBindingSkeleton"/>
>       <parameter name="wsdlPortType" value="PerformWS"/>
>       <parameter name="typeMappingVersion" value="1.2"/>
>       <parameter name="allowedMethods" value="*"/>
>       <parameter name="scope" value="Session"/>
> <responseFlow>

it should be <requestFlow>, if you want to *receive* the
security token on the server side.

>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="user" value="hermann"/>
>      <parameter name="passwordCallbackClass" value="1234567890"/>

the value must be qualified name of a *class*, as the parameter
name suggests, not an arbitrary string.

>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </responseFlow>
>   </service>
> </deployment>
> 
> 
> The file cryptoReceiver is this:
> org.apache.ws.security.crypto.merlin.file=cacerts.jks
> org.apache.ws.security.crypto.merlin.keystore.type=JKS
> org.apache.ws.security.crypto.merlin.keystore.password=1234567890


> So that it receive a binary security token, I add 
> cryptoReceiver.properties and my keystore file in the package of my 
> service tomcat/webapps/axis/WEB-INF/classes/PerformWS

It will be very difficult to read the files from that location.
If you want to read them using a classloader, which you
probably want, as you don't specify any location,
they should be located in tomcat/webapps/axis/WEB-INF/classes/ directory.


> 
> Now the problem is the client that is integrated in a jsp application
> 
> I've in PerformWeb\WEB-INF\classes\stub of my tomcat application a class 
> that call my service, in the package "stub" where I located my class and 
> the class for locate the service, the file client-config.wsdd and the 
> keystore pkcs12.

  That's again wrong place. If you want the files to be found, move
them into PerformWeb\WEB-INF\classes.

> client-config.wssd:
> 
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>   <transport name="http"
> pivot="java:org.apache.axis.transport.http.HTTPSender"/>
>    <globalConfiguration>
> <requestFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
>      <parameter name="user" value="hermann"/>
>      <parameter name="passwordCallbackClass" value="1234567890"/>

Again, the value should be a name of a class implementing
password callback.

>      <parameter name="action" value="Signature"/>
>      <parameter name="signatureKeyIdentifier" value="DirectReference" />
>      <parameter name="signaturePropFile" value="cryptoSender.properties" />
>    </handler>
> </requestFlow>
> </globalConfiguration >
> </deployment>
> 
> cryptoSender.properties:
> org.apache.ws.security.crypto.merlin.file=x509pri.p12
> org.apache.ws.security.crypto.merlin.keystore.type=PKCS12
> org.apache.ws.security.crypto.merlin.keystore.password=1234567890
> 
> the class is this:
> 
> package stub;
> import java.util.*;
> import org.apache.axis.EngineConfiguration;
> import org.apache.axis.configuration.FileProvider;
> 
> public class Chiamata
> {
> 
>         String host="143.225.250.102";
>         String usr="viola";
>         String pass="giallo";
>         String com;
>         String ritorno;
> 
>         public Chiamata(String h,String u,String p,String c)
>         {
>                 host=h;
>                 usr=u;
>                 pass=p;
>                 com=c;
>         }
>         public String getString()
>         {
>                  try{
>                        
>                         ritorno="Nel try ";
>                         EngineConfiguration config = new 
> FileProvider("client-config.wsdd");

I don't think that you can read the file like this.
You would either need access to ServletContext
and use its getRealPath() method, or don't use
a client-config.wsdd file and do the configuration
in code.
For that, you need to extend SimpleProvider like this:

public class MyEngineConfiguration extends SimpleProvider {
     public MyEngineConfiguration() {
         super();

         this.deployTransport("http", new SimpleTargetedChain(new 
org.apache.axis.transport.http.HTTPSender));
	//parameters
         Hashtable<String, Object> opts = new Hashtable<String, Object>(5);
         opts.put(AxisEngine.PROP_DISABLE_PRETTY_XML, Boolean.TRUE);
         this.setGlobalOptions(opts);
	//requestFlow
	org.apache.ws.axis.security.WSDoAllSender w = new WSDoAllSender();
	w.setOption(...);
	this.setGlobalResponse(w);

     }

     @Override
     public void configureEngine(AxisEngine engine) throws 
ConfigurationException {
         engine.refreshGlobalOptions();
     }
}

and then do

PerformWSServiceLocator l= new
  PerformWSServiceLocator(new MyEngineConfiguration());

I did not try it with WSS4J, but it worked for me
when I needed to replace a HTTP trasport handler.


>                         PerformWSServiceLocator l=new 
> PerformWSServiceLocator(config);
>                          ritorno=ritorno+"creato il locator ";
>                          PerformWServiceSoapBindingStub stub 
> =(PerformWServiceSoapBindingStub) l.getPerformWService();
>                          ritorno=ritorno+"creato lo stub ";
>                          ritorno=stub.outputStr(host,usr,pass,com);
>                         
>                  }catch (Exception e)
>                  { ritorno=ritorno+"Si solleva una RemoteException";}
>                  return ritorno;
>          }
> 
> 
> How I Can read the file client-config.wsdd? if I use this method in the 
> class It's return null
> 
> Perhaps I've to specify some other things or I have some error in the 
> component of my applicaion?
> 
> Please help me to resolve this big problem.
> 
> Thank You.
> 

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub@ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------


R: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by he...@alice.it.
Hi Robert,
yes sorry for the previous mail the file deploy.wsdd of my server side contain this parameters:

<requestFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </requestFlow>

and even so, the server doesn't send error, now I use axis1.4 but I see that the application server is made with Axis 1.2.1.
Is this the cause of the problems?
I have to recreate the service with axis 1.4 in order to use this feature with wss4j 1.5??

Thanks for tha attentions 

 


-----Messaggio originale-----
Da: Robert Maier [mailto:robert.maier@gmail.com]
Inviato: gio 22/06/2006 15.48
A: hescot@alice.it
Cc: wss4j-dev@ws.apache.org
Oggetto: Re: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
 
Hermann,

Like Martin said previously, I believe you need <requestFlow><handler type="
java:org.apache.ws.axis.security.WSDoAllReceiver" >...</handler></requestFlow>
instead of what you have (i.e. <responseFlow>...</responseFlow>) if this is
at the server side. At the server side you need to process  the _received_
(hence WSDoAllReceiver)  SOAP Request messages (hence
<requestFlow>...</requestFlow>).

With respect to the setOption(...) question, I recently managed to configure
a client without having the client-config.wsdd file present (so all
parameters programatically), so in your case it would look like:
  w.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
for setting the "signaturePropFile" parameter and analogously for other
parameters. You can find the correspondence between the WSHandlerConstants
and the parameters placed in wsdd files here:
http://ws.apache.org/wss4j/apidocs/constant-values.html

Cheers,
Robert.

On 6/22/06, hescot@alice.it <he...@alice.it> wrote:
>
>  Hi Martin,
>
> my degree is in Information Science
>
> I have a problem with the server side when I don't add the handler
> response It works very well and the client receive the service, but when i
> deploy the server with responseFlow:
>
> <responseFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </responseFlow>
>
> the client don't process the request and it's ok, but don't receive error
> from the server, so the client can't understand which kind of problem is it.
>
> How can i resolve this problem?
>
> Thanks a lot for your precious help
>
>
> -----Messaggio originale-----
> Da: Martin Kuba [mailto:makub@ics.muni.cz <ma...@ics.muni.cz>]
> Inviato: mer 21/06/2006 17.04
> A: hescot@alice.it
> Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
>
> hescot@alice.it wrote:
> > Hi Martin
> > Thank for your help, I'm sorry for all my mistake I'm new of wss4j and
> > I'm developing a service for my degree.
>
> Which degree ?
>
>
> > now I've a problem with the code that you send me and so it gives me an
> > error on this:
> > this.deployTransport("http", new SimpleTargetedChain(new
> > org.apache.axis.transport.http.HTTPSender));
> > on new org.apache.axis.transport.http.HTTPSender says misplaced
> consructor
>
> I did not try that code, so there are possibly mistakes.
> In this case put parenteses () just after HTTPSender.
>
> > and the last thing of the code you send me
> > w.setOption I don't understad what i need to insert in, I think that
> > I've to set cryproSender.properties but I don't understand how.
>
> As I wrote, I did not try to configure a client
> for WSS4J in this way, so I am not sure, but probably
> setOption() can set the parameters as they are set
> in <requestFlow> in client-config.wsdd.
>
> The documentation for this is not very good,
> you have to dowload the source of Axis
> and investigate.
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Supercomputing Center Brno             Martin Kuba
> Institute of Computer Science    email: makub@ics.muni.cz
> Masaryk University             http://www.ics.muni.cz/~makub/<http://www.ics.muni.cz/%7Emakub/>
> Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
> --------------------------------------------------------------
>
>


R: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by he...@alice.it.
Hi Robert,
yes sorry for the previous mail the file deploy.wsdd of my server side contain this parameters:

<requestFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </requestFlow>

and even so, the server doesn't send error, now I use axis1.4 but I see that the application server is made with Axis 1.2.1.
Is this the cause of the problems?
I have to recreate the service with axis 1.4 in order to use this feature with wss4j 1.5??

Thanks for tha attentions 

 


-----Messaggio originale-----
Da: Robert Maier [mailto:robert.maier@gmail.com]
Inviato: gio 22/06/2006 15.48
A: hescot@alice.it
Cc: wss4j-dev@ws.apache.org
Oggetto: Re: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
 
Hermann,

Like Martin said previously, I believe you need <requestFlow><handler type="
java:org.apache.ws.axis.security.WSDoAllReceiver" >...</handler></requestFlow>
instead of what you have (i.e. <responseFlow>...</responseFlow>) if this is
at the server side. At the server side you need to process  the _received_
(hence WSDoAllReceiver)  SOAP Request messages (hence
<requestFlow>...</requestFlow>).

With respect to the setOption(...) question, I recently managed to configure
a client without having the client-config.wsdd file present (so all
parameters programatically), so in your case it would look like:
  w.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
for setting the "signaturePropFile" parameter and analogously for other
parameters. You can find the correspondence between the WSHandlerConstants
and the parameters placed in wsdd files here:
http://ws.apache.org/wss4j/apidocs/constant-values.html

Cheers,
Robert.

On 6/22/06, hescot@alice.it <he...@alice.it> wrote:
>
>  Hi Martin,
>
> my degree is in Information Science
>
> I have a problem with the server side when I don't add the handler
> response It works very well and the client receive the service, but when i
> deploy the server with responseFlow:
>
> <responseFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </responseFlow>
>
> the client don't process the request and it's ok, but don't receive error
> from the server, so the client can't understand which kind of problem is it.
>
> How can i resolve this problem?
>
> Thanks a lot for your precious help
>
>
> -----Messaggio originale-----
> Da: Martin Kuba [mailto:makub@ics.muni.cz <ma...@ics.muni.cz>]
> Inviato: mer 21/06/2006 17.04
> A: hescot@alice.it
> Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
>
> hescot@alice.it wrote:
> > Hi Martin
> > Thank for your help, I'm sorry for all my mistake I'm new of wss4j and
> > I'm developing a service for my degree.
>
> Which degree ?
>
>
> > now I've a problem with the code that you send me and so it gives me an
> > error on this:
> > this.deployTransport("http", new SimpleTargetedChain(new
> > org.apache.axis.transport.http.HTTPSender));
> > on new org.apache.axis.transport.http.HTTPSender says misplaced
> consructor
>
> I did not try that code, so there are possibly mistakes.
> In this case put parenteses () just after HTTPSender.
>
> > and the last thing of the code you send me
> > w.setOption I don't understad what i need to insert in, I think that
> > I've to set cryproSender.properties but I don't understand how.
>
> As I wrote, I did not try to configure a client
> for WSS4J in this way, so I am not sure, but probably
> setOption() can set the parameters as they are set
> in <requestFlow> in client-config.wsdd.
>
> The documentation for this is not very good,
> you have to dowload the source of Axis
> and investigate.
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Supercomputing Center Brno             Martin Kuba
> Institute of Computer Science    email: makub@ics.muni.cz
> Masaryk University             http://www.ics.muni.cz/~makub/<http://www.ics.muni.cz/%7Emakub/>
> Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
> --------------------------------------------------------------
>
>


Re: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by Robert Maier <ro...@gmail.com>.
Hermann,

Like Martin said previously, I believe you need <requestFlow><handler type="
java:org.apache.ws.axis.security.WSDoAllReceiver" >...</handler></requestFlow>
instead of what you have (i.e. <responseFlow>...</responseFlow>) if this is
at the server side. At the server side you need to process  the _received_
(hence WSDoAllReceiver)  SOAP Request messages (hence
<requestFlow>...</requestFlow>).

With respect to the setOption(...) question, I recently managed to configure
a client without having the client-config.wsdd file present (so all
parameters programatically), so in your case it would look like:
  w.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
for setting the "signaturePropFile" parameter and analogously for other
parameters. You can find the correspondence between the WSHandlerConstants
and the parameters placed in wsdd files here:
http://ws.apache.org/wss4j/apidocs/constant-values.html

Cheers,
Robert.

On 6/22/06, hescot@alice.it <he...@alice.it> wrote:
>
>  Hi Martin,
>
> my degree is in Information Science
>
> I have a problem with the server side when I don't add the handler
> response It works very well and the client receive the service, but when i
> deploy the server with responseFlow:
>
> <responseFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </responseFlow>
>
> the client don't process the request and it's ok, but don't receive error
> from the server, so the client can't understand which kind of problem is it.
>
> How can i resolve this problem?
>
> Thanks a lot for your precious help
>
>
> -----Messaggio originale-----
> Da: Martin Kuba [mailto:makub@ics.muni.cz <ma...@ics.muni.cz>]
> Inviato: mer 21/06/2006 17.04
> A: hescot@alice.it
> Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
>
> hescot@alice.it wrote:
> > Hi Martin
> > Thank for your help, I'm sorry for all my mistake I'm new of wss4j and
> > I'm developing a service for my degree.
>
> Which degree ?
>
>
> > now I've a problem with the code that you send me and so it gives me an
> > error on this:
> > this.deployTransport("http", new SimpleTargetedChain(new
> > org.apache.axis.transport.http.HTTPSender));
> > on new org.apache.axis.transport.http.HTTPSender says misplaced
> consructor
>
> I did not try that code, so there are possibly mistakes.
> In this case put parenteses () just after HTTPSender.
>
> > and the last thing of the code you send me
> > w.setOption I don't understad what i need to insert in, I think that
> > I've to set cryproSender.properties but I don't understand how.
>
> As I wrote, I did not try to configure a client
> for WSS4J in this way, so I am not sure, but probably
> setOption() can set the parameters as they are set
> in <requestFlow> in client-config.wsdd.
>
> The documentation for this is not very good,
> you have to dowload the source of Axis
> and investigate.
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Supercomputing Center Brno             Martin Kuba
> Institute of Computer Science    email: makub@ics.muni.cz
> Masaryk University             http://www.ics.muni.cz/~makub/<http://www.ics.muni.cz/%7Emakub/>
> Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
> --------------------------------------------------------------
>
>

Re: R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by Robert Maier <ro...@gmail.com>.
Hermann,

Like Martin said previously, I believe you need <requestFlow><handler type="
java:org.apache.ws.axis.security.WSDoAllReceiver" >...</handler></requestFlow>
instead of what you have (i.e. <responseFlow>...</responseFlow>) if this is
at the server side. At the server side you need to process  the _received_
(hence WSDoAllReceiver)  SOAP Request messages (hence
<requestFlow>...</requestFlow>).

With respect to the setOption(...) question, I recently managed to configure
a client without having the client-config.wsdd file present (so all
parameters programatically), so in your case it would look like:
  w.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
for setting the "signaturePropFile" parameter and analogously for other
parameters. You can find the correspondence between the WSHandlerConstants
and the parameters placed in wsdd files here:
http://ws.apache.org/wss4j/apidocs/constant-values.html

Cheers,
Robert.

On 6/22/06, hescot@alice.it <he...@alice.it> wrote:
>
>  Hi Martin,
>
> my degree is in Information Science
>
> I have a problem with the server side when I don't add the handler
> response It works very well and the client receive the service, but when i
> deploy the server with responseFlow:
>
> <responseFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
>      <parameter name="action" value="Signature"/>
>      <parameter name="signaturePropFile"
> value="cryptoReceiver.properties" />
>    </handler>
> </responseFlow>
>
> the client don't process the request and it's ok, but don't receive error
> from the server, so the client can't understand which kind of problem is it.
>
> How can i resolve this problem?
>
> Thanks a lot for your precious help
>
>
> -----Messaggio originale-----
> Da: Martin Kuba [mailto:makub@ics.muni.cz <ma...@ics.muni.cz>]
> Inviato: mer 21/06/2006 17.04
> A: hescot@alice.it
> Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
>
> hescot@alice.it wrote:
> > Hi Martin
> > Thank for your help, I'm sorry for all my mistake I'm new of wss4j and
> > I'm developing a service for my degree.
>
> Which degree ?
>
>
> > now I've a problem with the code that you send me and so it gives me an
> > error on this:
> > this.deployTransport("http", new SimpleTargetedChain(new
> > org.apache.axis.transport.http.HTTPSender));
> > on new org.apache.axis.transport.http.HTTPSender says misplaced
> consructor
>
> I did not try that code, so there are possibly mistakes.
> In this case put parenteses () just after HTTPSender.
>
> > and the last thing of the code you send me
> > w.setOption I don't understad what i need to insert in, I think that
> > I've to set cryproSender.properties but I don't understand how.
>
> As I wrote, I did not try to configure a client
> for WSS4J in this way, so I am not sure, but probably
> setOption() can set the parameters as they are set
> in <requestFlow> in client-config.wsdd.
>
> The documentation for this is not very good,
> you have to dowload the source of Axis
> and investigate.
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Supercomputing Center Brno             Martin Kuba
> Institute of Computer Science    email: makub@ics.muni.cz
> Masaryk University             http://www.ics.muni.cz/~makub/<http://www.ics.muni.cz/%7Emakub/>
> Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
> --------------------------------------------------------------
>
>

R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by he...@alice.it.
Hi Martin,

my degree is in Information Science

I have a problem with the server side when I don't add the handler response It works very well and the client receive the service, but when i deploy the server with responseFlow:

<responseFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
     <parameter name="action" value="Signature"/>
     <parameter name="signaturePropFile"
value="cryptoReceiver.properties" />
   </handler>
</responseFlow>

the client don't process the request and it's ok, but don't receive error from the server, so the client can't understand which kind of problem is it.

How can i resolve this problem?

Thanks a lot for your precious help


-----Messaggio originale-----
Da: Martin Kuba [mailto:makub@ics.muni.cz]
Inviato: mer 21/06/2006 17.04
A: hescot@alice.it
Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
 
hescot@alice.it wrote:
> Hi Martin
> Thank for your help, I'm sorry for all my mistake I'm new of wss4j and 
> I'm developing a service for my degree.

Which degree ?


> now I've a problem with the code that you send me and so it gives me an 
> error on this:
> this.deployTransport("http", new SimpleTargetedChain(new 
> org.apache.axis.transport.http.HTTPSender));
> on new org.apache.axis.transport.http.HTTPSender says misplaced consructor

I did not try that code, so there are possibly mistakes.
In this case put parenteses () just after HTTPSender.

> and the last thing of the code you send me
> w.setOption I don't understad what i need to insert in, I think that 
> I've to set cryproSender.properties but I don't understand how.

As I wrote, I did not try to configure a client
for WSS4J in this way, so I am not sure, but probably
setOption() can set the parameters as they are set
in <requestFlow> in client-config.wsdd.

The documentation for this is not very good,
you have to dowload the source of Axis
and investigate.

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub@ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------


R: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration

Posted by he...@alice.it.
Hi Martin,

my degree is in Information Science

I have a problem with the server side when I don't add the handler response It works very well and the client receive the service, but when i deploy the server with responseFlow:

<responseFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
     <parameter name="action" value="Signature"/>
     <parameter name="signaturePropFile"
value="cryptoReceiver.properties" />
   </handler>
</responseFlow>

the client don't process the request and it's ok, but don't receive error from the server, so the client can't understand which kind of problem is it.

How can i resolve this problem?

Thanks a lot for your precious help


-----Messaggio originale-----
Da: Martin Kuba [mailto:makub@ics.muni.cz]
Inviato: mer 21/06/2006 17.04
A: hescot@alice.it
Oggetto: Re: R: [WSS4J 1.5] WS-Security Help Client-Server Configuration
 
hescot@alice.it wrote:
> Hi Martin
> Thank for your help, I'm sorry for all my mistake I'm new of wss4j and 
> I'm developing a service for my degree.

Which degree ?


> now I've a problem with the code that you send me and so it gives me an 
> error on this:
> this.deployTransport("http", new SimpleTargetedChain(new 
> org.apache.axis.transport.http.HTTPSender));
> on new org.apache.axis.transport.http.HTTPSender says misplaced consructor

I did not try that code, so there are possibly mistakes.
In this case put parenteses () just after HTTPSender.

> and the last thing of the code you send me
> w.setOption I don't understad what i need to insert in, I think that 
> I've to set cryproSender.properties but I don't understand how.

As I wrote, I did not try to configure a client
for WSS4J in this way, so I am not sure, but probably
setOption() can set the parameters as they are set
in <requestFlow> in client-config.wsdd.

The documentation for this is not very good,
you have to dowload the source of Axis
and investigate.

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub@ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------