servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SMXCOMP-677) CxfBcProvider transform import xsd to inline xsd casues problem with wsdl imports
Date Wed, 18 Nov 2009 02:23:52 GMT

    [ https://issues.apache.org/activemq/browse/SMXCOMP-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55521#action_55521
] 

Freeman Fang commented on SMXCOMP-677:
--------------------------------------

Hi Christian,

SMXCOMP-395[1] explains why we need use inline xsd in wsdl.

[1]https://issues.apache.org/activemq/browse/SMXCOMP-395

Freeman

> 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-2009.02
>
>         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.


Mime
View raw message