Hi josè, thank u for your reply I've changed the client side wsdd in this way:
<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="Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="org.apache.ws.axis.oasis.PWCallback"/>
<parameter name="passwordType" value="PasswordText" />
<parameter name="encryptionPropFile" value="crypto.properties" />
<parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
<parameter name="user" value="wss4j" />
<parameter name="encryptionParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken"/>
</handler>
</requestFlow>
</globalConfiguration >
</deployment>
<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="Signature Encrypt"/>
<parameter name="passwordCallbackClass" value="org.apache.ws.axis.oasis.PWCallback"/>
<parameter name="passwordType" value="PasswordText" />
<parameter name="encryptionPropFile" value="crypto.properties" />
<parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
<parameter name="user" value="wss4j" />
<parameter name="encryptionParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken"/>
</handler>
</requestFlow>
</globalConfiguration >
</deployment>
but now the exception is:
WSHandler: Signature: no crypto property file
I've copy in the folder
C:\Programmi\Apache\Tomcat_5_0\webapps\axis\WEB-INF\classes\prova2\prova2\client
- the keystore file
- the crypto.properties file
- and client_deploy.wsdd
Now I'm running the ClientSaluto class (phisically located in the workspace in another path) in eclipse sdk whith this client:
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import org.apache.axis.EngineConfiguration;
import org.apache.axis.configuration.FileProvider;
import org.apache.axis.configuration.FileProvider;
public static void main(String[] args) {
// TODO Auto-generated method stub
EngineConfiguration config = new FileProvider("C:\\Programmi\\Apache\\Tomcat_5_0\\webapps\\axis\\WEB-INF\\classes\\prova2\\prova2\\client\\client_deploy.wsdd");
SalutoService locator = new SalutoServiceLocator(config);
Saluto service; // interfaccia RMI creata a partire dal PortType
try {
service = locator.getSaluto2();
String reply;
String reply;
reply = service.saluto("Nicola");
System.out.println("IL WEB SERVICE HA RISPOSTO: " + reply);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("IL WEB SERVICE HA RISPOSTO: " + reply);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
But the scenario has the problems that i say...I don't know what I can do...:(
Bye
José Ferreiro <[EMAIL PROTECTED]> ha scritto:
José Ferreiro <[EMAIL PROTECTED]> ha scritto:
Should not be the following line should be the same in both files (client and server)?
<parameter name="action" value="Signature Encrypt"/>
or
<parameter name="action" value="UsernameToken Encrypt"/>
Hope this helps
José Ferreiro
PS:
<parameter name="action" value="Signature Encrypt"/>
means that Axis is checking if the request message is signed and encrypted then handle it
otherwise not
On 9/7/06, Luca Risello <[EMAIL PROTECTED]> wrote:Good mornig, I've a problem with this scenario...deploy of the service<deployment xmlns=" http://xml.apache.org/axis/wsdd/" xmlns:java=" http://xml.apache.org/axis/wsdd/providers/java">
<service name="Saluto2" provider="java:RPC" style="rpc" use="literal">
<requestFlow>
<handler type="java: org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="org.apache.ws.axis.oasis.PWCallback"/>
<parameter name="action" value="Signature Encrypt"/>
<parameter name="signaturePropFile" value="crypto.properties" />
</handler>
</requestFlow>
<parameter name="className" value="prova.Saluto" />
<parameter name="allowedMethods" value="saluto" />
<parameter name="scope" value="Request" />
</service>
</deployment>crypto.properties server side: (TomcatHome>/webapps/axis/WEB-INF/classes)org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=secureserver
org.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=server_keystoreclient_deploy.wsdd<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 Encrypt"/>
<parameter name="passwordCallbackClass" value=" org.apache.ws.axis.oasis.PWCallback"/>
<parameter name="passwordType" value="PasswordText" />
<parameter name="encryptionPropFile" value="crypto.properties " />
<parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
<parameter name="encryptionUser" value="wss4j" />
<parameter name="encryptionParts" value="{Element}{ http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken "/>
</handler>
</requestFlow>
</globalConfiguration >
</deployment>crypto.properties client sideorg.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=changeit
org.apache.ws.security.crypto.merlin.keystore.alias=wss4jorg.apache.ws.security.crypto.merlin.alias.password=changeit
org.apache.ws.security.crypto.merlin.file=client_keystoreObviously I've insert the client_keystore file in the same folder of cypto.properties (client side) and client_deploy.wsddBut when I run the client there is the following exceptionfaultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalExceptionfaultSubcode:faultString: WSDoAllSender: Empty username for specified actionHow can i fix this problem?There is a good documentation for wss4j, i see the official site but thera are few information about...thank you for your help.Bye!!!Luca
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
--
José Ferreiro
EPFL Communication Systems engineer
ing.sys.com.dipl.EPFL
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
