Hi I am just getting started with wss4j. So far so good. I got wss4j setup with a simple ping/echo service. However after successful authentication/verification my main soap class which holds the actual method to invoke is not getting called at all. Instead I am getting back an empty response back from server and no error. I do see the pwcallback class getting called successfully and user getting verified.

Here is part of my deployment file on server side

<service name="PingService">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="test.PWCallBack"/>
<parameter name="action" value="UsernameToken"/>
</handler>
</requestFlow>
<parameter name="className" value="test.PingServiceManager"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="application"/>
</service>


The test.PingServiceManager and the method "echo" in it is never getting called.

Here is my client side config

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow >
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="passwordCallbackClass" value="test.PWCallBack"/>
</handler>
</requestFlow >
</globalConfiguration >
</deployment>



I am adding other parameters programmatically:

Here is part of my client

String echoString = "Hello Secured World! ";
System.setProperty("axis.ClientConfigFile", "axis-client.wsdd");
try {
Service service = new org.apache.axis.client.Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL( mySOAPUrl ) );
call.setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_DIGEST );
call.setProperty(WSHandlerConstants.USER, "Ron");
call.setOperationName(new QName( "urn:pingService", "echo" ) );
call.addParameter( "input", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_STRING );
result = (String) call.invoke( new Object[] { echoString } );
System.out.println( "Result received: " + result );
}
catch ( Exception e ) {
System.out.println( "Error received: " + e.toString() );
}


Where run I get

Result received: null




Reply via email to