Discussion:
[jboss-user] [JBoss Web Services] - Migrating secured WS from JBoss 5.1 to 7.1.1
Xavier Dury
2012-12-06 10:06:43 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780326#780326

--------------------------------------------------------------
Hi,

I've been migrating one of our projects from JBoss 5.1 to 7.1.1, all was done without too much problems but I'm stuck on the security configuration for a Web Service (which does not have WS-Security Policy):

In JBoss 5.1, configuring WS-Security was done within the file "META-INF/jboss-wsse-server.xml"

<jboss-ws-security>
  <key-store-file>${wsse.keystore}</key-store-file>
          <key-store-type>jks</key-store-type>
          <key-store-password>${wsse.keystore.password}</key-store-password>
  <trust-store-file>${wsse.truststore}</trust-store-file>
          <trust-store-type>jks</trust-store-type>
          <trust-store-password>${wsse.truststore.password}</trust-store-password>
  <config>
    <timestamp ttl="3000" />
    <sign type="x509v3" alias="${wsse.keystore.alias}" />
    <requires>
      <timestamp maxAge="3000" />
      <signature />
    </requires>
  </config>
</jboss-ws-security>

So, I just need requests and responses to be signed and timestamped but I have a hard time understanding how to achieve this in AS7.1.1.

I've read the page https://docs.jboss.org/author/display/JBWS/WS-Security https://docs.jboss.org/author/display/JBWS/WS-Security, but it didn't help.

Do I need to configure this via jbossws-cxf.xml? (tried this but seems to be ignored)
Is it available out-of-the-box in JBoss AS7.1.1? (I see  spring is being used but there are no spring jars in the distribution)

I must be missing something...

Thanks,

Xavier
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780326#780326]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2012-12-06 14:00:21 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780379#780379

--------------------------------------------------------------
Ok, I installed the last version of JBossWS with -Dspring=true.

Now, jbossws-cxf.xml seems to be read but there's a problem with the schema validation:

14:47:11,737 WARN  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-7) Ignored XML validation warning: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 30; columnNumber: 145; schema_reference.4: Failed to read schema document ' http://cxf.apache.org/schemas/configuration/cxf-beans.xsd http://cxf.apache.org/schemas/configuration/cxf-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
          at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:97) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2525) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1834) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:1755) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:905) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:559) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) [xercesImpl-2.9.1-jbossas-1.jar:]
          at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans.jar:3.0.7.RELEASE]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans.jar:3.0.7.RELEASE]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans.jar:3.0.7.RELEASE]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans.jar:3.0.7.RELEASE]
          at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:190) [jbossws-cxf-server.jar:4.1.0.Final]
          at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:138) [jbossws-cxf-server.jar:4.1.0.Final]
          at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:129) [jbossws-cxf-server.jar:4.1.0.Final]
          at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68) [jbossws-cxf-server.jar:4.1.0.Final]
          at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74) [jbossws-jboss711-server-integration.jar:4.1.0.Final]
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]


14:47:11,792 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit."myproject.ear"."my_webservice.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myproject.ear"."my_webservice.jar".INSTALL: Failed to process phase INSTALL of subdeployment "my_webservice.jar" of deployment "myproject.ear"
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 106 in XML document from resource loaded through InputStream is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
          at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:190)
          at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:138)
          at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:129)
          at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68)
          at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
          ... 5 more
Caused by: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
          at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
          at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
          at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:390)
          at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)
          at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2514)
          at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1393)
          at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:77)
          at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:583)
          at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1071)
          at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:776)
          at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:262)
          at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:134)
          at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:366)
          at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:237)
          at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1255)
          at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:569)
          at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
          at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
          at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
          at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
          at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
          at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
          at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
          ... 13 more
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780379#780379]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2012-12-06 15:01:32 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780402#780402

--------------------------------------------------------------
Digging deeper: the module 'org.apache.cxf' depends on 'org.springframework.spring', that seems ok to me... but when spring parses the jbossws-cxf.xml file, it needs the schema (and the classes) present in the cxf module (but I don't think it can see them because spring does not depend on cxf).

Shouldn't spring be a part of the cxf module?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780402#780402]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2012-12-06 15:43:36 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780417#780417

--------------------------------------------------------------
looks like the schema ' http://cxf.apache.org/schemas/configuration/cxf-beans.xsd http://cxf.apache.org/schemas/configuration/cxf-beans.xsd' is being loaded on the web instead of classpath... and as I am behind a proxy, it does not work...
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780417#780417]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2012-12-08 10:49:21 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780774#780774

--------------------------------------------------------------
I reverted the installation of the latest distribution od jbossws (4.1.0) and just kept the spring module... now it is working.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780774#780774]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2012-12-08 10:52:02 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/780775#780775

--------------------------------------------------------------
The cxf-beans.xsd was loaded from the network instead as a classpath resource so I rolled back the installation of the latest jbossws (4.1.0) and just kept the spring module... now, it's working.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780775#780775]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-01-24 22:41:39 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/794184#794184

--------------------------------------------------------------
Hi Xavier,
I'm facing to the same problem about the cxf-beans.xsd being loaded from the network.
What do you mean by "rolling back the installation of the latest jbossws"? Have you removed the entire jboss-cxf jars in the cxf module and replaced them with the ones from cfx?
Thank you in advance,
Massai
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794184#794184]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-01-25 10:27:11 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/794261#794261

--------------------------------------------------------------
Hi Massai,

I kept the WS stack which comes with 7.1.1 and only added the needed spring jars (module) to my jboss install. If you update the whole WS stack (like I did first), the xsd is loaded from the network.

Xavier
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794261#794261]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-01-28 11:58:22 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/794584#794584

--------------------------------------------------------------
I previously missed this thread, sorry. So, at first sight it looks like there migth be a bug with xsd resolution on 4.1.0, so Xavier can you perhaps share the jbossws-cxf.xml you were using, so that I can try reproducing the problem? Thanks!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794584#794584]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-01-28 12:59:54 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/794608#794608

--------------------------------------------------------------
Here you are.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794608#794608]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-07-18 09:19:23 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/828564#828564

--------------------------------------------------------------
Hi Xavier,
It's me again about a question related to properties you seem to be able to load in your conf.
For example in your endpoint jaxws node I see that you are referencing the jboss.bind.adress (in bold)  property system.
Assuming it's defined as a propperty system, have you managed to inject it in you adress property?
I'm trying to do the same but it's not working.
I've tried also using the tag ${*jboss.bind.address} withous success.*
<jaxws:endpoint id="MyServiceWebService"
    address=" http:// http://*@jboss.bind.address@*:8080/application/MyService/MyServicePortType"
    implementor="eg.application.MyServiceWebService">

Thank you in advance.
Massai
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/828564#828564]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-07-19 08:03:15 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/828791#828791

--------------------------------------------------------------
Hi Massai,

I have something like that in my standalone.xml:
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
     <modify-wsdl-address>true</modify-wsdl-address>
     ...
</subsystem>
Do you have it too?

Xavier  
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/828791#828791]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-07-22 11:01:57 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/829069#829069

--------------------------------------------------------------
I have the same configuration as you. It's the default. But it's not working.
I've managed to make it work by using spring framework property holder.
That's not the prefered solution ...
Meissa
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829069#829069]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-06-11 07:17:17 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/822460#822460

--------------------------------------------------------------
Hi,

I'm facing the same problem since I migrated to JBoss EAP 6.1 (AS7.2). We are behind a proxy and our JBoss instances cannot access internet and thus fail to load the cxf xml schema:

09:09:17,334 WARN  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-6) Ignored XML validation warning: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 30; columnNumber: 145; schema_reference.4: Failed to read schema document 'http://cxf.apache.org/schemas/configuration/cxf-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) [xercesImpl-2.9.1-redhat-4.jar:]
     at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans.jar:3.0.7.RELEASE]
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans.jar:3.0.7.RELEASE]
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans.jar:3.0.7.RELEASE]
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans.jar:3.0.7.RELEASE]
     at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:188) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
     at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:136) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67) [jbossws-cxf-server-4.1.3.Final-redhat-3.jar:4.1.3.Final-redhat-3]
     at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74) [jboss-as-webservices-server-integration-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
     at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]


09:09:17,373 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."myear.ear"."myejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myear.ear"."myejb.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "myejb.jar" of deployment "myear.ear"
     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
     at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 106 in XML document from resource loaded through InputStream is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
     at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.loadAdditionalConfig(SpringBusHolder.java:188)
     at org.jboss.wsf.stack.cxf.configuration.SpringBusHolder.configure(SpringBusHolder.java:136)
     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
     at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
     ... 5 more
Caused by: org.xml.sax.SAXParseException; systemId: http://cxf.apache.org/schemas/jaxws.xsd; lineNumber: 106; columnNumber: 63; src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' component.
     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
     at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)
     at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
     at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
     ... 13 more
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822460#822460]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-06-11 09:05:24 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/822479#822479

--------------------------------------------------------------
I added a jboss-deployment-structure.xml in my ear like this:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
    <sub-deployment name="myejb.jar">
        <dependencies>
            <module name="org.apache.cxf" slot="main" >
                <imports>
                    <include path="META-INF**" />
                    <include path="org**" />
                    <include path="schemas**" />
                </imports>
            </module>
            <module name="org.apache.ws.security" />
        </dependencies>
    </sub-deployment>
</jboss-deployment-structure>
and now I get a NoClassDefFoundError on javax.servlet.ServletException:
11:00:43,748 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/context].[MyWebService]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet
.service() for servlet PunctualDataWebService threw exception: java.lang.NoClassDefFoundError: javax/servlet/ServletException
        at org.jboss.wsf.stack.cxf.Messages_$bundle.cannotObtainDestinationFor(Messages_$bundle.java:353)
        at org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:168)
        at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:85)
        at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156)
        at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:225)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:150)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
        at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
        at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822479#822479]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-06-11 10:53:17 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/822505#822505

--------------------------------------------------------------
Ok, that was this bug: https://issues.jboss.org/browse/JBWS-3602 https://issues.jboss.org/browse/JBWS-3602 (my endpoint url was not the same in jbossws-cxf.xml and jboss-webservices.xml).

But I still don't understand why I need a jboss-deployment-structure.xml so that the cxf XSD can be loaded from the classpath...
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822505#822505]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-06-11 17:00:22 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/822618#822618

--------------------------------------------------------------
It sound strange to me too.
I'm planning to migrate to jboss EAP 6.1 too and I hope that everything will be ok.
Massai
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822618#822618]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-06-14 08:29:59 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/823141#823141

--------------------------------------------------------------
I created a JIRA issue for that: https://issues.jboss.org/browse/JBWS-3650 https://issues.jboss.org/browse/JBWS-3650
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/823141#823141]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-01-29 10:09:31 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/794836#794836

--------------------------------------------------------------
Xavier,
Now that it's working for you, can you also share you web.xml file?
I'm still having a doubt about what to be declared there (no CXF servlet and no spring context loader listener?)

thank you in advance.
Massai
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794836#794836]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Xavier Dury
2013-01-30 08:09:07 UTC
Permalink
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/795078#795078

--------------------------------------------------------------
Hi Massai,

Unfortunately, I don't have any web.xml to share as my WebServices are EJBs.

Xavier
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795078#795078]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
massai khosa
2013-02-05 10:15:59 UTC
Permalink
massai khosa [https://community.jboss.org/people/mbsakho] created the discussion

"Re: Migrating secured WS from JBoss 5.1 to 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/796097#796097

--------------------------------------------------------------
Hi Xavier,
It' almost ok for me right now.
My application is deployed and loaded correctly?
I'm having trouble to about my web service ulr but I think I'll soon find it?
Thank you very much.
Massai.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/796097#796097]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...