You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2011/07/01 20:30:28 UTC

[jira] [Resolved] (AXIS2-5083) XmlSchemaException: problem with target namespace

     [ https://issues.apache.org/jira/browse/AXIS2-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-5083.
------------------------------------

    Resolution: Invalid

The schema is invalid. Section 4.2.1 of "XML Schema Part 1: Structures Second Edition" (28 October 2004) states that:

"The ·XML Schema· corresponding to <schema> contains not only the components corresponding to its definition and declaration [children], but also all the components of all the ·XML Schemas· corresponding to any <include>d schema documents. Such included schema documents must either (a) have the same targetNamespace as the <include>ing schema document, or (b) no targetNamespace at all, in which case the <include>d schema document is converted to the <include>ing schema document's targetNamespace."

> XmlSchemaException: problem with target namespace
> -------------------------------------------------
>
>                 Key: AXIS2-5083
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5083
>             Project: Axis2
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.5.5
>         Environment: java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> Linux C-3PO 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Erwin Liem
>
> I currently have a WSDL and want to have the client stub based on Axis2. But Axis2 cannot generate it, because of the conflict of the target namespaces:
> [ERROR] org.apache.ws.commons.schema.XmlSchemaException: An included schema was announced to have the default target namespace or the target namespace http://ABC, but has the target namespace http://EFG
> But it is very strange, since Axis1.4 generates the stub without errors. I also use SoapUI 3.6.1 and with this tool I don't get error either. Maybe the snippet below could help to illustrate how my WSDL (rpc/literal) + schema look like:
> ***************wsdl*************
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:crm1="http://DEF" xmlns:crm="http://ABC" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="crmWS" targetNamespace="http://ABC">
>    <wsdl:types>
>       <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ABC">
>          <xsd:include schemaLocation="singleTypes.xsd"/>
>          <xsd:complexType name="request">
>             <xsd:sequence>
>                <xsd:element ref="crm1:companyName" minOccurs="0" maxOccurs="1"/>
> ...
> ***************xsd*************
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://DEF">
>    <!-- common header elements -->
>    <xsd:element name="customerID" type="xsd:integer"/>
>    <xsd:element name="customerUserID" type="xsd:string"/>
>    .....
> I've been facing this problem since days and still have found no solution. Can anybody help me?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org