jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • XFire
  • XFIRE-1155

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 1.2.6
  • Component/s: None
  • Labels:
    • exception
  • Environment:
    win xp jdk1.6 spring

Description

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!

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Dan Diephouse
    Reporter:
    Jeffrey
Vote (0)
Watch (0)

Dates

  • Created:
    31/Oct/11 9:31 PM
    Updated:
    31/Oct/11 9:31 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.