Hi Jony ,
That was one of the issue with annogen, but we have fixed the issue in 1.2
Please try with Axis2 1.2.

Thanks
Deepal

jony wrote:

>I got this working.
>
>For posterity's sake:
>
>you need to have a 'get' and 'set' for each param in your bean. 
>
>instead of 
>
>class MyBean
>{
>     public String str0;
>     public int n0;
>}
>
>use 
>
>class MyBean
>{
>     private String str0;
>     private int n0;
>
>     public String getStr() { return str0; }
>     public void setStr(String s) { str0 = s; }
>     public int getN() { return n0; }
>     public void setN(int n) { n0 = n; }
>}
>
>Probably obvious to most people but it set me back a few days. 
>     
>Also - dont name your get/set something with two capital letters in a row.
>It won't work. 
>
>I was using 'getMAC()' and 'setMAC()' and they always returned NULL. When I
>changed them to 'getMac()' and 'setMac()' they worked fine.
>
>
>One to grow on.
>
>
>jony wrote:
>  
>
>>One thing that I don't think I made clear: the empty values are coming
>>from my server back to the client.  The sample code you refer to seems to
>>be more concerned with pushing values from client->server. Ill keep
>>reading the site to better understand it. 
>>
>>
>>
>>Martin Gainty wrote:
>>    
>>
>>>Good Morniong Jony
>>>How is the parameter for ServiceClient.sendReceive(param) being
>>>constructed?
>>>If you look at this example here a createPayLoad() method is called which 
>>>adds the necessary OMElement.value to OMElement.method from 
>>>OMAbstractFactory
>>>http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html
>>>???
>>>M--
>>>This email message and any files transmitted with it contain confidential
>>>information intended only for the person(s) to whom this email message is
>>>addressed.  If you have received this email message in error, please
>>>notify
>>>the sender immediately by telephone or email and destroy the original
>>>message without making a copy.  Thank you.
>>>
>>>----- Original Message ----- 
>>>From: "jony" <[EMAIL PROTECTED]>
>>>To: <axis-user@ws.apache.org>
>>>Sent: Tuesday, May 01, 2007 10:17 AM
>>>Subject: axis2 - array of object - no data ?
>>>
>>>
>>>      
>>>
>>>>I have a simple client that does a 'login' and then asks for an array of
>>>>object (Bean) from the server. The structure of the object is
>>>>
>>>>String str1
>>>>String str2
>>>>int nVal
>>>>
>>>>The 'login' is an exchange of a random string sent from the server. The
>>>>client encrypts it and sends it back. The server encrypts the original
>>>>and
>>>>compares it to what the client sends back. If they match the session is
>>>>marked 'valid'. No problem!
>>>>
>>>>Almost. The strings and Boolean are exchanged correctly between the
>>>>client
>>>>and server. But when I return my array of  object (a bean) I get
>>>>'java.lang.InstantiationException'. I checked the IO using the
>>>>TCPMonitor
>>>>and saw that the returned SOAP message contained the appropriate # of
>>>>'<ns:return />' blocks but they were all empty!
>>>>
>>>>It gets better... in this same server I make a call to some JNI (C++
>>>>.DLL)
>>>>which returns an array of object (another bean) and it *works*. The
>>>>values
>>>>go through correctly. So clearly there is some marshalling step that I 
>>>>need
>>>>to do with my java-only code that is happening when I use JNI but not
>>>>when 
>>>>I
>>>>use the Java 'new' operator.
>>>>
>>>>Whats the step? Is there some other way to allocate the memory in Java 
>>>>such
>>>>that SOAP will pick it up?
>>>>-- 
>>>>View this message in context: 
>>>>http://www.nabble.com/axis2---array-of-object---no-data---tf3675269.html#a10269733
>>>>Sent from the Axis - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>      
>>>
>>    
>>
>
>  
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to