cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2332) can't publish endpoint with XmlBeans databinding when build servicemodel from class
Date Tue, 07 Jul 2009 08:42:14 GMT

    [ https://issues.apache.org/jira/browse/CXF-2332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727990#action_12727990
] 

Willem Jiang commented on CXF-2332:
-----------------------------------

@Freeman
that is because you didn't include the schema files into your class path.
If you take a look at the pom.xml of the example , you will see it includes the some resources
files which are generated by wsdl2java

{code}
          <resources>
                  <resource>
                    <targetPath>schemaorg_apache_xmlbeans</targetPath>
                    <directory>target/generated-sources/cxf/schemaorg_apache_xmlbeans</directory>
                    <includes>
                       <include> **/*.xsb </include>
                       <include> **/*.class </include>
                    </includes>
                 </resource>
          </resources>
{code} 

> can't publish endpoint with XmlBeans databinding when build servicemodel from class
> -----------------------------------------------------------------------------------
>
>                 Key: CXF-2332
>                 URL: https://issues.apache.org/jira/browse/CXF-2332
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5, 2.2.2
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 2.1.6, 2.2.3, 2.3
>
>
> How to reproduce:
> if we remove wsdlLocation="wsdl_systest/xmlbeans/hello_world.wsdl" from src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
and make it to  generate servicemodel from class when publish endpoint with xmlbeans databinding,
> then we get exception like
> Running org.apache.cxf.systest.xmlbeans.ClientServerXmlBeansTest
> javax.xml.ws.WebServiceException: java.lang.RuntimeException: Failed to find schema for:
URI_SHA_1_5949B7699D1A51AD1D8D1F0B9CDADF4C529B982D/hello_world.wsdl
> 	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275)
> 	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
> 	at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:84)
> 	at javax.xml.ws.Endpoint.publish(Endpoint.java:47)
> 	at org.apache.cxf.systest.xmlbeans.Server.run(Server.java:40)
> 	at org.apache.cxf.testutil.common.AbstractTestServerBase.startInProcess(AbstractTestServerBase.java:47)
> 	at org.apache.cxf.testutil.common.ServerLauncher.launchServer(ServerLauncher.java:175)
> 	at org.apache.cxf.testutil.common.AbstractClientServerTestBase.launchServer(AbstractClientServerTestBase.java:75)
> 	at org.apache.cxf.systest.xmlbeans.ClientServerXmlBeansTest.startServers(ClientServerXmlBeansTest.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.junit.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49)
> 	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36)
> 	at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
> Caused by: java.lang.RuntimeException: Failed to find schema for: URI_SHA_1_5949B7699D1A51AD1D8D1F0B9CDADF4C529B982D/hello_world.wsdl
> 	at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.getSchema(XmlBeansSchemaInitializer.java:148)
> 	at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.mapClass(XmlBeansSchemaInitializer.java:200)
> 	at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.checkForExistence(XmlBeansSchemaInitializer.java:239)
> 	at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.begin(XmlBeansSchemaInitializer.java:157)
> 	at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:97)
> 	at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)
> 	at org.apache.cxf.xmlbeans.XmlBeansDataBinding.initialize(XmlBeansDataBinding.java:111)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:376)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:523)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:439)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:195)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
> 	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
> 	at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)
> 	at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167)
> 	at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346)
> 	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)
> 	... 25 more
> Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
> 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:94)
> 	at org.apache.cxf.helpers.XMLUtils.parse(XMLUtils.java:136)
> 	at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.getSchema(XmlBeansSchemaInitializer.java:129)
> 	... 41 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message