You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2009/07/10 22:14:55 UTC

Re: boolean webmethod with Aegis throwing NPE

Michael,

I'm going to convert your example to a maven project that can run
against a CXF devo tree, then attach it to the JIRA, and see where we
get from there.

--benson


On Thu, Jul 9, 2009 at 3:57 AM, Michael
Berkowitz<mb...@xconnect.net> wrote:
> Benson,
>
> I trust this finds you well.
>
> I’ve sent you a link, separately, to a zip file containing an example of
> Aegis bug that I wrote about, which I believe is identical to
> https://issues.apache.org/jira/browse/CXF-1670.
>
> Sorry it took so unconscionably long, but I haven’t been able to free any of
> my people up to create it ‘til now.  There a text file explaining how to
> recreate the bug, which is very easy, except that you’ll have to have a
> Tomcat instance to which you can deploy the web service.  The bug is
> produced, though, on the client side when it tries to serialize a certain
> type of object.
>
> Please let me know that you’ve received the example and managed to recreate
> the bug or, alternatively, if you encounter a problem.  It would be a big
> help to us if we could get past this.
>
> Thanks in advance.
>
>
>
> Michael Berkowitz
> VPR&D
> XConnect  - Interconnecting Our Digital World™
> P : +972-2-621-8048
> M : +972-52-553-8811
>
> mberkowitz@xconnect.net
>
> skype:  michael.berkowitz
>
> MSN:  mbarrettberkowitz@hotmail.com
>
>
>
>
>
>
>
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Thursday, April 02, 2009 2:09 PM
> To: Michael Berkowitz
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
>
>
> Just to be clear, all you can do directly with that page is switch from
> Aegis to JAXB and follow the instructions. I'm looking for input into what
> part of those features to look into adding into Aegis.
>
> On Thu, Apr 2, 2009 at 7:05 AM, Michael Berkowitz <mb...@xconnect.net>
> wrote:
>
> Thanks for the updates – I’ll look into the proposed solution and let you
> know.
>
>
>
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Thursday, April 02, 2009 1:19 PM
>
> To: Michael Berkowitz
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
>
>
> It looks to me as if no one ever even considered circular reference chains
> in Aegis. I've asked my fellow CXF devs for advice.
>
> On Thu, Apr 2, 2009 at 1:07 AM, Michael Berkowitz <mb...@xconnect.net>
> wrote:
>
> Quite right.  I haven’t forgotten!  In fact, I just brought it up with my
> staff at yesterday’s meeting, but we’ve all been swamped since I last
> wrote.  I hope to get to it either over the weekend or early next week.
>
>
>
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Thursday, April 02, 2009 3:31 AM
>
> To: Michael Berkowitz
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
>
>
> You never did post me a test case, did you?
>
> On Mon, Mar 23, 2009 at 3:57 AM, Michael Berkowitz <mb...@xconnect.net>
> wrote:
>
> I don’t think I ever mentioned examples of where Aegis is anal about
> JavaBeans conformance:  I’ve found that if I have a method that starts with
> get or is and there’s no corresponding set (perhaps because the thing being
> returned isn’t an actual field but rather some sort of calculation), it
> complains.  Ultimately I found that I could use an annotation to tell Aegis
> to ignore it.
>
> I believe it also complained if I had a data member for which there was no
> getter and setter.
>
>
>
> From: Benson Margulies [mailto:bimargulies@gmail.com]
>
> Sent: Sunday, March 22, 2009 4:05 AM
>
> To: Michael Berkowitz
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
>
>
> Aegis isn't necessarily 'strict', but it's defintely unimaginative. Have you
> played with .aegis.xml files to give it instructions? What precisely is the
> case at hand? Is there something you want it to turn into an element that
> it's oblivious to?
>
> Thats bug's pretty humorous.
>
> I'm about the only Aegis maintainer. If you could perchance create a little
> Maven project that has the necessary dependencies so that I can run it and
> watch it explode, I'll see what I can do. It doesn't look likely to succumb
> to just reading the code.
>
> Anyway, I'd rather be reconnected to someone with some embarassment than
> not, so feel free to rat me out.
>
> On Sat, Mar 21, 2009 at 4:50 PM, Michael Berkowitz <mb...@xconnect.net>
> wrote:
>
> I’ll do that, but it may have to wait ‘til tomorrow.  Your graduation date
> is certainly the right general timeframe; I won’t tell him you’ve forgotten
> J
>
>
>
> I have a general question about Aegis, while I’ve got your attention:  I’ve
> noticed that it’s very, very strict about Javabean conformance, whereas
> another library I’ve used for serializing/unserializing to/from XML, XStream
> from ThoughtWorks, seems to do the whole business using reflection
> regardless of whether the classes are Javabeans.  Is there something
> specific about the SOAP dialect that makes this necessary?
>
>
>
> And one more thing, if I may:  there’s another Aegis bug on the books,
> https://issues.apache.org/jira/browse/CXF-1670, that nobody seems to be
> working on, and I was wondering what the chances are of that happening.  I’d
> do it myself if I could find the time to learn the code, as it’s forcing me
> to create a whole set of “mock” objects to pass back-and-forth because
> passing the actual Hibernate objects is prevented by this bug.
>
>
>
> Anyway, thanks for your attention, and I’ll try that bug with a new version
> soon.
>
>
>
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Saturday, March 21, 2009 10:24 PM
> To: Michael Berkowitz
>
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
>
>
> I have a horrible head for names. I graduated in '82 after entering with the
> class of '81. It's entirely possible that I knew him then.
>
> I'd be grateful if you give the newer version a whirl, since there is
> without a doubt a bug in there somewhere.
>
> On Sat, Mar 21, 2009 at 4:16 PM, Michael Berkowitz <mb...@xconnect.net>
> wrote:
>
> I've worked around it by changing the webmethod signature, so I'm okay for
> now, but if it would help you for me to try it with those versions I'll be
> glad to do so; please just let me know.
>
> BTW, did you go to MIT with my friend Jeremy Barkan?  I seem to recall his
> mentioning your name.
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Saturday, March 21, 2009 10:00 PM
> To: users@cxf.apache.org
> Subject: Re: boolean webmethod with Aegis throwing NPE
>
> Aegis has bugs. Can I ask you to try 2.1.5-SNAPSHOT? Or even 2.2? If I have
> to fix this, I'd rather be fixing it in the current code.
>
> On Sat, Mar 21, 2009 at 3:28 PM, Michael Berkowitz
> <mb...@xconnect.net>wrote:
>
>> I've got a web method defined thus:
>>
>>       @WebMethod
>>
>>       boolean haveNumber(String number);
>>
>> I'm using Aegis as my databinding.  When I call the method from my
>> client, the response looks like this:
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>
>>       <soap:Body>
>>
>>              <ns1:haveNumberResponse
>> xmlns:ns1="http://voim.xconnect.com/">
>>
>>                     <return>false</return>
>>
>>              </ns1:haveNumberResponse>
>>
>>       </soap:Body>
>>
>> </soap:Envelope>
>>
>> which seems fine, but my client throws a NullPointerException because
>> the proxy code has trouble somehow parsing the response.  Specifically,
>> in org.apache.cxf.endpoint.ClientImpl the line
>>
>>                            resList = inMsg.getContent(List.class);
>>
>> sets resList to an array with one null member.
>>
>> I've tried both Boolean and boolean, with the same results.
>>
>> I'm using CXF 2.1.3 on both ends.  Any ideas?
>>
>> Michael
>>
>>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________