Hi Andreas,
We were busy with JAXWS 2.1 EA3 release and couldn't get to your mail.
http://dummy.pseudo-schema#schema2 is the systemId of a pseudo schema
- JAXB binding - thats created by JAXWS to provide customization for
conditional compilation of EPR schema. If you can provide me a complete
testcase, I can try to reproduce it and tell what the problem is.
thanks,
-vivek.
Andreas Loew wrote:
> Vivek, All,
>
> for my customer's WSDL (which contains a series of two-level XSD
> imports), I still get wsimport errors when trying to generate a Java
> binding using the new release.
>
> Please see the attached mail about what happened before -
> unfortunately, I didn't receive any replies so far... :-(
>
> The new set of error messages using JAX-WS 2.1 EA3 (from NB 5.0
> running on JDK 1.5.0_09) is the following:
>
> Created dir:
> D:\Home\Projekte\gematik\NetBeans\BrokerServiceWeb50\build\web\WEB-INF\classes
>
> running wsimport
> Consider using <depends>/<produces> so that wsimport won't do
> unnecessary compilation
> parsing WSDL...
>
> [ERROR] RelatesToType complex type is in a referenced schema and do
> not have the corresponding Java class specified by <jaxb:class
> ref="..."/> customization. Therefore it cannot be referenced from
> outside.
> line 52 of http://www.w3.org/2006/03/addressing/ws-addr.xsd
>
> [ERROR] (related to above) The schema for namespace
> "http://www.w3.org/2005/08/addressing" (which includes the above
> component) is designated for reference only by this customization.
> line 12 of http://dummy.pseudo-schema#schema2
>
> [ERROR] (related to above) The problematic schema component is
> referenced from this component: RelatesTo element declaration
> line 51 of http://www.w3.org/2006/03/addressing/ws-addr.xsd
>
> What does the reference to a non-existing
>
> http://dummy.pseudo-schema#schema2
>
> mean? How can I track this one down?
>
> Unfortunately, as stated before, the WDSL is confidential, so I cannot
> attach it here.
>
> @Vivek:
> I'll send the WSDL directly to you by private e-mail.
>
> Any help with this issues is greatly appreciated.
>
> Thanks & best regards,
>
> Andreas
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Strange wsimport and WSDL/XSD validation issues: Name resolution
> From:
> Andreas Loew <Andreas.Loew_at_sun.com>
> Date:
> Thu, 09 Nov 2006 09:05:55 +0100
> To:
> users_at_jax-ws.dev.java.net
>
> To:
> users_at_jax-ws.dev.java.net
>
>
> All,
>
> for my current customer, I am trying to evaluate whether their (rather
> complex and newly created) web services descriptions can be
> implemented/consumed "out of the box" using NetBeans and the JAX-WS
> 2.x/WSIT (Project Tango) etc. tool set.
>
> Currently, I am stuck, because for the main WSDL as well as for some
> of the imported XSDs, validation in NetBeans 5.5 (running on JDK
> 1.5.0_09) consistently fails, as does the attempt to call JAX-WS
> wsimport to generate Java classes from it anyway.
>
> On the other hand, XMLSpy tells me that both the WSDL as well as the
> imported XSDs are perfectly valid (and to the best of my knowledge,
> XMLSpy is right).
>
> Unfortunately, the WDSL is confidential, so I cannot attach it to this
> mail. I have attached a fragment (fragment.wsdl) that shows the first
> few lines including namespace definitions and import statements.
>
> I have attached the output of XML validation of the WSDL in NB 5.5
> (validate-error.txt) as well as the output of trying to call wsimport
> on this WSDL file (wsimport-error.txt).
>
> Anyway, I have tracked down the problem to what I assume to be the
> root cause for the WSDL/wsimport issue:
>
> I have attached a small sample XSD (GTEST.xsd) for which validation in
> NetBeans consistently fails when trying to reference elements or types
> from the imported WS-Addressing schema (please see the comments in
> GTEST.xsd). Again, using XMLSpy, the same file validates fine (and I
> myself consider the XSD valid as well).
>
> Also, using the exact same WSDL, I have managed to successfully
> generate a Java binding using BEA's/Apache's XMLBeans...
>
> Any ideas why name resolution might be failing? Any known issues with
> regards to name resolution?
>
> Many thanks in advance for any insights or advice on how to proceed in
> order to understand what is going on here.
>
> Best regards,
>
> Andreas
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://broker.gematik.de/soap/TelematikExecute" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:GTEL="http://ws.gematik.de/Schema/Telematik/V0.0.1/Core" xmlns:GHEAD="http://ws.gematik.de/Schema/Telematik/V0.0.1/Generic" xmlns:GPROV="http://ws.gematik.de/Schema/Telematik/V0.0.1/Provider" xmlns:GSEC="http://ws.gematik.de/Schema/Telematik/V0.0.1/Security" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:S11="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://broker.gematik.de/soap/TelematikExecute">
> <wsdl:types>
> <xs:schema>
> <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
> <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
> <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
> <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd"/>
>
> <xs:import namespace="http://ws.gematik.de/Schema/Telematik/V0.0.1/Generic" schemaLocation="../xsd/GHEAD.xsd"/>
> <xs:import namespace="http://ws.gematik.de/Schema/Telematik/V0.0.1/Provider" schemaLocation="../xsd/GPROV.xsd"/>
> <xs:import namespace="http://ws.gematik.de/Schema/Telematik/V0.0.1/Security" schemaLocation="../xsd/GSEC.xsd"/>
> <xs:import namespace="http://ws.gematik.de/Schema/Telematik/V0.0.1/Core" schemaLocation="../xsd/GTEL.xsd"/>
> </xs:schema>
> </wsdl:types>
>
> ... remainder of the file removed by intention (CONFIDENTIAL) ...
>
> </wsdl:definitions>
>
> ------------------------------------------------------------------------
>
> XML validation started.
> D:/Home/Projekte/gematik/NetBeans/BrokerServiceWeb50/web/WEB-INF/xsd/GTEL.xsd:87,7
> src-resolve: Cannot resolve the name 'wsa:RelatesTo' to a(n) 'element declaration' component.
>
> D:/Home/Projekte/gematik/NetBeans/BrokerServiceWeb50/web/WEB-INF/xsd/GSEC.xsd:120,4
> src-resolve: Cannot resolve the name 'ds:Signature' to a(n) 'element declaration' component.
>
> 2 Error(s), 0 Warning(s).
> XML validation finished.
>
> ------------------------------------------------------------------------
>
> error: RelatesToType complex type is in a referenced schema and do not have the corresponding Java class specified by <jaxb:class ref="..."/> customization. Therefore it cannot be referenced from outside.
> line 52 of http://www.w3.org/2006/03/addressing/ws-addr.xsd
> error: (related to above) The schema for namespace "http://www.w3.org/2005/08/addressing" (which includes the above component) is designated for reference only by this customization.
> line 12 of http://dummy.pseudo-schema#schema2
> error: (related to above) The problematic schema component is referenced from this component: RelatesTo element declaration
> line 51 of http://www.w3.org/2006/03/addressing/ws-addr.xsd
> com.sun.istack.SAXParseException2: (related to above) The problematic schema component is referenced from this component: RelatesTo element declaration
> at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:211)
> at com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:87)
> at com.sun.tools.ws.processor.Processor.runModeler(Processor.java:81)
> at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:560)
> at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
> 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 com.sun.tools.ws.Invoker.main(Invoker.java:78)
> at com.sun.tools.ws.WsImport.main(WsImport.java:38)
> Caused by: com.sun.istack.SAXParseException2: (related to above) The problematic schema component is referenced from this component: RelatesTo element declaration
> at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:128)
> at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2173)
> at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:222)
> at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:179)
> ... 10 more
> Caused by: com.sun.istack.SAXParseException2: (related to above) The problematic schema component is referenced from this component: RelatesTo element declaration
> at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:66)
> at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error(ErrorReporter.java:63)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector._bindToClass(ClassSelector.java:318)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector.bindToType(ClassSelector.java:266)
> at com.sun.tools.xjc.reader.xmlschema.DefaultClassBinder.elementDecl(DefaultClassBinder.java:263)
> at com.sun.tools.xjc.reader.xmlschema.DefaultClassBinder.elementDecl(DefaultClassBinder.java:71)
> at com.sun.tools.xjc.reader.xmlschema.ClassBinderFilter.elementDecl(ClassBinderFilter.java:91)
> at com.sun.tools.xjc.reader.xmlschema.Abstractifier.elementDecl(Abstractifier.java:25)
> at com.sun.tools.xjc.reader.xmlschema.Abstractifier.elementDecl(Abstractifier.java:12)
> at com.sun.xml.xsom.impl.ElementDecl.apply(ElementDecl.java:216)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector._bindToClass(ClassSelector.java:299)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector.bindToType(ClassSelector.java:251)
> at com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.elementDecl(RawTypeSetBuilder.java:110)
> at com.sun.xml.xsom.impl.ElementDecl.visit(ElementDecl.java:205)
> at com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.particle(RawTypeSetBuilder.java:89)
> at com.sun.tools.xjc.reader.xmlschema.RawTypeSetBuilder.build(RawTypeSetBuilder.java:48)
> at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.particle(DefaultParticleBinder.java:321)
> at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.modelGroup(DefaultParticleBinder.java:355)
> at com.sun.xml.xsom.impl.ModelGroupImpl.visit(ModelGroupImpl.java:92)
> at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.particle(DefaultParticleBinder.java:331)
> at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder.build(DefaultParticleBinder.java:46)
> at com.sun.tools.xjc.reader.xmlschema.ParticleBinder.build(ParticleBinder.java:61)
> at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder$1.particle(FreshComplexTypeBuilder.java:71)
> at com.sun.xml.xsom.impl.ParticleImpl.visit(ParticleImpl.java:91)
> at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder.build(FreshComplexTypeBuilder.java:52)
> at com.sun.tools.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder.build(ComplexTypeFieldBuilder.java:64)
> at com.sun.tools.xjc.reader.xmlschema.BindRed.complexType(BindRed.java:37)
> at com.sun.xml.xsom.impl.ComplexTypeImpl.visit(ComplexTypeImpl.java:236)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector$Binding.build(ClassSelector.java:177)
> at com.sun.tools.xjc.reader.xmlschema.ClassSelector.executeTasks(ClassSelector.java:339)
> at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:141)
> at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:79)
> at com.sun.tools.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:399)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:213)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:68)
> at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:126)
> ... 13 more
> error: com.sun.istack.SAXParseException2: (related to above) The problematic schema component is referenced from this component: RelatesTo element declaration
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://xml.netbeans.org/schema/GTEST"
> xmlns:tns="http://xml.netbeans.org/schema/GTEST"
> elementFormDefault="qualified" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
> <xsd:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2002/ws/addr/ns/ws-addr"/>
> <xsd:import schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
> <xsd:element name="newElement">
> <xsd:complexType>
> <xsd:sequence>
> <!-- this works -->
> <xsd:element ref="wsu:Expires"></xsd:element>
>
> <!-- this also works -->
> <xsd:element name="testElement" type="wsu:AttributedURI"></xsd:element>
>
> <!-- this fails (although the same scenario, only from a different XSD -->
> <!-- the error is: "src-resolve: Cannot resolve the name 'wsa:RelatesTo' to a(n) 'element declaration' component." -->
> <xsd:element ref="wsa:RelatesTo"></xsd:element>
>
> <!-- this also fails -->
> <!-- the error here is: "src-resolve: Cannot resolve the name 'wsa:RelatesToType' to a(n) 'type definition' component." -->
> <!-- <xsd:element name="testElement2" type="wsa:RelatesToType"></xsd:element> -->
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>