Dear all,
I have a problem with complex data types in webservices based on GT
4.0.3.
In my wsdl-file I have defined a function "printUserRecord", which gets
data of type "UsrRecType" as input and gives a string as output.
<!-- TYPES -->
<xsd:element name="printUserRecord">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:UsrRecType" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="printUserRecordResponse" type="xsd:string">
</xsd:element>
<!-- MESSAGES -->
<wsdl:message name="PrintUserRecordInputMessage">
<wsdl:part name="parameters" element="tns:printUserRecord"/>
</wsdl:message>
<wsdl:message name="PrintUserRecordOutputMessage">
<wsdl:part name="parameters" element="tns:printUserRecordResponse"/>
</wsdl:message>
<!-- PORT TYPE -->
<wsdl:operation name="printUserRecord">
<wsdl:input message="tns:PrintUserRecordInputMessage"/>
<wsdl:output message="tns:PrintUserRecordOutputMessage"/>
</wsdl:operation>
globus-build-service.sh works fine aswell as deployment and starting the
container.
When I try to write my client for this services I get some
incomprehensible errors. In my code I just want to call this function:
UsrRecType ur = new UsrRecType();
System.out.println("UserRecord " + userPT.printUserRecord(ur) );
But when I try to compile the client:
javac -classpath ./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/CreateUser/Client.java
I get the following error message:
org/globus/examples/clients/CreateUser/Client.java:89:
printUserRecord(org.globus.examples.stubs.CreateUser.PrintUserRecord) in
org.globus.examples.stubs.CreateUser.CreateUserPortType cannot be
applied to
(org.globus.examples.services.core.createuser.impl.UsrRecType)
I am just wondering why this does not work, because the same work for
simple data types, such as integer and string.
Why is the function "printUserRecord()" created as of type
PrintUserRecord and not of the type UsrRecType as defined in wsdl?
Thanks in advance,
Henrik Schulz