I should mention that I tried adding the catalog file:
1) inside the META-INF of the jar project,
2) inside the WEB-INF folder of the war project and
3) inside the META-INF folder of the web project (which probably doesn't
make sense).


On Thu, Apr 16, 2015 at 8:55 AM, Alx <[email protected]> wrote:

> Thank you Dan.
>
> I tried the jax-ws-catalog.xml solution you mentioned but I could not make
> it work.
>
> I have a web application which imports a jar (maven projects). In the
> jar's META-INF folder I have a wsdl folder and inside the wsdl and required
> xsd's. I added inside the META-INF folder the jax-ws-catalog.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
> prefer="system">
>
> <rewriteSystem systemIdStartString="http://www.w3.org/";
> rewritePrefix="classpath:META-INF/wsdl/" />
>
> </catalog>
>
> I don't know if the location of the file is correct and also if the
> rewriteSystem element is correct
> (the import that fails is: <xs:import namespace="
> http://www.w3.org/2000/09/xmldsig#";
> schemaLocation="xmldsig-core-schema.xsd" />)
>
> Do you know if there is any way to verify if the catalog file is picked up
> by CXF (i.e. debugging)?
>
> Alex
>
> On Wed, Apr 15, 2015 at 8:27 PM, Daniel Kulp <[email protected]> wrote:
>
>> You will like need to download the various schemas that your wsdl uses
>> including all the included schemas, package them  in your war/jar, and
>> either modify the imports of the schemas to point to your packaged versions
>> or use a META-INF/jax-ws-catalog.xml file to rewrite the prefixes to point
>> at your location.  For example:
>>
>> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
>> prefer="system">
>>     <rewriteSystem systemIdStartString="
>> http://www.w3.org/2006/03/addressing";
>> rewritePrefix="classpath:/schemas/wsdl"/>
>>     <rewriteSystem systemIdStartString="
>> http://www.w3.org/2005/08/addressing";
>> rewritePrefix="classpath:/schemas/wsdl"/>
>> </catalog>
>>
>>
>> Dan
>>
>>
>> > On Apr 15, 2015, at 5:50 AM, Alx <[email protected]> wrote:
>> >
>> > My web service works fine on my local machine.
>> >
>> > When I try to deploy to our TEST server (Wildfly) I get the following
>> > exception:
>> >
>> > 12:38:07,090 WARNING
>> > [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC
>> service
>> > thread 1-2) Failed to parse WSDL: javax.wsdl.WSDLException:
>> WSDLException
>> > (at
>> /definitions/import/wsdl:definitions/wsdl:types/xs:schema/xs:schema):
>> > faultCode=PARSER_ERROR: Problem parsing
>> >
>> 'vfs:/C:/dev/wildfly-8.2.0.Final/standalone/deployments/mybank-rs-web.war/WEB-INF/lib/mybank-rs-model-0.0.1-SNAPSHOT.jar/META-INF/wsdl/xmldsig-core-schema.xsd'.:
>> > java.net.UnknownHostException: www.w3.org
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:830)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:864)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:654)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(WSDLReaderImpl.java:610)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at
>> >
>> com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:320)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(WSDLReaderImpl.java:470)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at
>> >
>> com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:312)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2338)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > at
>> >
>> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:261)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isEmptywsdl(ReflectionServiceFactoryBean.java:2607)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isFromWsdl(ReflectionServiceFactoryBean.java:543)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:547)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265)
>> > [cxf-rt-core-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
>> > [cxf-rt-frontend-simple-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
>> > [cxf-rt-frontend-simple-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:66)
>> > [jbossws-cxf-server-4.3.2.Final.jar:4.3.2.Final]
>> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
>> > [cxf-rt-frontend-jaxws-2.7.13.jar:2.7.13]
>> > at
>> >
>> org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:118)
>> > [jbossws-cxf-server-4.3.2.Final.jar:4.3.2.Final]
>> > at
>> >
>> org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:136)
>> > [jbossws-cxf-server-4.3.2.Final.jar:4.3.2.Final]
>> > at
>> >
>> org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68)
>> > [jbossws-cxf-server-4.3.2.Final.jar:4.3.2.Final]
>> > at
>> >
>> org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:75)
>> > [wildfly-webservices-server-integration-8.2.0.Final.jar:8.2.0.Final]
>> > at
>> >
>> org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
>> > at
>> >
>> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
>> > at
>> >
>> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> > [rt.jar:1.8.0_31]
>> > at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
>> > Caused by: java.net.UnknownHostException: www.w3.org
>> > at
>> >
>> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
>> > [rt.jar:1.8.0_31]
>> > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
>> > [rt.jar:1.8.0_31]
>> > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>> > [rt.jar:1.8.0_31]
>> > at java.net.Socket.connect(Socket.java:589) [rt.jar:1.8.0_31]
>> > at java.net.Socket.connect(Socket.java:538) [rt.jar:1.8.0_31]
>> > at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
>> [rt.jar:1.8.0_31]
>> > at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
>> > [rt.jar:1.8.0_31]
>> > at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
>> > [rt.jar:1.8.0_31]
>> > at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
>> [rt.jar:1.8.0_31]
>> > at sun.net.www.http.HttpClient.New(HttpClient.java:308)
>> [rt.jar:1.8.0_31]
>> > at sun.net.www.http.HttpClient.New(HttpClient.java:326)
>> [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
>> > [rt.jar:1.8.0_31]
>> > at
>> >
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
>> > [rt.jar:1.8.0_31]
>> > at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> > Source) [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>> Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>> Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at
>> >
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>> > Source) [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at
>> >
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> > Source) [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>> > [xercesImpl-2.9.1-jbossas-2.jar:]
>> > at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
>> > [wsdl4j-1.6.3.jar:1.6.3]
>> > ... 35 more
>> >
>> >
>> > The web service is then generated without using my WSDL but instead from
>> > the Interface:
>> >
>> > 12:38:07,101 INFO
>> > [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC
>> service
>> > thread 1-2) Creating Service [...] from class [...]
>> RoutingServiceInterface
>> >
>> > Which results in a generated WSDL that is not the original (does not
>> > contain ws-policy elements).
>> >
>> > Any idea how to fix this without internet connection?
>> >
>> > Alex
>>
>> --
>> Daniel Kulp
>> [email protected] - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>>
>>
>

Reply via email to