[NETBEANS-54] Modules review xml.wsdl.model - no external library - checked Rat report: manully updated missed license headers - readded undonated wsdl-2004-08-24.xsd from source and added license to it (fixes functionality) - disable tests that fail because referenced files were not donated - skimmed through module, did not notice additional problems
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/commit/ff9557fb Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/tree/ff9557fb Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/diff/ff9557fb Branch: refs/heads/master Commit: ff9557fb1c6da84dad6c2f447083ef884c7fc748 Parents: 51ea9c0 Author: Matthias Bläsing <[email protected]> Authored: Sat Oct 7 13:15:20 2017 +0200 Committer: Matthias Bläsing <[email protected]> Committed: Wed Oct 11 19:04:54 2017 +0200 ---------------------------------------------------------------------- nbbuild/build.xml | 9 + .../http/validation/Bundle.properties | 50 +-- .../mime/validation/Bundle.properties | 50 +-- .../soap/validation/Bundle.properties | 50 +-- .../soap12/validation/Bundle.properties | 50 +-- .../validator/resources/wsdl-2004-08-24.xsd | 306 +++++++++++++++++++ .../modules/xml/wsdl/model/ImportTest.java | 28 +- 7 files changed, 386 insertions(+), 157 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/nbbuild/build.xml ---------------------------------------------------------------------- diff --git a/nbbuild/build.xml b/nbbuild/build.xml index 9bf1d06..55656a2 100644 --- a/nbbuild/build.xml +++ b/nbbuild/build.xml @@ -1953,8 +1953,14 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d <rat:substringMatcher licenseFamilyCategory="oasis" licenseFamilyName="OASIS"> <pattern substring="[OASIS]"/> </rat:substringMatcher> + <rat:fullTextMatcher licenseFamilyCategory="wsdl" licenseFamilyName="WSDL Schema Files"> + International Business Machines Corporation and Microsoft Corporation + All Rights Reserved + License for WSDL Schema Files + </rat:fullTextMatcher> <rat:approvedLicense familyName="W3C Software and Document Notice and License"/> <rat:approvedLicense familyName="OASIS"/> + <rat:approvedLicense familyName="WSDL Schema Files" /> <fileset dir="${nb_all}"> <exclude name="*/build/**" /> <exclude name="nbbuild/netbeans/**" /> @@ -1995,6 +2001,9 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d <exclude name="xml.schema.model/test/unit/src/org/netbeans/modules/xml/schema/model/resources/*.xml" /> <!-- test data --> <exclude name="xml.schema.model/test/unit/src/org/netbeans/modules/xml/schema/model/resources/*.zip" /> <!-- test data --> <exclude name="xml.schema.model/test/unit/src/org/netbeans/modules/xml/schema/model/resources/dummyProject/nbproject/private/tmpfile" /> <!-- test data --> + <exclude name="xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/**/*.wsdl" /> <!-- test data --> + <exclude name="xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/**/*.xsd" /> <!-- test data --> + <exclude name="xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/**/*.xml" /> <!-- test data --> <exclude name="xml.text/src/org/netbeans/modules/xml/text/resources/DTDExample" /> <!-- GUI sample file to demonstrate syntax highlighting --> <exclude name="xml.text/src/org/netbeans/modules/xml/text/resources/XMLExample" /> <!-- GUI sample file to demonstrate syntax highlighting --> <exclude name="xml.text/test/qa-functional/src/org/netbeans/modules/xml/text/**/data/**" /> <!-- test data --> http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/http/validation/Bundle.properties ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/http/validation/Bundle.properties b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/http/validation/Bundle.properties index d857424..fe371d5 100644 --- a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/http/validation/Bundle.properties +++ b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/http/validation/Bundle.properties @@ -1,41 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved. +# http://www.apache.org/licenses/LICENSE-2.0 # -# Oracle and Java are registered trademarks of Oracle and/or its affiliates. -# Other names may be trademarks of their respective owners. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common -# Development and Distribution License("CDDL") (collectively, the -# "License"). You may not use this file except in compliance with the -# License. You can obtain a copy of the License at -# http://www.netbeans.org/cddl-gplv2.html -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the -# specific language governing permissions and limitations under the -# License. When distributing the software, include this License Header -# Notice in each file and include the License file at -# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the GPL Version 2 section of the License file that -# accompanied this code. If applicable, add the following below the -# License Header, with the fields enclosed by brackets [] replaced by -# your own identifying information: -# "Portions Copyrighted [year] [name of copyright owner]" -# -# If you wish your version of this file to be governed by only the CDDL -# or only the GPL Version 2, indicate your decision by adding -# "[Contributor] elects to include this software in this distribution -# under the [CDDL or GPL Version 2] license." If you do not indicate a -# single choice of license, a recipient has the option to distribute -# your version of this file under either the CDDL, the GPL Version 2 or -# to extend the choice of license to its licensees as provided above. -# However, if you add GPL Version 2 code and therefore, elected the GPL -# Version 2 license, then the option applies only if the new code is -# made subject to such option by the copyright holder. -# -# Contributor(s): -# Package specific ResourceBundle properties file +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. HTTPBindingValidator.One_binding_allowed=Only one <http:binding> element is allowed per binding. HTTPBindingValidator.Verb_required=The <http:binding> element requires a verb attribute with a value of either "GET" or "POST". http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/mime/validation/Bundle.properties ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/mime/validation/Bundle.properties b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/mime/validation/Bundle.properties index 967df10..6638d5e 100644 --- a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/mime/validation/Bundle.properties +++ b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/mime/validation/Bundle.properties @@ -1,41 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Copyright (c) 2009, 2016 Oracle and/or its affiliates. All rights reserved. +# http://www.apache.org/licenses/LICENSE-2.0 # -# Oracle and Java are registered trademarks of Oracle and/or its affiliates. -# Other names may be trademarks of their respective owners. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common -# Development and Distribution License("CDDL") (collectively, the -# "License"). You may not use this file except in compliance with the -# License. You can obtain a copy of the License at -# http://www.netbeans.org/cddl-gplv2.html -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the -# specific language governing permissions and limitations under the -# License. When distributing the software, include this License Header -# Notice in each file and include the License file at -# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the GPL Version 2 section of the License file that -# accompanied this code. If applicable, add the following below the -# License Header, with the fields enclosed by brackets [] replaced by -# your own identifying information: -# "Portions Copyrighted [year] [name of copyright owner]" -# -# If you wish your version of this file to be governed by only the CDDL -# or only the GPL Version 2, indicate your decision by adding -# "[Contributor] elects to include this software in this distribution -# under the [CDDL or GPL Version 2] license." If you do not indicate a -# single choice of license, a recipient has the option to distribute -# your version of this file under either the CDDL, the GPL Version 2 or -# to extend the choice of license to its licensees as provided above. -# However, if you add GPL Version 2 code and therefore, elected the GPL -# Version 2 license, then the option applies only if the new code is -# made subject to such option by the copyright holder. -# -# Contributor(s): -# Package specific ResourceBundle properties file +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. AP2901_INPUT=WS-I(AP2901): The <wsdl:input> uses neither the WSDL MIME Binding as described in WSDL 1.1 Section 5 nor WSDL SOAP binding as described in WSDL 1.1 Section 3. AP2901_OUTPUT=WS-I(AP2901): The <wsdl:output> uses neither the WSDL MIME Binding as described in WSDL 1.1 Section 5 nor WSDL SOAP binding as described in WSDL 1.1 Section 3. http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap/validation/Bundle.properties ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap/validation/Bundle.properties b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap/validation/Bundle.properties index 375a690..9ff0c93 100644 --- a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap/validation/Bundle.properties +++ b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap/validation/Bundle.properties @@ -1,41 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved. +# http://www.apache.org/licenses/LICENSE-2.0 # -# Oracle and Java are registered trademarks of Oracle and/or its affiliates. -# Other names may be trademarks of their respective owners. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common -# Development and Distribution License("CDDL") (collectively, the -# "License"). You may not use this file except in compliance with the -# License. You can obtain a copy of the License at -# http://www.netbeans.org/cddl-gplv2.html -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the -# specific language governing permissions and limitations under the -# License. When distributing the software, include this License Header -# Notice in each file and include the License file at -# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the GPL Version 2 section of the License file that -# accompanied this code. If applicable, add the following below the -# License Header, with the fields enclosed by brackets [] replaced by -# your own identifying information: -# "Portions Copyrighted [year] [name of copyright owner]" -# -# If you wish your version of this file to be governed by only the CDDL -# or only the GPL Version 2, indicate your decision by adding -# "[Contributor] elects to include this software in this distribution -# under the [CDDL or GPL Version 2] license." If you do not indicate a -# single choice of license, a recipient has the option to distribute -# your version of this file under either the CDDL, the GPL Version 2 or -# to extend the choice of license to its licensees as provided above. -# However, if you add GPL Version 2 code and therefore, elected the GPL -# Version 2 license, then the option applies only if the new code is -# made subject to such option by the copyright holder. -# -# Contributor(s): -# Package specific ResourceBundle properties file +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. SOAPBindingValidator.Transport_URI_required=Transport URI required on <soap:binding> element SOAPBindingValidator.Unsupported_transport=The <soap:binding> element only supports a transport URI of http://schemas.xmlsoap.org/soap/http. No other transport is currently supported. http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap12/validation/Bundle.properties ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap12/validation/Bundle.properties b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap12/validation/Bundle.properties index 542b564..59f4816 100644 --- a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap12/validation/Bundle.properties +++ b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/extensions/soap12/validation/Bundle.properties @@ -1,41 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Copyright (c) 2009, 2016 Oracle and/or its affiliates. All rights reserved. +# http://www.apache.org/licenses/LICENSE-2.0 # -# Oracle and Java are registered trademarks of Oracle and/or its affiliates. -# Other names may be trademarks of their respective owners. -# -# The contents of this file are subject to the terms of either the GNU -# General Public License Version 2 only ("GPL") or the Common -# Development and Distribution License("CDDL") (collectively, the -# "License"). You may not use this file except in compliance with the -# License. You can obtain a copy of the License at -# http://www.netbeans.org/cddl-gplv2.html -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the -# specific language governing permissions and limitations under the -# License. When distributing the software, include this License Header -# Notice in each file and include the License file at -# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the GPL Version 2 section of the License file that -# accompanied this code. If applicable, add the following below the -# License Header, with the fields enclosed by brackets [] replaced by -# your own identifying information: -# "Portions Copyrighted [year] [name of copyright owner]" -# -# If you wish your version of this file to be governed by only the CDDL -# or only the GPL Version 2, indicate your decision by adding -# "[Contributor] elects to include this software in this distribution -# under the [CDDL or GPL Version 2] license." If you do not indicate a -# single choice of license, a recipient has the option to distribute -# your version of this file under either the CDDL, the GPL Version 2 or -# to extend the choice of license to its licensees as provided above. -# However, if you add GPL Version 2 code and therefore, elected the GPL -# Version 2 license, then the option applies only if the new code is -# made subject to such option by the copyright holder. -# -# Contributor(s): -# Package specific ResourceBundle properties file +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. SOAPBindingValidator.Transport_URI_required=Transport URI required on <soap:binding> element SOAPBindingValidator.Unsupported_transport=The <soap:binding> element only supports a transport URI of http://schemas.xmlsoap.org/soap/http OR http://www.w3.org/2003/05/soap/bindings/HTTP/. No other transport is currently supported. http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/validator/resources/wsdl-2004-08-24.xsd ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/validator/resources/wsdl-2004-08-24.xsd b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/validator/resources/wsdl-2004-08-24.xsd new file mode 100644 index 0000000..70c31ff --- /dev/null +++ b/xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/validator/resources/wsdl-2004-08-24.xsd @@ -0,0 +1,306 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + +Copyright 2001 - 2005, International Business Machines Corporation and Microsoft Corporation +All Rights Reserved + +License for WSDL Schema Files + +The Authors grant permission to copy and distribute the WSDL Schema +Files in any medium without fee or royalty as long as this notice and +license are distributed with them. The originals of these files can +be located at: + +http://schemas.xmlsoap.org/wsdl/2004-08-24.xsd + +THESE SCHEMA FILES ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS +OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THESE FILES, INCLUDING, BUT NOT +LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, +NON-INFRINGEMENT OR TITLE. THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, +INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR +RELATING TO ANY USE OR DISTRIBUTION OF THESE FILES. + +The name and trademarks of the Authors may NOT be used in any manner, +including advertising or publicity pertaining to these files or any program +or service that uses these files, written prior permission. Title to copyright +in these files will at all times remain with the Authors. + +No other rights are granted by implication, estoppel or otherwise. + + +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified"> + <xs:complexType mixed="true" name="tDocumentation"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="tDocumented"> + <xs:annotation> + <xs:documentation> + This type is extended by component types to allow them to be documented + </xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:element name="documentation" type="wsdl:tDocumentation" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <!-- implemented resolution of swa124 --> + <xs:complexType name="tExtensibleAttributesDocumented" abstract="true"> + <xs:complexContent> + <xs:extension base="wsdl:tDocumented"> + <xs:annotation> + <xs:documentation> + This type is extended by component types to allow attributes from other namespaces to be added. + </xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:any namespace="##other" minOccurs="0" + maxOccurs="unbounded" processContents="lax"/> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <!-- implemented resolution of swa124 --> + <xs:complexType name="tExtensibleDocumented" abstract="true"> + <xs:complexContent> + <xs:extension base="wsdl:tDocumented"> + <xs:annotation> + <xs:documentation> + This type is extended by component types to allow elements from other namespaces to be added. + </xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:any namespace="##other" minOccurs="0" + maxOccurs="unbounded" processContents="lax"/> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:element name="definitions" type="wsdl:tDefinitions"> + <xs:key name="message"> + <xs:selector xpath="wsdl:message"/> + <xs:field xpath="@name"/> + </xs:key> + <xs:key name="portType"> + <xs:selector xpath="wsdl:portType"/> + <xs:field xpath="@name"/> + </xs:key> + <xs:key name="binding"> + <xs:selector xpath="wsdl:binding"/> + <xs:field xpath="@name"/> + </xs:key> + <xs:key name="service"> + <xs:selector xpath="wsdl:service"/> + <xs:field xpath="@name"/> + </xs:key> + <xs:key name="import"> + <xs:selector xpath="wsdl:import"/> + <xs:field xpath="@namespace"/> + </xs:key> + </xs:element> + <xs:group name="anyTopLevelOptionalElement"> + <xs:annotation> + <xs:documentation> + Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element name="import" type="wsdl:tImport"/> + <xs:element name="types" type="wsdl:tTypes"/> + <xs:element name="message" type="wsdl:tMessage"> + <xs:unique name="part"> + <xs:selector xpath="wsdl:part"/> + <xs:field xpath="@name"/> + </xs:unique> + </xs:element> + <xs:element name="portType" type="wsdl:tPortType"/> + <xs:element name="binding" type="wsdl:tBinding"/> + <xs:element name="service" type="wsdl:tService"> + <xs:unique name="port"> + <xs:selector xpath="wsdl:port"/> + <xs:field xpath="@name"/> + </xs:unique> + </xs:element> + </xs:choice> + </xs:group> + <!-- implemented resolution of er015 and UPA fix. ASK --> + <xs:complexType name="tDefinitions"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence minOccurs="0"> + <xs:group ref="wsdl:anyTopLevelOptionalElement"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="wsdl:anyTopLevelOptionalElement"/> + <xs:any namespace="##other" processContents="lax"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="targetNamespace" type="xs:anyURI" use="optional"/> + <xs:attribute name="name" type="xs:NCName" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tImport"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleAttributesDocumented"> + <xs:attribute name="namespace" type="xs:anyURI" use="required"/> + <xs:attribute name="location" type="xs:anyURI" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tTypes"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"/> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tMessage"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence> + <xs:element name="part" type="wsdl:tPart" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tPart"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleAttributesDocumented"> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="element" type="xs:QName" use="optional"/> + <xs:attribute name="type" type="xs:QName" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tPortType"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleAttributesDocumented"> + <xs:sequence> + <xs:element name="operation" type="wsdl:tOperation" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tOperation"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence> + <xs:choice> + <xs:group ref="wsdl:request-response-or-one-way-operation"/> + <xs:group ref="wsdl:solicit-response-or-notification-operation"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="parameterOrder" type="xs:NMTOKENS" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:group name="request-response-or-one-way-operation"> + <xs:sequence> + <xs:element name="input" type="wsdl:tParam"/> + <xs:sequence minOccurs="0"> + <xs:element name="output" type="wsdl:tParam"/> + <xs:element name="fault" type="wsdl:tFault" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:sequence> + </xs:group> + <xs:group name="solicit-response-or-notification-operation"> + <xs:sequence> + <xs:element name="output" type="wsdl:tParam"/> + <xs:sequence minOccurs="0"> + <xs:element name="input" type="wsdl:tParam"/> + <xs:element name="fault" type="wsdl:tFault" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:sequence> + </xs:group> + <xs:complexType name="tParam"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleAttributesDocumented"> + <xs:attribute name="name" type="xs:NCName" use="optional"/> + <xs:attribute name="message" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tFault"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleAttributesDocumented"> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="message" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tBinding"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence> + <xs:element name="operation" + type="wsdl:tBindingOperation" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="type" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tBindingOperationMessage"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:attribute name="name" type="xs:NCName" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tBindingOperationFault"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tBindingOperation"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence> + <xs:element name="input" + type="wsdl:tBindingOperationMessage" minOccurs="0"/> + <xs:element name="output" + type="wsdl:tBindingOperationMessage" minOccurs="0"/> + <xs:element name="fault" + type="wsdl:tBindingOperationFault" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tService"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:sequence> + <xs:element name="port" type="wsdl:tPort" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="tPort"> + <xs:complexContent> + <xs:extension base="wsdl:tExtensibleDocumented"> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="binding" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:attribute name="arrayType" type="xs:string"/> + <xs:attribute name="required" type="xs:boolean"/> + <xs:complexType name="tExtensibilityElement" abstract="true"> + <xs:attribute ref="wsdl:required" use="optional"/> + </xs:complexType> +</xs:schema> http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/ff9557fb/xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/model/ImportTest.java ---------------------------------------------------------------------- diff --git a/xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/model/ImportTest.java b/xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/model/ImportTest.java index 92dcfd1..4ff56bd 100644 --- a/xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/model/ImportTest.java +++ b/xml.wsdl.model/test/unit/src/org/netbeans/modules/xml/wsdl/model/ImportTest.java @@ -126,20 +126,22 @@ public class ImportTest extends TestCase { assertEquals("string", gt.getName()); } - public void testImportSameNamespaceWsdl() throws Exception { - WSDLModel model = Util.loadWSDLModel("resources/GoogleFlow.wsdl"); - Operation op = model.findComponentByName("initiate", Operation.class); - Message referencedMessage = op.getInput().getMessage().get(); - assertEquals("Imported model has same namespace", model.getDefinitions().getTargetNamespace(), - referencedMessage.getModel().getDefinitions().getTargetNamespace()); - } +// Disabled as referenced files were partly not donated by oracle to apache +// public void testImportSameNamespaceWsdl() throws Exception { +// WSDLModel model = Util.loadWSDLModel("resources/GoogleFlow.wsdl"); +// Operation op = model.findComponentByName("initiate", Operation.class); +// Message referencedMessage = op.getInput().getMessage().get(); +// assertEquals("Imported model has same namespace", model.getDefinitions().getTargetNamespace(), +// referencedMessage.getModel().getDefinitions().getTargetNamespace()); +// } - public void testUnqualifiedSchemaReference() throws Exception { - WSDLModelImpl model = (WSDLModelImpl)Util.loadWSDLModel("resources/SiebelInterface.wsdl"); - String xpath = "/definitions/message[@name='SiebelInterfaceRequest']/part[@name='SWEExtData']"; - Part part = Util.find(Part.class, model, xpath); - assertNotNull("part.element should resolve w/o prefix", part.getElement().get()); - } +// Disabled as referenced files were partly not donated by oracle to apache +// public void testUnqualifiedSchemaReference() throws Exception { +// WSDLModelImpl model = (WSDLModelImpl)Util.loadWSDLModel("resources/SiebelInterface.wsdl"); +// String xpath = "/definitions/message[@name='SiebelInterfaceRequest']/part[@name='SWEExtData']"; +// Part part = Util.find(Part.class, model, xpath); +// assertNotNull("part.element should resolve w/o prefix", part.getElement().get()); +// } public void testReferenceToOtherEmbededSchema() throws Exception { WSDLModelImpl model = (WSDLModelImpl)Util.loadWSDLModel("resources/Sumador.wsdl");
