org.apache.axis2.AxisFault: Error in signature with X509Token

2009-04-24 Thread karaiyandi sethurajan

Hi All,

I am using axis2-1.4.1 with rampart-1.4 to consume a websevice hosted in .Net 
server.

I created Java keystore based on the given certificates. when i try to access 
the webservice from the Java client i am getting the following error.

org.apache.axis2.AxisFault: Error in signature with X509Token
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
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.send(AxisEngine.java:429)
at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.phoneix.stubs.Service1Stub.GetData(Service1Stub.java:473)
at com.phoneix.client.Democlient.main(Democlient.java:36)
Caused by: org.apache.rampart.RampartException: Error in signature with 
X509Token
at 
org.apache.rampart.builder.BindingBuilder.getSignatureBuider(BindingBuilder.java:304)
at 
org.apache.rampart.builder.AsymmetricBindingBuilder.doSignature(AsymmetricBindingBuilder.java:626)
at 
org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:413)
at 
org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:93)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
... 8 more
Caused by: org.apache.ws.security.WSSecurityException: General security error 
(Unexpected number of X509Data: for Signature)
at 
org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:296)
at 
org.apache.rampart.builder.BindingBuilder.getSignatureBuider(BindingBuilder.java:300)
... 13 more

I have attached the Java code also , if anyone have idea why these error is 
occured please help me to solve the issue.

Java code.

ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(test, 
null);
Service1Stub stub = new Service1Stub(ctx, URL);
ServiceClient sc = stub._getServiceClient();
sc.engageModule(rampart);
StAXOMBuilder builder = new StAXOMBuilder(policy.xml);
Policy policy = 
PolicyEngine.getPolicy(builder.getDocumentElement());


sc.getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.AXIS_SERVICE_POLICY,
 policy);
System.out.println( 22 );

GetData  getData = new GetData();
stub.GetData(getData);
System.out.println( The Webservie call is Over );




Thanks in Advance
Karai




  Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! 
Edition http://downloads.yahoo.com/in/firefox/


Help Webservice security | Axis2 client with .net Webservice

2009-04-22 Thread karaiyandi sethurajan

 
Hi All,
 
I need to access webservice hosted in .net server. The webservice was secured. 
I need access the webservice using Java Client. 
 
The following ceritificates is provided.

1. PartnerRe_Root_CA_TST.cer is our temporary Root Certificate Authority's 
public key we have to trust.
2.PartnerRe CWS Services Client v1.0.cer

I can able to create client stubs using Axis2. How can i use Rampart in this 
scenario to access the  webservice hosted in .net server.

Any help on this will  be much appreciated.

Thanks in Advance
Karai



  Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! 
Edition http://downloads.yahoo.com/in/firefox/