Hello,

It is possibly because it is trying to find VectorType defined in whatever xsd refers to, probably xsd="http://www.w3.org/2001/ XMLSchema". You should define the VectorType namespace
eg.  tns:VectorType where xmlns:tns="http://myNamespace";
and make sure this namespace is referenced correctly in the wsdl.

Cheers,

Ian

On 21 Aug 2007, at 07:43, Schulz, Henrik wrote:

Dear all,

I try to modify the MathService example in such a way that there is a function which adds not only scalar numbers but vectors.

For that purpose I defined a VectorType in Math.wsdl:

<xsd:element name="VectorType">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="x" type="xsd:int"/>
   <xsd:element name="y" type="xsd:int"/>
   <xsd:element name="z" type="xsd:int"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>

The function the service should provide is defined as follows:

<xsd:element name="VectorAdd" type="xsd:VectorType"/>
<xsd:element name="VectorAddResponse">
 <xsd:complexType/>
</xsd:element>

I have defined this method in the java source code of the service and I have also defined a class VectorType() in such a way:

package org.globus.examples.services.core.first.impl;
public class VectorType{
    private int x;
    private int y;
    private int z;

    public VectorType(){
    }

    public VectorType(
           int x;
           int y;
           int z) {
           this.x = x;
           this.y = y;
           this.z = z;
    }
...

When I try to build the service I always get this error message:

generateStubs:
     [echo]  Generating stubs from Math_service.wsdl
[java] java.io.IOException: Type {http://www.w3.org/2001/ XMLSchema}VectorType is referenced but not defined. [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined (SymbolTable.java:656) [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add (SymbolTable.java:536) [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate (SymbolTable.java:509) [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate (SymbolTable.java:486) [java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run (Parser.java:356)
     [java]     at java.lang.Thread.run(Thread.java:595)

BUILD FAILED

What is the reason for that error? How should complex data types be defined and used?

Thanks in advance,
Henrik






Reply via email to