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 "Brown, Jeff (C2MS)" <je...@ngc.com> on 2006/11/13 18:08:05 UTC

2nd POST - HELP! Problems with WSDL2Java

Never got anything on this and I really need some help on this . . .

I'm using Axis 1.4Final. Here is my WSDL file:

----------------------------------------------------------

<?xml version="1.0" ?> 
<definitions name="BoundingRegionService"
targetNamespace="http://boundingregion.xxx.com/service/"
xmlns:tns="http://boundingregion.xxx.com/service/"
xmlns:gml="http://www.opengis.net/gml"
xmlns="http://schemas.xmlsoap.org/wsdl/">
   <types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema">
         <import namespace="http://www.opengis.net/gml"
schemaLocation="GML-3.1.0/base/gml.xsd" />
      </schema>
   </types>
   <message name="ComputeBoundingRegionInput">
      <part name="body" element="gml:location" /> 
   </message>
   <message name="ComputeBoundingRegionOutput">
      <part name="body" element="gml:boundingBox" /> 
   </message>
   <portType name="BoundingRegionServicePortType">
      <operation name="ComputeBoundingRegion">
         <input message="tns:ComputeBoundingRegionInput" /> 
         <output message="tns:ComputeBoundingRegionOutput" /> 
      </operation>
   </portType>
</definitions>

----------------------------------------------------------

Here is the error I'm receiving:

----------------------------------------------------------

BUILD FAILED
C:\TEST_AREA\build.xml:47: WSDL processing error for
C:\TEST_AREA\BoundingRegionService.wsdl :
 Duplicate file name:
C:\TEST_AREA\src\net\opengis\www\gml\CodeOrNullListType.java.
Hint: you may have mapped two namespaces with elements of the same name
to the same package name.

----------------------------------------------------------

As you can see I'm simply trying to refer to something that is defined
in the GML schema from the Open Geospatial Consortium located online at
http://www.opengis.net/gml/. I don't know how I can do anything more
simple as an example using the GML schema.

To replicate what I have, place the above WSDL in a directory and unzip
the downloadable schema bundle from the URL given above. I think they
call it 03-105r1_GML_3.1.zip. I can provide what I have as an attachment
if needed.

In addition, I'm using the following Ant build file:

----------------------------------------------------------

<project name="BoundingRegionService"
         default="compileJava"
         basedir=".">

	<target name="environment">

		<property environment="env" />
		<fail unless="env.BOUNDING_REGION_TEST_HOME">Please set
BOUNDING_REGION_TEST_HOME</fail>
		<fail unless="env.BOUNDING_REGION_ENDPT">Please set
BOUNDING_REGION_ENDPT</fail>

		<property name="project.COTS"
		          value="COTS" />
		<property name="project.boundingRegionServiceWsdl"
		          value="BoundingRegionService.wsdl" />

	</target>

	<target name="classpath" depends="environment">
		<path id="project.classpath">
			<pathelement path="." />
			<pathelement path="classes" />
			<fileset dir="${project.COTS}/Axis/1.4Final">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${project.COTS}/J2EE/1.4">
				<include name="j2ee.jar" />
			</fileset>
		</path>

		<taskdef resource="axis-tasks.properties"
		         classpathref="project.classpath" />
	</target>

	<target name="clean">
		<delete dir="classes" failonerror="false" />
		<delete dir="lib" failonerror="false" />
		<delete dir="src/com/xxx/boundingregion/service"
failonerror="false" />
	</target>

	<target name="axisWSDL2Java" depends="classpath">
		<axis-wsdl2java output="src"
		                verbose="true"
                                debug="true"
                                all="true"
                                serverside="true"
	
url="${project.boundingRegionServiceWsdl}">
		</axis-wsdl2java>
	</target>

	<target name="compileJava" depends="axisWSDL2Java">
		<mkdir dir="classes" />
		<javac srcdir="src"
		       destdir="classes"
		       debug="on"
		       deprecation="off"
		       includeAntRuntime="no"
		       includeJavaRuntime="no">
			<classpath refid="project.classpath" />
		</javac>
	</target>

</project>

----------------------------------------------------------

Any suggestion/help will be much appreciated because I can't go any
further until this is resolved. Thanks!

JAB

Re: 2nd POST - HELP! Problems with WSDL2Java

Posted by Philipp Perner <ph...@healthgate.at>.
Because, you didn't get an answer, here's what came to my mind at first:

I replaced the schemaLocation with v.3.1.1 and after validation, there's no error

***************************************
Look:
***************************************

<?xml version="1.0" ?> 
<definitions name="BoundingRegionService"
targetNamespace="http://boundingregion.xxx.com/service/"
xmlns:tns="http://boundingregion.xxx.com/service/"
xmlns:gml="http://www.opengis.net/gml"
xmlns="http://schemas.xmlsoap.org/wsdl/">
   <types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema">
         <import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" />
      </schema>
   </types>
   <message name="ComputeBoundingRegionInput">
      <part name="body" element="gml:location" /> 
   </message>
   <message name="ComputeBoundingRegionOutput">
      <part name="body" element="gml:boundingBox" /> 
   </message>
   <portType name="BoundingRegionServicePortType">
      <operation name="ComputeBoundingRegion">
         <input message="tns:ComputeBoundingRegionInput" /> 
         <output message="tns:ComputeBoundingRegionOutput" /> 
      </operation>
   </portType>
</definitions>

***************************************

let me know if it works....

regards,

Philipp


Brown, Jeff (C2MS) schrieb:
> Never got anything on this and I really need some help on this . . .
>
> I'm using Axis 1.4Final. Here is my WSDL file:
>
> ----------------------------------------------------------
>
> <?xml version="1.0" ?> 
> <definitions name="BoundingRegionService"
> targetNamespace="http://boundingregion.xxx.com/service/"
> xmlns:tns="http://boundingregion.xxx.com/service/"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
>    <types>
>       <schema xmlns="http://www.w3.org/2001/XMLSchema">
>          <import namespace="http://www.opengis.net/gml"
> schemaLocation="GML-3.1.0/base/gml.xsd" />
>       </schema>
>    </types>
>    <message name="ComputeBoundingRegionInput">
>       <part name="body" element="gml:location" /> 
>    </message>
>    <message name="ComputeBoundingRegionOutput">
>       <part name="body" element="gml:boundingBox" /> 
>    </message>
>    <portType name="BoundingRegionServicePortType">
>       <operation name="ComputeBoundingRegion">
>          <input message="tns:ComputeBoundingRegionInput" /> 
>          <output message="tns:ComputeBoundingRegionOutput" /> 
>       </operation>
>    </portType>
> </definitions>
>
> ----------------------------------------------------------
>
> Here is the error I'm receiving:
>
> ----------------------------------------------------------
>
> BUILD FAILED
> C:\TEST_AREA\build.xml:47: WSDL processing error for
> C:\TEST_AREA\BoundingRegionService.wsdl :
>  Duplicate file name:
> C:\TEST_AREA\src\net\opengis\www\gml\CodeOrNullListType.java.
> Hint: you may have mapped two namespaces with elements of the same name
> to the same package name.
>
> ----------------------------------------------------------
>
> As you can see I'm simply trying to refer to something that is defined
> in the GML schema from the Open Geospatial Consortium located online at
> http://www.opengis.net/gml/. I don't know how I can do anything more
> simple as an example using the GML schema.
>
> To replicate what I have, place the above WSDL in a directory and unzip
> the downloadable schema bundle from the URL given above. I think they
> call it 03-105r1_GML_3.1.zip. I can provide what I have as an attachment
> if needed.
>
> In addition, I'm using the following Ant build file:
>
> ----------------------------------------------------------
>
> <project name="BoundingRegionService"
>          default="compileJava"
>          basedir=".">
>
> 	<target name="environment">
>
> 		<property environment="env" />
> 		<fail unless="env.BOUNDING_REGION_TEST_HOME">Please set
> BOUNDING_REGION_TEST_HOME</fail>
> 		<fail unless="env.BOUNDING_REGION_ENDPT">Please set
> BOUNDING_REGION_ENDPT</fail>
>
> 		<property name="project.COTS"
> 		          value="COTS" />
> 		<property name="project.boundingRegionServiceWsdl"
> 		          value="BoundingRegionService.wsdl" />
>
> 	</target>
>
> 	<target name="classpath" depends="environment">
> 		<path id="project.classpath">
> 			<pathelement path="." />
> 			<pathelement path="classes" />
> 			<fileset dir="${project.COTS}/Axis/1.4Final">
> 				<include name="*.jar" />
> 			</fileset>
> 			<fileset dir="${project.COTS}/J2EE/1.4">
> 				<include name="j2ee.jar" />
> 			</fileset>
> 		</path>
>
> 		<taskdef resource="axis-tasks.properties"
> 		         classpathref="project.classpath" />
> 	</target>
>
> 	<target name="clean">
> 		<delete dir="classes" failonerror="false" />
> 		<delete dir="lib" failonerror="false" />
> 		<delete dir="src/com/xxx/boundingregion/service"
> failonerror="false" />
> 	</target>
>
> 	<target name="axisWSDL2Java" depends="classpath">
> 		<axis-wsdl2java output="src"
> 		                verbose="true"
>                                 debug="true"
>                                 all="true"
>                                 serverside="true"
> 	
> url="${project.boundingRegionServiceWsdl}">
> 		</axis-wsdl2java>
> 	</target>
>
> 	<target name="compileJava" depends="axisWSDL2Java">
> 		<mkdir dir="classes" />
> 		<javac srcdir="src"
> 		       destdir="classes"
> 		       debug="on"
> 		       deprecation="off"
> 		       includeAntRuntime="no"
> 		       includeJavaRuntime="no">
> 			<classpath refid="project.classpath" />
> 		</javac>
> 	</target>
>
> </project>
>
> ----------------------------------------------------------
>
> Any suggestion/help will be much appreciated because I can't go any
> further until this is resolved. Thanks!
>
> JAB
>
>   


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