Do you have to use that class? The web service I'm writing returns a few arrays, but just as plain java arrays, eg - see below my code that consumes an array of searchResults:

//blank template for my search service in my web service delegate .
ImageSearch[] paramResults = new ImageSearch[]{new ImageSearch()};

      //not really a closure, but as close as you can get in Java
       DelegateClosure closure = new DelegateClosure(){
           public void execute() throws Exception{
this.searchResults = svc.ImageSearch(this.getCredentials(), "lorem ipsum") ; // <-- call to web service stub
           }
       };

       closure.setSearchResults(paramResults);
       execute(closure);
       paramResults = closure.getSearchResults();

       return paramResults;

Can you include some of your code that requires org.xmlsoap.schemas.soap.encoding.Array? Ideally your web service interface should be defined in terms of plain java objects, and only xFire should be concerned with weird xml encoding classes...

cheers!

*Matthew Kerle
**IT Consultant
**SRA Information Technology*

*Canberra*
Ground Floor, 40 Brisbane Avenue
BARTON  ACT  2600

Office:    +61 2 6273 6122
Fax:         +61 2 6273 6155
Mobile:  +61404 096 863
Email:    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web:     www.sra.com.au


Scott Sauyet wrote:
This feels like a ridiculous question, but Google is not being any help.

How do I actually use a value returned as an instance of a subclass of

    org.xmlsoap.schemas.soap.encoding.Array

? I am trying to use XFire for the client code calling another system. I have the code generating properly from the WSDL, and I can make the call that is supposed to return an instance of a class that extends Array. There is a Holder<Integer> parameter which is returning with the right size of the output. And sniffing the SOAP messages, the data is being returned in the XML document. But the API for Array doesn't seem to give me any way to access the elements. And this class adds nothing I can see to the API:

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "arEventList")
    public class ArEventList
        extends Array
    {

    }

In the test code, I try the entire API, and get back nothing of value I can see, except for the size of the array, which isn't actually stored in the Array itself but in a mutable parameter.

    EventsServiceClient client = new EventsServiceClient();
    Events events = client.getEventsPort(getServerUrl());
    Holder<Integer> countHolder = new Holder<Integer>();
    ArEventList list = events.getEventListById(getSessionToken(), 0,
                                    100000, 44, false, countHolder);
    System.out.println(list.getAny());             // => []
    System.out.println(list.getOtherAttributes()); // => {}
    System.out.println(list.getArrayType());       // => null
    System.out.println(list.getHref());            // => "#0"
    System.out.println(list.getId());              // => null
    System.out.println(list.getOffset());          // => null
    System.out.println(countHolder.value);         // => 788


So how can I get at the actual elements returned in the Array?

  -- Scott


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

   http://xircles.codehaus.org/manage_email



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

   http://xircles.codehaus.org/manage_email

Reply via email to