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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to