cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse" <...@envoisolutions.com>
Subject Re: Help diagnosing a simple example
Date Sat, 30 Dec 2006 05:19:20 GMT
I think you're writing the JAX-WS service wrong. You don't want the
@Request/ResponseWrapper attributes. Even if you did  the way you did
it is kind of nonsensical.

Here's why. Say we have a wrapped message:

<echo><text>Hello</text></echo>

JAX-WS specifies that an Echo JAXB bean gets generated with a text
property. This bean gets "unwrapped" for the invocation. Such a
service method would look like this:

@RequestWrapper(className="Echo")
@ResponseWrapper(className="EchoResponse")
public String echo(String text)

I hope you can see now that you can't really unwrap a String's
properties. We should probably be checking to make sure that the
Request/ResponseWrapper annotations are correct, so I think thats a
failing on our part.

 Cheers,
 - Dan

On 12/29/06, Ted Neward <ted@tedneward.com> wrote:
> OK, got further, but I'm hoping I'm not correct on something. Here's what I
> want to do, and I want to confirm that there's no way to do it:
> (*) I want to do a new greenfield service starting from JAXWS (not WSDL).
> (*) I want to use the following SEI:
>
> @WebService
> public interface Howdy
> {
>         @WebMethod
>         @RequestWrapper(className="java.lang.String")
>         @ResponseWrapper(className="java.lang.String")
>         public String speak(String msg);
> }
>
> When I go through the steps of creating the service implementation, gen the
> WDSL using java2wsdl, and use the generated (wsdl2java -client) client code,
> including the generated client (which is trey handy, by the way), I get an
> error that states that "java.lang.String is not a bean". WTF? Is it really
> true that I can't ship Strings here, or is this a red-herring error message?
>
> Ted Neward
> Java, .NET, XML Services
> Consulting, Teaching, Speaking, Writing
> http://www.tedneward.com
>
> > -----Original Message-----
> > From: Ted Neward [mailto:ted@tedneward.com]
> > Sent: Friday, December 29, 2006 12:20 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: Help diagnosing a simple example
> >
> > "some other mechanism" meaning....? (I wasn't aware there was another
> > mechanism.)
> >
> > I'm going to attack it again this morning with (hopefully) clearer head
> > and
> > see if I can get it to work, and if not, I'll ship client and server code
> > to
> > the list for scrutiny and (hopefully) correction. :-)
> >
> > Ted Neward
> > Java, .NET, XML Services
> > Consulting, Teaching, Speaking, Writing
> > http://www.tedneward.com
> >
> >
> > > -----Original Message-----
> > > From: Dan Diephouse [mailto:dan@envoisolutions.com]
> > > Sent: Friday, December 29, 2006 11:03 AM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: Help diagnosing a simple example
> > >
> > > Hi Ted,
> > >
> > > Can you maybe provide a little bit of sample code of how you're using
> > > the client? Its a bit hard to specify what exactly might be going on
> > > without seeing what you're doing :-)
> > >
> > > Regarding logging - if you're using Endpoint.publish to build your
> > > server you can see instructions here:
> > >
> > > http://cwiki.apache.org/CXF20DOC/debugging.html
> > >
> > > If you're using some other mechanism to publish your service let me
> > > know and I'll write up docs on how to enable logging for that way.
> > >
> > >   Cheers,
> > >   Dan
> > >
> > > On 12/29/06, Ted Neward <ted@tedneward.com> wrote:
> > > > I'm doing my own "Hello world" example, just to get started with
> > > Celtix/CXF,
> > > > and I'm getting a SOAPFaultException from the client: "Cannot find the
> > > > dispatch method". Server's throwing a "Error in decoding SOAP
> > Message",
> > > > which makes it seem like I'm getting a mismatched SOAP operation name
> > > > somehow. Is there any way (short of using tcpmon in between the two)
> > of
> > > > seeing the SOAP message from the client and server in the pipeline?
> > > >
> > > >
> > > >
> > > > Additionally, suggestions on what might be wrong here would be
> > helpful;
> > > I'm
> > > > trying to build the service via JAXWS annotations, java2wsdl it, then
> > > > wsdl2java a client that uses it. Any hangups I should be aware of?
> > > >
> > > >
> > > >
> > > > Ted Neward
> > > >
> > > > Java, .NET, XML Services
> > > >
> > > > Consulting, Teaching, Speaking, Writing
> > > >
> > > > HYPERLINK "http://www.tedneward.com"http://www.tedneward.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > No virus found in this outgoing message.
> > > > Checked by AVG Free Edition.
> > > > Version: 7.5.432 / Virus Database: 268.15.29/607 - Release Date:
> > > 12/28/2006
> > > > 12:31 PM
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Dan Diephouse
> > > Envoi Solutions
> > > http://envoisolutions.com | http://netzooid.com/blog
> > >
> > > --
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.432 / Virus Database: 268.16.0/609 - Release Date:
> > 12/29/2006
> > > 4:48 PM
> > >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.432 / Virus Database: 268.16.0/609 - Release Date: 12/29/2006
> > 4:48 PM
> >
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.432 / Virus Database: 268.16.0/609 - Release Date: 12/29/2006
> > 4:48 PM
> >
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.0/609 - Release Date: 12/29/2006
> 4:48 PM
>
>
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Mime
View raw message