HI all,
I am struggling a bit with Xfire for the last few days. Indeed I decided to use Xfire in place of Axis, and it was fine at the beginning until I had to
define a method that returns String[].

Now I haven't yet found a solution and I must use an ugly hack to get my application working.
I have an interface(attached), one of the method returns a String[].
The wsdl (wrapped/literal generated by Axis) for this interface is also attached. Then when I try to generate the client with WsGen class, the interface(FileServicePortType attached) generated is totally different from the original interface for all methods. It seems that the problem is about the maxOccurs="unbounded" attribute in line <element maxOccurs="unbounded" name="listFilesReturn" type="xsd:string"/> in the wsdl.

Indeed when I remove this attribute, the interface generated is the same for all methods except of course for the one that returned String[] and now returns only String

So does XFire supports String[]? Indeed it seems that <element maxOccurs="unbounded" name="listFilesReturn" type="xsd:string"/> is the correct way of defining String[], but then the interface generated is different from the service interface ?

Thanks a lot for any help
I tried to find related stuff on the mailing list, but I found only people having the same pb but no solutions provided. In fact I would be curious to see how XFire generates the WSDL for a method that returns String[], but using WSDLGenTask is a real nightmare as no documentation is provided
Thanks
Romain
/**
 * FileServicePortType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */
package usyd.fileservice.ws;

public interface FileService{
    /**
    * Returns the directory the application is monitoring
    * @return the directory the application is monitoring
    */
    public java.lang.String getHome();

    /**
     * Returns the absolute path given the parent path and the filename
     * @param parent the parent path
     * @param fileName
     * @return the absolute path given the parent path and the filename
     */
    public java.lang.String getFilePath(java.lang.String parent,
        java.lang.String fileName) ;

    /**
     * Returns the parent of the given directory
     * @param dir the directory to get the parent from
     * @return the parent's name.
     */
    public java.lang.String getParent(java.lang.String dir);
        

    /**
     * Creates a new directory with the given name
     * @param parent the path to the parent directory
     * @param newDir the name of the directory to create
     */
    public void create(java.lang.String parent, java.lang.String newDir);

    /**
     * List all directories contained in the given directory
     * @param dir, the directory to list the content from
     * @return a String array containing the name of directories
     * contained in the given dir. Note that files are not listed
     */
    public java.lang.String[] listFiles(java.lang.String dir);
}
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.chem.usyd.edu.au/mmsn/fileservice"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://www.chem.usyd.edu.au/mmsn/fileservice"; xmlns:intf="http://www.chem.usyd.edu.au/mmsn/fileservice"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="http://www.chem.usyd.edu.au/mmsn/fileservice"; xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="getHome">
    <complexType/>
   </element>
   <element name="getHomeResponse">
    <complexType>
     <sequence>
      <element name="getHomeReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getFilePath">
    <complexType>
     <sequence>
      <element name="parent" type="xsd:string"/>
      <element name="fileName" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getFilePathResponse">
    <complexType>
     <sequence>
      <element name="getFilePathReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getParent">
    <complexType>
     <sequence>
      <element name="dir" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getParentResponse">
    <complexType>
     <sequence>
      <element name="getParentReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="create">
    <complexType>
     <sequence>
      <element name="parent" type="xsd:string"/>
      <element name="newDir" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="createResponse">
    <complexType/>
   </element>
   <element name="listFiles">
    <complexType>
     <sequence>
      <element name="dir" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="listFilesResponse">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="listFilesReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="getHomeResponse">

      <wsdl:part element="impl:getHomeResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="listFilesRequest">

      <wsdl:part element="impl:listFiles" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="listFilesResponse">

      <wsdl:part element="impl:listFilesResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="createRequest">

      <wsdl:part element="impl:create" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="getFilePathRequest">

      <wsdl:part element="impl:getFilePath" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="getFilePathResponse">

      <wsdl:part element="impl:getFilePathResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="createResponse">

      <wsdl:part element="impl:createResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="getHomeRequest">

      <wsdl:part element="impl:getHome" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="getParentRequest">

      <wsdl:part element="impl:getParent" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="getParentResponse">

      <wsdl:part element="impl:getParentResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:portType name="FileServicePortType">

      <wsdl:operation name="getHome">

         <wsdl:input message="impl:getHomeRequest" name="getHomeRequest"/>

         <wsdl:output message="impl:getHomeResponse" name="getHomeResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getFilePath">

         <wsdl:input message="impl:getFilePathRequest" name="getFilePathRequest"/>

         <wsdl:output message="impl:getFilePathResponse" name="getFilePathResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getParent">

         <wsdl:input message="impl:getParentRequest" name="getParentRequest"/>

         <wsdl:output message="impl:getParentResponse" name="getParentResponse"/>

      </wsdl:operation>

      <wsdl:operation name="create">

         <wsdl:input message="impl:createRequest" name="createRequest"/>

         <wsdl:output message="impl:createResponse" name="createResponse"/>

      </wsdl:operation>

      <wsdl:operation name="listFiles">

         <wsdl:input message="impl:listFilesRequest" name="listFilesRequest"/>

         <wsdl:output message="impl:listFilesResponse" name="listFilesResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="file_serviceSoapBinding" type="impl:FileServicePortType">

      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getHome">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getHomeRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getHomeResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getFilePath">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getFilePathRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getFilePathResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getParent">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getParentRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getParentResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="create">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="createRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="createResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="listFiles">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="listFilesRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="listFilesResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="FileService">

      <wsdl:port binding="impl:file_serviceSoapBinding" name="file_service">

         <wsdlsoap:address location="http://localhost:8080/axis/services/file_service"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
package usyd.fileservice.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService(name = "FileServicePortType", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, 
parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface FileServicePortType {


    @WebMethod(operationName = "getFilePath", action = "")
    @WebResult(name = "getFilePathResponse", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
    public GetFilePathResponse getFilePath(
        @WebParam(name = "getFilePath", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
        GetFilePath getFilePath);

    @WebMethod(operationName = "getParent", action = "")
    @WebResult(name = "getParentResponse", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
    public GetParentResponse getParent(
        @WebParam(name = "getParent", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
        GetParent getParent);

    @WebMethod(operationName = "create", action = "")
    @WebResult(name = "createResponse", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
    public CreateResponse create(
        @WebParam(name = "create", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
        Create create);

    @WebMethod(operationName = "getHome", action = "")
    @WebResult(name = "getHomeResponse", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
    public GetHomeResponse getHome(
        @WebParam(name = "getHome", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
        GetHome getHome);

    @WebMethod(operationName = "listFiles", action = "")
    @WebResult(name = "listFilesResponse", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
    public ListFilesResponse listFiles(
        @WebParam(name = "listFiles", targetNamespace = 
"http://www.chem.usyd.edu.au/mmsn/fileservice";)
        ListFiles listFiles);

}

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to