Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 11070 invoked from network); 4 Feb 2010 13:29:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2010 13:29:57 -0000 Received: (qmail 81749 invoked by uid 500); 4 Feb 2010 13:29:57 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 81679 invoked by uid 500); 4 Feb 2010 13:29:56 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 81669 invoked by uid 500); 4 Feb 2010 13:29:56 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 81666 invoked by uid 99); 4 Feb 2010 13:29:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 13:29:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 13:29:54 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C905D234C1F0 for ; Thu, 4 Feb 2010 05:29:32 -0800 (PST) Message-ID: <1653392127.10961265290172821.JavaMail.jira@brutus.apache.org> Date: Thu, 4 Feb 2010 13:29:32 +0000 (UTC) From: "Vincent Girard-Reydet (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-2449) Schema files relative to WSDL file break CxfEndpoint In-Reply-To: <547350000.10611265274272590.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-2449?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 57379#action_57379 ]=20 Vincent Girard-Reydet commented on CAMEL-2449: ---------------------------------------------- OK, it seems to fix the problem. By the way I was not able to reproduce my = problem in a genuine SMX4 build, so it seems my environment has become some= what corrupted. Closing the bug for now. Willem, did you have a chance to discuss with JB Onofr=C3=A9 about the vers= ion conflict problem ? Seems that you have fixed it in the Fuse version and= I think it would be great having it in the genuine SMX4 distro. > Schema files relative to WSDL file break CxfEndpoint > ---------------------------------------------------- > > Key: CAMEL-2449 > URL: https://issues.apache.org/activemq/browse/CAMEL-2449 > Project: Apache Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.1.0 > Environment: ServiceMix 4.1.0 SNAPSHOT (head:904129), without the= JBI components > Camel 2.1.0 with CXF 2.2.5 > Sun JDK 1.6.17 > Windows XP SP3 > Reporter: Vincent Girard-Reydet > Attachments: upload.zip > > > I have a WSDL (see files attached) that imports a schema file. I create a= Camel-CXF route from a SOAP endpoint to a logger : > > > > > > > There are 2 problems: > 1. If the XSD is imported like this (without "./" in schemaLocation): > > > > then it is possible to create a CXF Endpoint using an implementation clas= s (see files attached, the Test class is an implementation os the AlarmServ= ices SEI): > =09 =09=09address=3D"/AlarmServices2"=20 > =09=09serviceClass=3D"eu.diva.tis.alert.internal.Test" > =09=09endpointName=3D"alarm:AlarmServicesSOAP12port_http"=20 > =09=09serviceName=3D"alarm:AlarmServices" > =09=09xmlns:alarm=3D"http://diva.thales"/> > but if I use the Service Provider API it will fail: > =09=09address=3D"/AlarmServices"=20 > =09=09serviceClass=3D"com.thales.diva.AlarmServicesProvider" > =09=09endpointName=3D"alarm:AlarmServicesSOAP12port_http"=20 > =09=09serviceName=3D"alarm:AlarmServices" > =09=09wsdlURL=3D"classpath:/diva/schemas/AlarmServices.wsdl" > =09=09xmlns:alarm=3D"http://diva.thales" /> > with the following exception: > Exception in thread "SpringOsgiExtenderThread-56" org.apache.camel.Runtim= eCamelException: org.apache.camel.FailedToStartRouteException: org.apache.c= xf.service.factory.ServiceConstructionException: Failed to create service. > at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(O= bjectHelper.java:1039) > at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(= SpringCamelContext.java:103) > ... > Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/= wsdl:types/xs:schema): faultCode=3DPARSER_ERROR: Problem parsing 'AlarmServ= ices.xsd'.: java.io.FileNotFoundException: D:\smx4\build2\AlarmServices.xsd= (The specified file cannot be found) > at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Sourc= e) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManag= erImpl.java:229) > at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManage= rImpl.java:179) > at org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFac= tory.java:91) > ... 28 more > 2. Now if I change my WSDL to use a relative location for the XSD import: > > > > In *both* cases, I get the following, very strange error: > Caused by: org.apache.camel.FailedToCreateRouteException: Failed to creat= e route route10: Route[[From[cxf:bean:alarmServiceEndpoint2]] -> [To[log:te= st... because of Failed to resolve endpoint: cxf://bean:alarmServiceEndpoin= t2 due to: org.apache.camel.spring.SpringCamelContext cannot be cast to org= .apache.camel.spring.SpringCamelContext > at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefiniti= on.java:141) > at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCa= melContext.java:601) > at org.apache.camel.impl.DefaultCamelContext.startRouteDefinition= s(DefaultCamelContext.java:1156) > at org.apache.camel.impl.DefaultCamelContext.doStartCamel(Default= CamelContext.java:1073) > ...=20 > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to res= olve endpoint: cxf://bean:alarmServiceEndpoint2 due to: org.apache.camel.sp= ring.SpringCamelContext cannot be cast to org.apache.camel.spring.SpringCam= elContext > at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultC= amelContext.java:437) > at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(= CamelContextHelper.java:46) > ... > Caused by: java.lang.ClassCastException: org.apache.camel.spring.SpringCa= melContext cannot be cast t > o org.apache.camel.spring.SpringCamelContext > at org.apache.camel.component.cxf.CxfSpringEndpoint.init(CxfSprin= gEndpoint.java:68) > at org.apache.camel.component.cxf.CxfSpringEndpoint.(CxfSpr= ingEndpoint.java:61) > at org.apache.camel.component.cxf.CxfComponent.createEndpoint(Cxf= Component.java:63) > at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultC= omponent.java:78) > ... > Using a debugger I checked in the CxfSpringEndpoint init() method that th= e CamelContext instance retrieved is really a SpringCamelContext. In the M= anifest.MF of my bundle I have imported nearly all Camel packages (includin= g org.apache.camel.spring) but it does not change anything. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.