JBoss Community

Exception when signing request

created by Jay L in JBoss Web Services Metro - View the full discussion

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:Service>
<xwss:SecurityConfiguration dumpMessages="true">
<xwss:Sign>
<xwss:X509Token certificateAlias="xws-security-client" />
</xwss:Sign>
</xwss:SecurityConfiguration>
</xwss:Service>
<xwss:SecurityEnvironmentHandler>
<SecurityEnvironmentHandler class>
</xwss:SecurityEnvironmentHandler>
</xwss:JAXRPCSecurity>

 

Any suggestions you can provide would be appreciated!

Reply to this message by going to Community

Start a new discussion in JBoss Web Services Metro at Community