• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can't run rampart client

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
err : Exception in thread "main" org.apache.axis2.AxisFault: Read timed out

i use axis2,rampart,tomcat i have done all the things right but not yet worked and got this err
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What are you doing when you get this message?

How did you install Rampart?

Does the "Happy Axis" page (something like http://localhost:8080/axis2/axis2-web/HappyAxis.jsp) report that Axis is happy?

If you log into the Axis Admin page (something like http://localhost:8080/axis2/axis2-admin/) does it list "addressing", "rahas" and "rampart" as available modules?
[ September 25, 2008: Message edited by: Ulf Dittmer ]
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks in advance
I have deployed my service and its working and also i have that rampart and rahas module live in modules seen in admin page. When i execute that client service it shows the err

Exception in thread "main" org.apache.axis2.AxisFault: Connection refused: connect
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at tutorial.rampart.client.SecureServiceStub.add(SecureServiceStub.java:179)
at tutorial.rampart.client.SecureServiceCGClient.main(SecureServiceCGClient.java:34)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
... 9 more

please help me
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the exact same service (at the exact same URL) works fine if you access it without WS-Security, but is giving this exception if you access it with WS-Security?

Are there any error messages on the server side?
[ September 26, 2008: Message edited by: Ulf Dittmer ]
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i managed to get rid of previous error now i am getting this err

Exception in thread "main" org.apache.axis2.AxisFault: Unable to engage module : rampart

where to put the rampart module for client side;
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that the only message? Generally, before or after such a message there are other exceptions or messages that explain why the module can't be engaged.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" org.apache.axis2.AxisFault: Unable to engage module : rampart
at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:339)
at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:324)
at tutorial.rampart.client.SecureServiceCGClient.main(SecureServiceCGClient.java:25)

but i can see modules in admin page listing
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's just part of the stack trace of the exception. I was asking for other messages/exceptions.

Is this a client-side error? Rampart needs to be available on both sides, so the fact that it is displayed correctly on the admin page (which is on the server) doesn't mean that it's available on the client.
[ September 26, 2008: Message edited by: Ulf Dittmer ]
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes this is client side exceptions where to find the server side exceptions its not in log folder of tomcat folder
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Server error messages would be in catalina.out in the Tomcat logs folder. But if the client side throws an exception, then it's likely that the service requests never reaches the server, so there couldn't be any message, error or otherwise.

To be crystal clear, there are absolutely, positively no other client-side error messages or exceptions? Just the one you posted, nothing before it and nothing after it? No one-line messages either?
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nothing this is the err also there is no catalina.out

i got one doubt i went thru the axis2.xml there is no config for rampart[but i engaged in my services.xml] is it right?
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error might be at the line where i engage the module

sc.engageModule("rampart");
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i went thru the axis2.xml there is no config for rampart


That's correct. Modules are added by putting them into the "modules" directory.

sc.engageModule("rampart");


Why are you doing this? You do not need to add any code to make WS-Security work. All the required configuration would happen in the client.axis2.xml file (or whatever it's called in your setup).
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"You do not need to add any code to make WS-Security work"

Without sc.engagemodule() will rampart come into action?

if i comment the engage statement then this err appears

Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at tutorial.rampart.client.SecureServiceStub.add(SecureServiceStub.java:179)
at tutorial.rampart.client.SecureServiceCGClient.main(SecureServiceCGClient.java:34)
Caused by: com.ctc.wstx.exc.WstxIOException: Read timed out
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:118)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:422)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)
... 19 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:190)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the support so far

if you can't trace out the error then forward me a sample service to me with which i can check mine

[provide directory structure also.]

please contact me quickly
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Without sc.engagemodule() will rampart come into action?


Yes


Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)


So the root cause is an inability to make an HTTPS connection. Does it work if you use HTTP instead of HTTPS? Can you make HTTPS connections to any host from the client using Java?

(As an aside, WS-Security can perform encryption, so there should be no need to use HTTPS.)

For a ready-to-run example of how to use WS-Security/Rampart check out this article I wrote in the JavaRanch Journal: Web Services Authentication with Axis 2
[ September 26, 2008: Message edited by: Ulf Dittmer ]
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for the delayed reply your tutorial is simple and very useful thanks a lot i executed successfully and got idea about it.

But you don't provide information to build keys if you could please post that also because you are presenting simple and powerfull


thanks thanks a lot
karthic.p
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have a writeup about doing encryption with Rampart. I'm working on one, though, which might get published in the next couple of weeks.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once again i want your guide

Please refer me online guide or ebook or tutorial that covers the rampart in detail from the introduction itself(from basic itself).
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To my knowledge no such a tutorial/book exists.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now i got another problem, noticed very lately
when i run that fibonaci series service and client the communicated messages are not encrypted why?

POST /axis2/services/FibonacciService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: 127.0.0.1:8080
Transfer-Encoding: chunked

490
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-19712349">
<wsu:Created>2008-09-30T13:42:51.899Z</wsu:Created>
<wsu:Expires>2008-09-30T13:47:51.899Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-15778003">
<wsse:Username>wsuser</wsse:Username>
<wsse assword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">XV8fFsLc1Ox51BonPtm4TJy6SHo=</wsse assword>
<wsse:Nonce>1W6RjbglxmFgRxH44/vxzQ==</wsse:Nonce>
<wsu:Created>2008-09-30T13:42:51.889Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns1:calculateFibonacci xmlns:ns1="http://fibonacci/xsd">
<in0>3</in0>
</ns1:calculateFibonacci>
</soapenv:Body>
</soapenv:Envelope>0

There the requested 3 is displayed

please answer me quickly as posible
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post the OutflowSecurity and InflowSecurity elements of your Rampart client configuration.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once again thanks for your response
Here is the outflowsecurity config. It is the code provided in your tutorial

<parameter name="OutflowSecurity">
<action>
<items>UsernameToken Timestamp</items>
<!--
<items>UsernameToken</items>
-->
<user>wsuser</user>
<passwordCallbackClass>fibonacci.PWHandlerClient</passwordCallbackClass>
<!--
<passwordType>PasswordText</passwordType>
-->
<!--
<timeToLive>10</timeToLive>
-->
</action>
</parameter>
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My example doesn't handle encryption. For starters, the <items> tag needs an "Encrypt" in it, but you need to set up a few more things as well. Sample code #5 that comes with Rampart demonstrates the various pieces needed for encryption to work in both directions.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where is that sample code#5 is it in rampart tutorial

Waiting
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's part of the binary Rampart distribution. Not the module, but the actual distribution.

By the way, I wouldn't close a post with "Waiting". It gives the message an impatient, and even a bit demanding, tone. Better to avoid that.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for that it came with flow.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
another problem

i used that rampart tutorial sample5 but i got the error

Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Encryption)
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:67)
at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
at com.tps.test.CalculatorServiceClient.Calculate(CalculatorServiceClient.java:53)
at com.tps.test.CalculatorServiceClient.main(CalculatorServiceClient.java:62)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Encryption)
at org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:192)
at org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java:201)
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:64)
... 11 more


what is that error about?
I dont have any idea about it.
Thanks
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before applying encryption to your code I'd make sure that you can run the example without problems. Then you can selectively copy over bits of the files and keystores that you know are working.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats right i am working purely with examples alone but that too makes error
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This doesn't look like a stack trace from any Rampart example:
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the error i got when i did it with the rampart sample


Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Encryption)
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:67)
at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
at com.tps.ramp.Client.main(Client.java:46)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Encryption)
at org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:192)
at org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java:201)
at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:64)
... 10 more
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aside from renaming the package of the client, are you using the sample files (build.xml, service aar file, client key store, client config file etc.) exactly as they were shipped? Or did you make any other changes?
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i shipped all
but i don't use that build.xml is that needed.

Also i have an doubt.
I tried to .jks files with java keytool is that right, and that too cause error
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I tried to .jks files with java keytool is that right, and that too cause error


I don't understand what you're trying to say here (a verb seems to be missing). Not knowing what you were doing and what the exact error was it's impossible to advise on this.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I saw that in manual, that error unexpected number of x509 data is due to wrong alias name and alias password.



where the alias name and password are used in the rampart tutorial
upto to my knowledge alias and passwords are in
client.properties file
PWHandler.java just assigning password
is there any other place to use alias?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You shouldn't have to change any passwords or IDs whatsoever - the example comes ready to run, along with the keystore files. The supplied build.xml file makes this easy, as all the targets are predefined. If you think that you need to change anything, you're likely to be doing something incorrectly.
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After a long time i am back to disturb you sir dont mistake me

I copied the rampart sample5 and simply used it without any alterations but i got this error

Exception in thread "main" org.apache.axis2.AxisFault: org.apache.ws.security.components.crypto.Merlin cannot create instance
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
at org.apache.rampart.samples.sample05.Client.main(Client.java:45)
 
karthic panneer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may be a late reply, how ever i want to thank and report the solution.


The previous error[merlin cannot create instance] is due to a bug in axis2.1
i got this in a website.

Here is the link http://issues.apache.org/jira/browse/AXIS2-1006

Then i used axis 2.1.3 then the problem got solved.


Thank you very much for the support
 
reply
    Bookmark Topic Watch Topic
  • New Topic