users@jax-rpc.java.net

WSDL - empty request

From: Honorez Dylan <Dylan.Honorez_at_cronos.be>
Date: Wed, 9 Feb 2005 12:59:00 +0100

Hi,

While developing a jax-rpc document/literal webservice, I came across
the following issue:
WSCompile is ok with one empty request, but not with more. The WSDL is
fine and validates within XML Spy.

WSCompile output:
D:\projects\GFISFileHandling v2>call wscompile -gen:server
-f:searchschema -keep -verbose -d build/WEB-INF/classes -model build/
WEB-INF/model.xml.gz config.xml
users_at_jax-rpc.dev.java.net[CustomClassGenerator: generating JavaClass
for: fileInfo]
[CustomClassGenerator: generating JavaClass for: objectInfo]
[LiteralObjectSerializerGenerator: writing serializer/deserializer for:
fileInfo]
[LiteralObjectSerializerGenerator: writing serializer/deserializer for:
objectInfo]
error: generator error: cannot dispatch operation: retrieveError

This is my WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://www.xt-i.com/gfis/"
targetNamespace="http://www.xt-i.com/gfis/">
        <types>
                <xs:schema targetNamespace="http://www.xt-i.com/gfis/">
                        <xs:complexType name="fileInfo">
                                <xs:sequence>
                                        <xs:element name="fileName"
type="xs:string"/>
                                        <xs:element name="fileSizeKb"
type="xs:long"/>
                                        <xs:element name="objectType"
type="xs:string"/>
                                </xs:sequence>
                        </xs:complexType>
                        <xs:complexType name="objectInfo">
                                <xs:sequence>
                                        <xs:element name="fileName"
type="xs:string"/>
                                        <xs:element name="objectType"
type="xs:string"/>
                                </xs:sequence>
                        </xs:complexType>
                        <xs:element name="fhstartRequest"
type="xs:string"/>
                        <xs:element name="fhstartResponse"
type="xs:boolean"/>
                        <xs:element name="retrieveResponse"
type="tns:fileInfo"/>
                        <xs:element name="copyRequest"
type="tns:objectInfo"/>
                        <xs:element name="copyResponse"
type="xs:boolean"/>
                        <xs:element name="removeRequest"
type="tns:objectInfo"/>
                        <xs:element name="removeResponse"
type="xs:boolean"/>
                        <xs:element name="retrieveErrorResponse"
type="tns:fileInfo"/>
                </xs:schema>
        </types>
        <message name="fhstartRequest">
                <part name="fhstartRequest"
element="tns:fhstartRequest"/>
        </message>
        <message name="fhstartResponse">
                <part name="fhstartResponse"
element="tns:fhstartResponse"/>
        </message>
        <message name="retrieveRequest"/>
        <message name="retrieveResponse">
                <part name="fileInfo" element="tns:retrieveResponse"/>
        </message>
        <message name="copyRequest">
                <part name="objectInfo" element="tns:copyRequest"/>
        </message>
        <message name="copyResponse">
                <part name="success" element="tns:copyResponse"/>
        </message>
        <message name="removeRequest">
                <part name="objectInfo" element="tns:removeRequest"/>
        </message>
        <message name="removeResponse">
                <part name="success" element="tns:removeResponse"/>
        </message>
        <message name="retrieveErrorRequest"/>
        <message name="retrieveErrorResponse">
                <part name="fileInfo"
element="tns:retrieveErrorResponse"/>
        </message>
        <portType name="FHPort">
                <operation name="fhstart">
                        <input message="tns:fhstartRequest"/>
                        <output message="tns:fhstartResponse"/>
                </operation>
                <operation name="retrieve">
                        <input message="tns:retrieveRequest"/>
                        <output message="tns:retrieveResponse"/>
                </operation>
                <operation name="copy">
                        <input message="tns:copyRequest"/>
                        <output message="tns:copyResponse"/>
                </operation>
                <operation name="remove">
                        <input message="tns:removeRequest"/>
                        <output message="tns:removeResponse"/>
                </operation>
                <operation name="retrieveError">
                        <input message="tns:retrieveErrorRequest"/>
                        <output message="tns:retrieveErrorResponse"/>
                </operation>
        </portType>
        <binding name="FHBinding" type="tns:FHPort">
                <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="fhstart">
                        <!-- initial start / do not use / invoke
manually -->
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
                <operation name="retrieve">
                        <!-- // return first element on waiting queue
(fileName, fileSize, objectType)
                        // move element to retrieved queue -->
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
                <operation name="copy">
                        <!-- // if transferMethod is "FTP", construct
new FtpClient and upload to correct location
                        // if transferMethod is "FS", just copy to the
correct location -->
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
                <operation name="remove">
                        <!-- // delete file from fileSystem, remove from
queue or set status to processed -->
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
                <operation name="retrieveError">
                        <!-- // get error from errorQueue -->
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
        </binding>
        <service name="FileHandler">
                <port name="FileHandlerPort" binding="tns:FHBinding">
                        <soap:address location="REPLACE_WITH_ACTUAL_URL"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
                </port>
        </service>
</definitions>

When I remove the "retrieveError" operation WSCompile works ok.
Any suggestions to my problem or another way to send empty requests?

Kind regards,
Dylan Honorez,
dylan.honorez_at_xt-i.com
http://www.xt-i.com/