You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Si...@gmx.de on 2007/07/30 10:16:40 UTC

Axis 1.4 problem with import in wsdl and xsd files

Hello!

I'm working with Axis 1.4, but the wsdl2java command does not work as I intend. And I don't see, what I'm doing wrong.

I've a ServiceManagementWS.wsdl file which imports mpqfv02.xsd. The mpqfv02.xsd imports a M7v2schema.xsd and the M7v2schema.xsd import the xml-schema.
The namespace declarations and imports of these 3 files are:

ServiceManagementWS.wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
			      xmlns:tns="urn:smWS" 
			      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
			      name="ServiceManagementWS" 
			      targetNamespace="urn:smWS" 
			      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="urn:smWS" xmlns:mpqf="urn:mpeg:mpqf:schema:2006">
		
<xsd:import namespace="urn:mpeg:mpqf:schema:2006" schemaLocation="mpqfv02.xsd"/>

...


mpqfv02.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:mpeg:mpqf:schema:2006" 
		xmlns:mpeg7="urn:mpeg:mpeg7:schema:2004" 
        xmlns:mpqf="urn:mpeg:mpqf:schema:2006" 
        xmlns="http://www.w3.org/2001/XMLSchema" 
        elementFormDefault="qualified" 
        attributeFormDefault="unqualified">

<import namespace="urn:mpeg:mpeg7:schema:2004" schemaLocation="M7v2schema.xsd"/>

...


M7v2schema.xsd:

<schema targetNamespace="urn:mpeg:mpeg7:schema:2004" 
		xmlns:mpeg7="urn:mpeg:mpeg7:schema:2004" 
		xmlns="http://www.w3.org/2001/XMLSchema" 
		elementFormDefault="qualified" 
		attributeFormDefault="unqualified">

<import namespace="http://www.w3.org/XML/1998/namespace" 
			schemaLocation="http://www.w3.org/2001/xml.xsd"/>

...


When I execute the wsdl2java command (I'm using the Ant-Task in Eclipse, but when I use the command line, the same error occurs):

[axis-wsdl2java] {urn:mpeg:mpeg7:schema:2004}FragmentUpdateCommandType>null already exists
[axis-wsdl2java] {urn:mpeg:mpeg7:schema:2004}>>WordLexiconType>Token>linguisticUnit>null already exists
... and a lot more!
BUILD FAILED
/home/.../build.xml:47: WSDL processing error for /home/.../WEB-INF/src/smWS/ServiceManagement.wsdl :
 Duplicate file name: /home/.../WEB-INF/src/mpeg7/IntegerMatrixType.java.  
Hint: you may have mapped two namespaces with elements of the same name to the same package name.

The Ant-Task I'm using is:

<target name="wsdl2java" description="Execute wsdl2java command">
<axis-wsdl2java output="${generated.dir}"
		serverside="true"
		skeletondeploy="true"
		deployscope="Session"
 		verbose="false"
	  	url="${local.wsdl}" >
   	<mapping namespace="urn:smWS" package="smWSjava"/>
   	<mapping namespace="urn:mpeg:mpqf:schema:2006" package="mpqf"/>
    	<mapping namespace="urn:mpeg:mpeg7:schema:2004" package="mpeg7"/>
</axis-wsdl2java>
</target>

The IntegerMatrixType is in the M7v2schema.xsd but only one time. Also the WordLexiconType and all the other types mentioned in the error protocoll exist only one time. So I've no idea what is going wrong here.

Has anybody an idea? This would be great because I don't know how to continue at this point...

Thanks a lot!

Kerstin

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

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