RE: Rampart signature

2007-10-18 Thread Senthivel U S
I am using axis2-1.2, rampart is necessary

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 6:14 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

 

I meant 1.x.  With upgrade to axis2 rampart is necessary for client
certificates.

 

  _  

From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 4:08 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

Actually I am using Axis/1.3 but I have used this for signing since I could
not make it with rampart.

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 6:02 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

 

It look slike you are using axis1.  I need a solution for axis2.

I have Rampart set up properly I just need a policy.xml which will allow me
to send a client certificate. (no encryption and no timestamp)

 

Does anyone have a policy.xml  that defines this?

 

  _  

From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 1:17 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

Hi,

 

Couple of days back I had the same problem but I could not make it using
rampart but solved the problem.  Find below the working code. I have created
the stub using wsdl with Eclipse IDE.

 

URL endPointURL = new URL("http:// ");

EngineConfiguration config = new FileProvider("client_deploy.wsdd");

Service service = new Service(config);

TestSoapStub stub = new TestSoapStub(endPointURL, service);

 

stub._setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);

stub._setProperty(WSHandlerConstants.SIG_PROP_FILE,
"client_crypto.properties");

stub._setProperty(WSHandlerConstants.USER, "client");

 
stub._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,"com.unistream.client
.ServiceSecurityHandler");

 
stub._setProperty(WSHandlerConstants.SIG_KEY_ID,"DirectReference");

 

  stub.login(userID,password);

 

client.deploy.wsdd file (just copy the same contents)

 

http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 

  

   





   

  



 

client_crypto.properties file  (just copy  the same contents and change the
keystore.password, keystore.alias, alias.password, merlin.file according to
ur spec)

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin

org.apache.ws.security.crypto.merlin.keystore.type=jks

org.apache.ws.security.crypto.merlin.keystore.password=xyzabc

org.apache.ws.security.crypto.merlin.keystore.alias=client

org.apache.ws.security.crypto.merlin.alias.password= xyzabc

org.apache.ws.security.crypto.merlin.file=client.jks

 

If you find any other better solution, please let me know.

 

Regards,

 

-senthil

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 7:54 PM
To: axis-user@ws.apache.org
Subject: Rampart signature

 

I am using Axis2-1.3 and Rampart 1.3.

I am the client and my requests need to be signed.

 

My axis.client.xml includes the following

 

 

 

 
  
Signature
wally
crypto.properties
 
net.idt.svp.security.PWCallback
DirectReference
  


 


   
 Signature
 crypto.properties
   


 

My crypto.properties 

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.file=J:\svp_prime\trunk\security\test.j
ks
org.apache.ws.security.crypto.merlin.keystore.password=pswd

My Client includes the following:

_serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(targetEndpoint));
 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);

 

StAXOMBuilder builder = new StAXOMBuilder("resources/policy.xml");

Policy clientPolicy =
PolicyEngine.getPolicy(builder.getDocumentElement());
 
_serviceClient.getOptions().setProperty(RampartMessageData.KEY_RAMPART_POLIC
Y, clientPolicy);
_serviceClient.engageModule("rampart");

My problem is that I have no clue how to set up the policy.xml.  Rampart's
examples do not include an example of pure signature only (no timestamp).

 

 

Can someone supply me with an example?

Thanks.



RE: Rampart signature

2007-10-18 Thread Senthivel U S
Actually I am using Axis/1.3 but I have used this for signing since I could
not make it with rampart.

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 6:02 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

 

It look slike you are using axis1.  I need a solution for axis2.

I have Rampart set up properly I just need a policy.xml which will allow me
to send a client certificate. (no encryption and no timestamp)

 

Does anyone have a policy.xml  that defines this?

 

  _  

From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 1:17 PM
To: axis-user@ws.apache.org
Subject: RE: Rampart signature

Hi,

 

Couple of days back I had the same problem but I could not make it using
rampart but solved the problem.  Find below the working code. I have created
the stub using wsdl with Eclipse IDE.

 

URL endPointURL = new URL("http:// ");

EngineConfiguration config = new FileProvider("client_deploy.wsdd");

Service service = new Service(config);

TestSoapStub stub = new TestSoapStub(endPointURL, service);

 

stub._setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);

stub._setProperty(WSHandlerConstants.SIG_PROP_FILE,
"client_crypto.properties");

stub._setProperty(WSHandlerConstants.USER, "client");

 
stub._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,"com.unistream.client
.ServiceSecurityHandler");

 
stub._setProperty(WSHandlerConstants.SIG_KEY_ID,"DirectReference");

 

  stub.login(userID,password);

 

client.deploy.wsdd file (just copy the same contents)

 

http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 

  

   





   

  



 

client_crypto.properties file  (just copy  the same contents and change the
keystore.password, keystore.alias, alias.password, merlin.file according to
ur spec)

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin

org.apache.ws.security.crypto.merlin.keystore.type=jks

org.apache.ws.security.crypto.merlin.keystore.password=xyzabc

org.apache.ws.security.crypto.merlin.keystore.alias=client

org.apache.ws.security.crypto.merlin.alias.password= xyzabc

org.apache.ws.security.crypto.merlin.file=client.jks

 

If you find any other better solution, please let me know.

 

Regards,

 

-senthil

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 7:54 PM
To: axis-user@ws.apache.org
Subject: Rampart signature

 

I am using Axis2-1.3 and Rampart 1.3.

I am the client and my requests need to be signed.

 

My axis.client.xml includes the following

 

 

 

 
  
Signature
wally
crypto.properties
 
net.idt.svp.security.PWCallback
DirectReference
  


 


   
 Signature
 crypto.properties
   


 

My crypto.properties 

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.file=J:\svp_prime\trunk\security\test.j
ks
org.apache.ws.security.crypto.merlin.keystore.password=pswd

My Client includes the following:

_serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(targetEndpoint));
 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);

 

StAXOMBuilder builder = new StAXOMBuilder("resources/policy.xml");

Policy clientPolicy =
PolicyEngine.getPolicy(builder.getDocumentElement());
 
_serviceClient.getOptions().setProperty(RampartMessageData.KEY_RAMPART_POLIC
Y, clientPolicy);
_serviceClient.engageModule("rampart");

My problem is that I have no clue how to set up the policy.xml.  Rampart's
examples do not include an example of pure signature only (no timestamp).

 

 

Can someone supply me with an example?

Thanks.



RE: Rampart signature

2007-10-18 Thread Senthivel U S
Hi,

 

Couple of days back I had the same problem but I could not make it using
rampart but solved the problem.  Find below the working code. I have created
the stub using wsdl with Eclipse IDE.

 

URL endPointURL = new URL("http:// ");

EngineConfiguration config = new FileProvider("client_deploy.wsdd");

Service service = new Service(config);

TestSoapStub stub = new TestSoapStub(endPointURL, service);

 

stub._setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);

stub._setProperty(WSHandlerConstants.SIG_PROP_FILE,
"client_crypto.properties");

stub._setProperty(WSHandlerConstants.USER, "client");

 
stub._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,"com.unistream.client
.ServiceSecurityHandler");

 
stub._setProperty(WSHandlerConstants.SIG_KEY_ID,"DirectReference");

 

  stub.login(userID,password);

 

client.deploy.wsdd file (just copy the same contents)

 

http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 

  

   





   

  



 

client_crypto.properties file  (just copy  the same contents and change the
keystore.password, keystore.alias, alias.password, merlin.file according to
ur spec)

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin

org.apache.ws.security.crypto.merlin.keystore.type=jks

org.apache.ws.security.crypto.merlin.keystore.password=xyzabc

org.apache.ws.security.crypto.merlin.keystore.alias=client

org.apache.ws.security.crypto.merlin.alias.password= xyzabc

org.apache.ws.security.crypto.merlin.file=client.jks

 

If you find any other better solution, please let me know.

 

Regards,

 

-senthil

 

  _  

From: Tirtza Bernstein [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 7:54 PM
To: axis-user@ws.apache.org
Subject: Rampart signature

 

I am using Axis2-1.3 and Rampart 1.3.

I am the client and my requests need to be signed.

 

My axis.client.xml includes the following

 

 

 

 
  
Signature
wally
crypto.properties
 
net.idt.svp.security.PWCallback
DirectReference
  


 


   
 Signature
 crypto.properties
   


 

My crypto.properties 

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry
pto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.file=J:\svp_prime\trunk\security\test.j
ks
org.apache.ws.security.crypto.merlin.keystore.password=pswd

My Client includes the following:

_serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(targetEndpoint));
 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);

 

StAXOMBuilder builder = new StAXOMBuilder("resources/policy.xml");

Policy clientPolicy =
PolicyEngine.getPolicy(builder.getDocumentElement());
 
_serviceClient.getOptions().setProperty(RampartMessageData.KEY_RAMPART_POLIC
Y, clientPolicy);
_serviceClient.engageModule("rampart");

My problem is that I have no clue how to set up the policy.xml.  Rampart's
examples do not include an example of pure signature only (no timestamp).

 

 

Can someone supply me with an example?

Thanks.



RE: sending calendar object in axis stub

2007-10-15 Thread Senthivel U S
Hi Jeff,

 

Thanks for your clue. I have sorted out the issue. Now I am trying to sign.
Please throw me some light how to engage the security modules only for
created stub. I have tried this, but it gives the error, "Security token not
found".

 

My code:

 

URL endPointURL = new URL("http:// ");

EngineConfiguration config = new FileProvider("services.xml");

Service service = new Service();

DefaultSoapStub stub = new DefaultSoapStub(endPointURL, service);

 

 

Service.xml is

 





Testing







  

Timestamp

service.properties

SKIKeyIdentifier

useReqSigCert

client

service.properties

 
com.unistream.client.ServiceSecurityHandler  

 
{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-20040
1-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.
org/soap/envelope/}Body

 

  



 

 

TIA,

-senthil

 

  _  

From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 6:32 PM
To: axis-user@ws.apache.org
Subject: RE: sending calendar object in axis stub

 

Hi Senthil,

shame on them for writing a language-specific web serivce!

 

Anyway, if they are the authors of the web service and you are the client,
then you must have gotten the wsdl from them. The wsdl must have a
complexType in it that declares the issuedDate as non-nillable.  But I can't
tell why the line "transfer.setIssueDate(Calendar.getInstance());" failed.

You'll have to debug it and step through slowly at this point to see if the
instance returned from Calendar.getInstance() is null or not. (If it is not
null, then it is getting nulled out later before the stub attempts to
serialize everything).

This is my guess.

-jeff

 

  _  

From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 9:38 AM
To: axis-user@ws.apache.org
Subject: RE: sending calendar object in axis stub

Hi Jeff,

 

Thanks for your comments and I do agree with you. The service was deployed
by third party and I want to consume the service. I have created my stub
using wsdl (Eclipse IDE).

 

TIA,

-senthil

 

 


  _  


From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 5:08 PM
To: axis-user@ws.apache.org
Subject: RE: sending calendar object in axis stub

 

Hi Senthil,

Don't pass language specific constructs like Calendar, in a web service
call.

 

You are better taking the less obvious route; just pass the minimal amount
number fo fields in the Calendar object that can be used by a client to
regenerate the equivalent object on their side. That is, build a new
complexType in XML Schema and use Doc/Lit-wrapped web services.

 

The main reason is simply, interoperability. Even of you know all of your
clients will be Java going forward, it's bad practice to pass language
specific objects in a web service. If indeed all of your clients will always
be Java, then you would benefit from RMI or EJB where you would get a
significant speed increase. Web Services is for interoperability across
disparate systems.

Regards,

-jeff

 


  _  


From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 8:27 AM
To: axis-user@ws.apache.org
Subject: sending calendar object in axis stub

Hi,

 

I have a stub, in that I want to pass calendar object, while passing I am
getting the following error.  Is any serializer to be included to pass
calendar object.

 

java.io.IOException: Non nillable element 'issuedDate' is null.

at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:21
5)

at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationC
ontext.java:1502)

 

My code is 

 

transfer.setIssueDate(Calendar.getInstance());

stub.insertTransfer(transfer);

 

TIA,

-senthil

 



RE: sending calendar object in axis stub

2007-10-15 Thread Senthivel U S
Hi Jeff,

 

Thanks for your comments and I do agree with you. The service was deployed
by third party and I want to consume the service. I have created my stub
using wsdl (Eclipse IDE).

 

TIA,

-senthil

 

 

  _  

From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 5:08 PM
To: axis-user@ws.apache.org
Subject: RE: sending calendar object in axis stub

 

Hi Senthil,

Don't pass language specific constructs like Calendar, in a web service
call.

 

You are better taking the less obvious route; just pass the minimal amount
number fo fields in the Calendar object that can be used by a client to
regenerate the equivalent object on their side. That is, build a new
complexType in XML Schema and use Doc/Lit-wrapped web services.

 

The main reason is simply, interoperability. Even of you know all of your
clients will be Java going forward, it's bad practice to pass language
specific objects in a web service. If indeed all of your clients will always
be Java, then you would benefit from RMI or EJB where you would get a
significant speed increase. Web Services is for interoperability across
disparate systems.

Regards,

-jeff

 

  _  

From: Senthivel U S [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 8:27 AM
To: axis-user@ws.apache.org
Subject: sending calendar object in axis stub

Hi,

 

I have a stub, in that I want to pass calendar object, while passing I am
getting the following error.  Is any serializer to be included to pass
calendar object.

 

java.io.IOException: Non nillable element 'issuedDate' is null.

at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:21
5)

at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationC
ontext.java:1502)

 

My code is 

 

transfer.setIssueDate(Calendar.getInstance());

stub.insertTransfer(transfer);

 

TIA,

-senthil

 



sending calendar object in axis stub

2007-10-15 Thread Senthivel U S
Hi,

 

I have a stub, in that I want to pass calendar object, while passing I am
getting the following error.  Is any serializer to be included to pass
calendar object.

 

java.io.IOException: Non nillable element 'issuedDate' is null.

at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:21
5)

at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationC
ontext.java:1502)

My code is 

 

transfer.setIssueDate(Calendar.getInstance());

stub.insertTransfer(transfer);

 

TIA,

-senthil

 



Signing a message

2007-10-10 Thread Senthivel U S
Greetings,

 

We have got the wsdl file and created Stub using WSDL2Java. We need to sign
the message using our certificate.  I find the following code  

 

EngineConfiguration config = new
FileProvider("client_deploy.wsdd");

Service service = new Service();



stub.setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);

stub.setProperty(WSHandlerConstants.SIG_PROP_FILE,
"client_crypto.properties");

stub.setProperty(WSHandlerConstants.USER, "ceriticate alias name
to be given");

 

Please guide us how to do.

 

TIA,

-senthil