cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yu L <yu....@generationetech.com>
Subject Re: CXF dynamic client can not handle array of complex objects as return value?
Date Fri, 04 Sep 2009 17:40:53 GMT

Looks they are quite similar. Here is the method signature after running
wsdl2java:

    @ResponseWrapper(localName = "executeRunbookResponse", targetNamespace =
"http://http://www.resolve-systems.com/resolve/WebServiceListener/xsd",
className =
"http.www_resolve_systems_com.resolve.webservicelistener.xsd.ExecuteRunbookResponse")
    @RequestWrapper(localName = "executeRunbook", targetNamespace =
"http://http://www.resolve-systems.com/resolve/WebServiceListener/xsd",
className =
"http.www_resolve_systems_com.resolve.webservicelistener.xsd.ExecuteRunbook")
    @WebResult(name = "return", targetNamespace =
"http://http://www.resolve-systems.com/resolve/WebServiceListener/xsd")
    @WebMethod(action = "urn:executeRunbook")
    public java.util.List<com.xpn.xwiki.plugin.resolve.xsd.Pair>
executeRunbook(
        @WebParam(name = "token", targetNamespace =
"http://http://www.resolve-systems.com/resolve/WebServiceListener/xsd")
        java.lang.String token,
        @WebParam(name = "params", targetNamespace =
"http://http://www.resolve-systems.com/resolve/WebServiceListener/xsd")
        java.util.List<com.xpn.xwiki.plugin.resolve.xsd.Pair> params
    );


It should return java.util.List<com.xpn.xwiki.plugin.resolve.xsd.Pair>, not
com.xpn.xwiki.plugin.resolve.xsd.Pair

Does anybody when the bug will fixed ? Thanks.

Yu



dkulp wrote:
> 
> 
> I wonder if this is somehow related to:
> https://issues.apache.org/jira/browse/CXF-2415
> 
> (mostly just thinking)
> 
> Dan
> 
> 
> 
> 
> On Thu September 3 2009 1:20:02 pm Yu L wrote:
>> Hey,
>> 
>> I am using CXF DynamicClientFactory from Groovy to call a web service
>> developed with apache Axis2. The method has this signature:
>> 
>> Pair[] executeRunbook(String token, Pair[] params)
>> 
>> Pair is a complex object defined as:
>> 
>> public class Pair {
>>         private String name;
>>         private String value;
>> 
>>         public String getName()
>>         {
>>                 return name;
>>         }
>> 
>>         public void setName(String n)
>>         {
>>                 name = n;
>>         }
>> 
>>         public String getValue()
>>         {
>>                 return value;
>>         }
>> 
>>         public void setValue(String v)
>>         {
>>                 value = v;
>>         }
>> 
>>         public String toString()
>>         {
>>                 return "(" + name + "," + value + ")";
>>         }
>> }
>> 
>> When executeRunbook() method was called from Groovy script, i.e. "
>> results
>>  = client.invoke( "executeRunbook", token, list1); ", its return value ,
>>  "results", was not an array of Pair objects as defined by its method
>>  signature, instead it always had a value which was the first Pair
>> element
>>  of the array.
>> 
>> This was log output for about call:
>> 
>> 2009-09-01 18:16:39,290 DEBUG [Thread-49]
>> (sun.reflect.NativeMethodAccessorImpl:?) - ++++++++++++ results =
>> com.xpn.xwiki.plugin.resolve.xsd.Pair@1b6903f
>> 
>> 
>> It seems CXF dynamic client was not able to handle an array of complex
>> object as return value from a web service method call.
>> 
>> Is anybody aware of the similar problem with CXF dynamic client? Is there
>> any workaround? Thanks in advance.
>> 
>> Attached are WSDL file and Groovy script to show how the call was made.
>> 
>> Yu
>> http://www.nabble.com/file/p25280407/WebserviceListener.xml
>> WebserviceListener.xml  http://www.nabble.com/file/p25280407/DCFGroovy
>> DCFGroovy
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/CXF-dynamic-client-can-not-handle-array-of-complex-objects-as-return-value--tp25280407p25298808.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message