Hello freinds,
I am trying to impliment request header security with WSS4j in Axis 1.4.... ok while calling the server side services im encountering the following error please help me out since im struggling with it for long time ...
im not using any encryption
org.apache.xml.security.c14n.CanonicalizationException: Element ns1:a has a relative namespace: ns1="servicename"
========================================================================
server side setup -- In deploy.wsdd file i have added following param
========================================================================
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="services.PWCallback"/>
<parameter name="action" value="UsernameToken"/>
</handler>
</requestFlow>
========================================================================
Clientside Setup - created client_deploy.wsdd file
========================================================================
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<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="user" value="wss4j"/>
<parameter name="passwordType" value="PasswordText" />
<parameter name="passwordCallbackClass" value="samples.userguide.example7.PWCallback"/>
</handler>
</requestFlow >
</globalConfiguration >
</deployment>
========================================================================
Client Side
JAVA File where in serviceis invoked
========================================================================
System.setProperty("axis.ClientConfigFile","D:\\Jboss4_axis\\sample\\sample.war\\WEB-INF\\classes\\client_deploy.wsdd");
Service service = new Service();
QName qn = new QName("urn:Name", "Serviceformname");
call.setUsername("wss4j");
call.setProperty("action","UsernameToken");
call.setProperty(WSConstants.PASSWORD_TYPE_ATTR,WSConstants.PASSWORD_TEXT);
call.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,"samples.userguide.example7.PWCallback");
========================================================================
Please revert back sooooooooooon
Regards
P Kalvit