This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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();
//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!