Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

axi2/java and axis2/c adb authentication

 
Jane Lynn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an existing project that uses axis2/c 1.4 at the client side and axis2/java 1.4 at the server side. We made use of the adb support in both the client and server side. It works fine.

Now we would like to add authentication to it. So I performed the following steps:
1. copied the rampart-1.3.mar files downloaded from axis2/java 1.4 separate release to the WEB-INF/modules. Copied the related jars to WEB-INF/lib.
2. Added the following lines to my webservice's services.xml:
<module ref="rampart" />
<parameter name="InflowSecurity">
<action>
<items>UsernameToken Timestamp</items>
<passwordCallbackClass>PWHandler</passwordCallbackClass>
</action>
</parameter>
3. I tried with a Java test client first:
I added the following lines to the client after the stub is newed:
HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();

proxyProperties.setProxyName("localhost");
proxyProperties.setProxyPort(8887);
proxyProperties.setDomain("localhost/abc");
proxyProperties.setPassWord("passwd");
proxyProperties.setUserName("usernm");


//in order to makesure that we use HTTP 1.0
stub._getServiceClient().getOptions().setProperty(MessageContextConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_10);
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.PROXY,
proxyProperties);
//.... follows by the codes to issue calls to the server...

4. When I tried to run my test program, it returns:
org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
....

5. I also noticed that the SOAPMonitor stops to receive the incoming request after the above changes.

What have I done wrong? Any advices would be appreciated!

Jane
 
Jane Lynn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
B.T.W. I copied the client stub code from:
http://wso2.org/library/161


Thanks!

Jane
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic