You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2009/04/02 12:23:20 UTC

Re: boolean webmethod with Aegis throwing NPE

Michael,

Here's how the JAXB gang prescribes avoiding this problem.

https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html

What of this seems plausible to you (or other readers) for Aegis?

--benson


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 <
> mberkowitz@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 <
> mberkowitz@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 <
> mberkowitz@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
> ______________________________________________________________________
>