0 Replies Latest reply: Aug 30, 2010 11:20 AM by Jay L RSS

    Exception when signing request

    Jay L Newbie

      Hi, folks.


      I'm a forum and Metro newbie. I am trying to sign my client requests but seeing the exception:


      com.sun.xml.wss.XWSSecurityException: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'jboss-ws-security'.


      Does anyone know what might be causing this issue?


      I was told that I needed to remove all the JBossWS JARs when using XWSS in Metro with JBoss. I tried this, and that did not work. What am I missing in getting this to work?


      The client code contains --


      InputStream securityStream = getClass().getResourceAsStream( configFile );
      XWSSecurityConfiguration secCfg = SecurityConfigurationFactory.newXWSSecurityConfiguration( securityStream );
      reqContext.put( XWSSecurityConfiguration.MESSAGE_SECURITY_CONFIGURATION, secCfg );


      The client config file constains this --


      <?xml version="1.0" encoding="UTF-8"?>
      <xwss:JAXRPCSecurity xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
      <xwss:SecurityConfiguration dumpMessages="true">
      <xwss:X509Token certificateAlias="xws-security-client" />
      <SecurityEnvironmentHandler class>


      Any suggestions you can provide would be appreciated!