ERROR - org.apache.ws.security.WSSecurityException: WSHandler: Encryption: no 
crypto property file OR Invalid operation: 
{http://www.w3.org/2001/04/xmlenc#}EncryptedData
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: XFIRE-1155
                 URL: https://jira.codehaus.org/browse/XFIRE-1155
             Project: XFire
          Issue Type: Bug
         Environment: win xp  jdk1.6  spring
            Reporter: Jeffrey
            Assignee: Dan Diephouse
             Fix For: 1.2.6


Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not 
invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: 
Invalid operation: {http://www.w3.org/2001/04/xmlenc#}EncryptedData
org.codehaus.xfire.fault.XFireFault: Invalid operation: 
{http://www.w3.org/2001/04/xmlenc#}EncryptedData
        at 
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
        at 
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
        at 
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
        at 
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
        at 
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
        at org.codehaus.xfire.client.Client.invoke(Client.java:336)
        at 
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy0.getRefinedTopicCount(Unknown Source)
        at com.monitor.client.ClientEnc.main(ClientEnc.java:47)


outsecurity.properties:
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=storepass
org.apache.ws.security.crypto.merlin.file=com/monitor/client/wss4j/clientStore.jks

java security :
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
security.provider.6=com.sun.security.sasl.Provider
security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.8=sun.security.smartcardio.SunPCSC
security.provider.9=sun.security.mscapi.SunMSCAPI
security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider

and the client code:
public class ClientEnc {
        private static XFireProxyFactory serviceFactory = new 
XFireProxyFactory();
        public static void main(String[] args){
                Service serviceModel = new 
ObjectServiceFactory().create(BbtForumService.class);
                try {
                        System.out.println(System.getProperty("user.dir"));
                        BufferedReader br= new BufferedReader(new 
FileReader("server/com/monitor/client/wss4j/outsecurity.properties"));
                        String s;
                        
                        while ((s = br.readLine()) != null){
                                System.out.println(s);
                        }
                        br.close();
                        String serviceURL = 
"http://localhost:8080/ws/services/BbtForumServiceEnc";;
                        BbtForumService service = 
(BbtForumService)serviceFactory.create(serviceModel, 
                                        serviceURL);
                        Client client = 
((XFireProxy)Proxy.getInvocationHandler(service)).getClient();
                        client.addOutHandler(new DOMOutHandler());
                        Properties properties = new Properties();
                        properties.setProperty(WSHandlerConstants.ACTION, 
WSHandlerConstants.ENCRYPT);
                        
properties.setProperty(WSHandlerConstants.ENC_PROP_FILE, 
                                        
"com/monitor/client/wss4j/outsecurity.properties");
                        
//properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, 
WSConstants.TRIPLE_DES);
                        
properties.setProperty(WSHandlerConstants.ENCRYPTION_USER, "server");
                        client.addOutHandler(new WSS4JOutHandler(properties));
                        int count = service.getRefinedTopicCount(20);
                        System.out.println("count" + count);
                } catch (MalformedURLException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }
}

I have succeeded in signature and usertoken but only the encryption. I am 
driver mad!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to