You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2009/12/23 06:17:40 UTC
[jira] Updated: (SMXCOMP-677) CxfBcProvider transform import xsd to
inline xsd casues problem with wsdl imports
[ https://issues.apache.org/activemq/browse/SMXCOMP-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gert Vanthienen updated SMXCOMP-677:
------------------------------------
Fix Version/s: (was: servicemix-cxf-bc-2009.02)
servicemix-cxf-bc-2010.01
> CxfBcProvider transform import xsd to inline xsd casues problem with wsdl imports
> ---------------------------------------------------------------------------------
>
> Key: SMXCOMP-677
> URL: https://issues.apache.org/activemq/browse/SMXCOMP-677
> Project: ServiceMix Components
> Issue Type: Bug
> Components: servicemix-cxf-bc
> Environment: System:
> 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009 x86_64 GNU/Linux
> JAVA:
> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
> Server:
> apache-tomcat-6.0.14
> ServiceMix:
> 3.3.1 war
> Reporter: Christian Connert
> Assignee: Freeman Fang
> Fix For: servicemix-cxf-bc-2010.01
>
> Attachments: OrderProcessService.wsdl
>
>
> Hi,
> the following provider declaration causes a FileNotFoundException (OrderInterface.wsdl):
> <cxfbc:provider wsdl="OrderProcessService.wsdl"
> service="pns:OrderProcessService"
> endpoint="OrderProcessServiceProvider"
> useJBIWrapper="false"
> useSOAPEnvelope="false"/>
> I tracked down to problem to the following piece of code within the validate method of the CxfBcProvider.java (line 416-453) of my patched version (SMXCOMP-660):
> ServiceInfo serInfo = new ServiceInfo();
> Map<String, Element> schemaList = new HashMap<String, Element>();
> SchemaUtil schemaUtil = new SchemaUtil(bus, schemaList);
> schemaUtil.getSchemas(definition, serInfo);
> serInfo = ei.getService();The wsdl file of the provider declaration is public a
> List<ServiceInfo> serviceInfos = new ArrayList<ServiceInfo>();
> serviceInfos.add(serInfo);
> //transform import xsd to inline xsd
> ServiceWSDLBuilder swBuilder = new ServiceWSDLBuilder(getBus(),
> serviceInfos);
> for (String key : schemaList.keySet()) {
> Element ele = schemaList.get(key);
> for (SchemaInfo sInfo : serInfo.getSchemas()) {
> Node nl = sInfo.getElement().getElementsByTagNameNS(
> "http://www.w3.org/2001/XMLSchema", "import")
> .item(0);
> if (sInfo.getNamespaceURI() == null // it's import
> // schema
> && nl != null
> && ((Element) nl)The wsdl file of the provider declaration is public a
> .getAttribute("namespace")
> .equals(
> ele
> .getAttribute("targetNamespace"))) {
> sInfo.setElement(ele);
> }
> }
> }
> serInfo.setProperty(WSDLServiceBuilder.WSDL_DEFINITION, null);
> serInfo.getInterface().setProperty(WSDLServiceBuilder.WSDL_PORTTYPE, null);
> for (OperationInfo opInfo : serInfo.getInterface().getOperations()) {
> opInfo.setProperty(WSDLServiceBuilder.WSDL_OPERATION, null);
> }
> description = WSDLFactory.newInstance().newWSDLWriter()
> .getDocument(swBuilder.build());
> Removing this piece of code sovles the problem. It doesn't causes any problems with the tests.
> Why are imported schema's transformed into inline ones?
> Greetings
> Christian Connert
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.