File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes axi2/java and axis2/c adb authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "axi2/java and axis2/c adb authentication" Watch "axi2/java and axis2/c adb authentication" New topic
Author

axi2/java and axis2/c adb authentication

Jane Lynn
Greenhorn

Joined: Dec 05, 2007
Posts: 4
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

Joined: Dec 05, 2007
Posts: 4
B.T.W. I copied the client stub code from:
http://wso2.org/library/161


Thanks!

Jane
 
Don't get me started about those stupid light bulbs.
 
subject: axi2/java and axis2/c adb authentication