users@glassfish.java.net

Errors during WSIMPORT generation with embedded schemas inside WSDL

From: <glassfish_at_javadesktop.org>
Date: Tue, 30 Dec 2008 12:29:54 PST

I am using the wsimport tool to generate JAX-WS artifacts from a source WSDL file. The WSDL is valid and was pulled from my deployed service (in this case generated by JBoss). This WSDL uses embedded schemas defined in the same WSDL, and wsimport is not able to handle this. If I break the embedded schemas out and use a schemaLocation attribute on the import, it works fine...although I need to use the embedded form due to our constraints. If you can give me an idea how to make this work that would be greatly appreciated. (WSDL snippet below, and I will attach the full WSDL)

Thanks!

With the following WSDL, I get this warning (and of course the needed classes are not generated):
[b][WARNING] src-resolve: Cannot resolve the name 'ns1:ExtOfReportLocDesc' to a(n) 'element declaration' component.[/b]

A Snippet of the WSDL follows:
<definitions name="ReportLocatorService" targetNamespace="http://www.oracle.com/retail/rms/integration/services/ReportLocatorService/v1" xmlns:ns2="http://www.oracle.com/retail/integration/custom/bo/ExtOfReportLocRef/v1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.oracle.com/retail/integration/base/bo/ReportLocRef/v1" xmlns:ns4="http://www.oracle.com/retail/integration/custom/bo/ExtOfReportLocDesc/v1" xmlns:ns3="http://www.oracle.com/retail/integration/base/bo/ReportLocDesc/v1" xmlns:tns="http://www.oracle.com/retail/rms/integration/services/ReportLocatorService/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns5="http://www.oracle.com/retail/integration/services/exception/v1">
  <types>
    <xs:schema elementFormDefault="qualified" targetNamespace="http://www.oracle.com/retail/integration/base/bo/ReportLocDesc/v1" version="1.0" [b]xmlns:ns1="http://www.oracle.com/retail/integration/custom/bo/ExtOfReportLocDesc/v1"[/b] xmlns:xs="http://www.w3.org/2001/XMLSchema">
   [b]<xs:import namespace="http://www.oracle.com/retail/integration/custom/bo/ExtOfReportLocDesc/v1"/>[/b]
   <xs:element name="ReportLocDesc">
    <xs:complexType>
     <xs:sequence>
      <xs:element name="report_ref_key" type="xs:string"/>
      <xs:element minOccurs="0" [b]ref="ns1:ExtOfReportLocDesc"[/b]/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
  </xs:schema>
    [b]<xs:schema targetNamespace="http://www.oracle.com/retail/integration/custom/bo/ExtOfReportLocDesc/v1" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">[/b]
   <xs:element name="ExtOfReportLocDesc">
    <xs:complexType>
     <xs:sequence/>
    </xs:complexType>
   </xs:element>
  </xs:schema>
...
[Message sent by forum member 'campbrob' (campbrob)]

http://forums.java.net/jive/thread.jspa?messageID=323649