Thanks Anne.  I discovered my problem and have now
gotten past it.  Your comments definitely allowed me
to figure out what was going on much quicker than I
otherwise would have.  

While the problem may be an obvious one to many who
read this list, I thought I would still post it here
in case there was ever anyone else having the same
issue.  So here is a (hopefully not too jumbled)
overview of what was going on:

I was exposing a method of a DAO class which returned
an array of DTO objects (simple Java beans).  I was
generating my WSDL and other supporting Axis files
(*.wsdd, web.xml, etc.) using the "Bottom Up Java
Bean" method in the Eclipse WTP.  After the service
was generated, I was then generating my client proxy
code into a separate project.  I discovered that when
I did this, Axis was creating a new copy of my DTO
class with some "extra" code in it.  I quickly
realized that this was the code Axis needed to use to
make sure SOAP messages involved with my DTO's complex
type contained the correct namespace.  So my first
solution was to replace my original DTO class (on the
server side) with the one generated by Axis.  Once I
did this my original problem was solved and the .NET
client began getting the output just as successfully
as its Java counterpart.  

However, this solution (while fairly acceptable)
created a dependency that I didn't much care for.  Now
my orginal DAO/DTO code was dependent on the Axis JAR
files.  My original goal was to use Axis to expose the
functionality of this code without changing the
original code at all.  The solution I came up with
that allowed me to do this was to do a custom package
to namespace mapping when creating my web service.  I
found that if I mapped the package my DTO was in to
the same namespace being used for the package my
service implementation (DAO) class was in, I no longer
had to replace my server side DTO class with the one
generated by Axis.

While admittedly, this approach may have some issues
of its own, I am pretty pleased with it for the time
being.  At this point my .NET and Java clients are
both communicating successfully with my service using
the doc/literal wrapped style and my original DAO and
DTO classes remain untouched.  This definitely gives
me what I needed for the time being.

Thanks again for the help.  Axis is truly a valuable
tool in bringing WS to the "mainstream" developer's
community.  

Brian


--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:

> The Axis service is returning a message that doesn't
> match the WSDL
> description. If you developed the service using a
> WSDL-first approach,
> then your tool is generating something wrong in the
> service. If you
> developed the service using a code-first approach,
> then you tool is
> generating an inappropriate WSDL.
> 
> Anne
> 
> On 9/22/06, Brian Moffatt <[EMAIL PROTECTED]>
> wrote:
> > Thanks Anne.  I've actually been trying out the
> web
> > services capabilities in the Eclipse Web Tools
> > Platform and that's how I created this particular
> > service.  I (maybe incorrectly) assumed that it
> was
> > just making calls directly to the Axis tools
> behind
> > the scenes without any additional interference. 
> So I
> > figured I'd end up with the same WSDL/service as
> if
> > I'd done it all using the Axis tools directly.  I
> > didn't actually try that, however.  Part of the
> reason
> > was that my presentation to my group was going to
> be
> > that there were now some more developer-friendly
> tools
> > (Eclipse WTP) for creating Web Services with Axis.
> > But maybe there are some issues there?
> >
> > By your comment, did you mean that the WSDL itself
> was
> > in error or that the Axis service seemed to be
> > returning a SOAP response that was in conflict
> with
> > the service definition laid out in the WSDL?
> >
> > Brian
> >
> > --- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> >
> > > According to the WSDL, Axis is doing it wrong.
> .NET
> > > is a lot more
> > > tempermental about namespaces. The proper
> response
> > > message should look
> > > like this:
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <soapenv:Envelope
> > >
> >
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > >
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > <soapenv:Body>
> > > <getAllBooksResponse
> > >
> >
>
xmlns="http://oracle.dao.tooltime.sete.stl.mo.boeing.com";
> > >
> > >
> >
>
xmlns:dto="http://dto.dao.tooltime.sete.stl.mo.boeing.com";>
> > > <getAllBooksReturn>
> > > <dto:author>Stephen King</dto:author>
> > > <dto:id>2</dto:id>
> > > <dto:numPages>350</dto:numPages>
> > > <dto:title>Gerald's Game</dto:title>
> > > </getAllBooksReturn>
> > > <getAllBooksReturn>
> > > <dto:author>Stephen King</dto:author>
> > > <dto:id>1</dto:id>
> > > <dto:numPages>500</dto:numPages>
> > > <dto:title>The Shining</dto:title>
> > > </getAllBooksReturn>
> > > </getAllBooksResponse>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > How did you create the service?
> > >
> > > Anne
> > >
> > > On 9/21/06, Brian Moffatt
> <[EMAIL PROTECTED]>
> > > wrote:
> > > > Thanks Anne.  I too thought wrapped
> doc/literal
> > > would
> > > > be my best bet for interoperability.  Attached
> are
> > > my
> > > > WSDL, and some SOAP messages.  The file
> > > > javaSOAPMessages.txt contains the request and
> > > response
> > > > messages captured when calling the Axis
> service
> > > from
> > > > the Java client (which works beautifully). 
> The
> > > file
> > > > dotNetSOAPMessages.txt contains the request
> > > message
> > > > captured when calling the Axis service from my
> > > .NET
> > > > client.  Unfortunately, for whatever reason,
> the
> > > > TCP/IP monitor I'm using isn't capturing the
> SOAP
> > > > response in this scenario.  I'm working on
> > > figuring
> > > > this out.  However I know something is coming
> back
> > > > because, like I said, I get back an array of
> two
> > > > objects (as expected).  They just don't have
> any
> > > > values on any of their attributes.
> > > >
> > > > The one thing that jumps out at me is in the
> > > request
> > > > messages, the Java version uses "soapenv"
> where
> > > the
> > > > .NET version uses "soap".  Aside from that the
> > > request
> > > > messages appear to be identical so one would
> > > assume
> > > > that the response messages coming back would
> be
> > > > identical too.
> > > >
> > > > Note that this is just some test stuff for a
> > > > presentation I'm doing for my group, but if we
> can
> > > get
> > > > something like this working for .NET - Java
> > > interop,
> > > > we want to look into using WS for some "real"
> > > stuff
> > > > within our group.
> > > >
> > > > Any further ideas about what might be my
> problem
> > > are
> > > > greatly appreciated.
> > > >
> > > > Brian
> > > >
> > > > --- Anne Thomas Manes <[EMAIL PROTECTED]>
> wrote:
> > > >
> > > > > Wrapped doc/literal should work -- although
> you
> > > will
> > > > > probably do
> > > > > better using Axis 1.4 rather than Axis 1.3.
> > > There
> > > > > still are some
> > > > > problems with arrays, but you shouldn't have
> a
> > > > > problem with the bean.
> > > > > Please post some sample WSDLs and SOAP
> messages.
> > > > >
> > > > > Anne
> > > > >
> > > > > On 9/20/06, Brian Moffatt
> > > <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > I've seen this exact problem addressed in
> the
> > > > > archives
> > > > > > but never with any clear solution.  I was
> > > > > wondering if
> > > > > > this was something for which there is a
> known
> > > > > solution
> > > > > > and I'm just not finding it.
> > > > > >
> > > > > > Basically, I have an Axis based web
> service
> > > with 5
> > > > > > available methods.  One returns a simple
> Java
> > > bean
> > > > > > (made up of three Strings and an int) and
> one
> > > > > returns
> > > > > > an array of said beans.  The others return
> > > > > nothing.  I
> 
=== message truncated ===


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

Reply via email to