I somewhat agree with you that the lower level document definitions should
not be in the wsdl. I have been using a webservice that accomplishes
document based transactions via attachments. What this forced me to do
(because of attachment issues) was to create beans for all of my attachments
using Castor. Which is great and has some really cool mapping features.

So... as I was doing this I really started to like it, and I realized that I
was able to use the beans throughout my entire application (separate from
axis). And it kind of makes sense for these business objects to be
completely separated from axis.

You can have these included in the wsdl , but I like to have all of the
xsd's completely separate from the service stuff. I haven't played around
with the new castor deserializers/serializers but it sounds like a good Idea
as long as separation is maintained. I don't know if I am doing everything
the "best way" but it is really working great for me.

So.. in short , check out castor, it has some great features and validation
http://castor.exolab.org/

-- George Jagodzinski

-----Original Message-----
From: Roger May [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:14 AM
To: [EMAIL PROTECTED]
Subject: style=document and XML schema...



Hopefully someone on this list can help me solve a problem I'm having
with Axis 1.1

I have created a simple web service using style=document and have
generated a WSDL file, serialize/deserialized etc. I can call it from C#
and also from Java (stubs from WSDL2Java)... so the basic stuff is
working great.

I would like to be able to validate the fields as the document arrives
rather than having to write code in my java classes.. It seems like I
should be able to provide an XSD to Axis and have it check against that
before calling my class (on the server side). I can't however see how to
do this.. maybe I'm just missing something..

I have seen people talking about putting this into the WSDL, but that
seems like the wrong place to me in terms of validating. As more detail
in describing the service fine, but putting it in the WSDL seems to
leave it up to the stubs to check it which is bad. I tried this and
WSDL2Java appears to generate stubs that do the checking (on the
client), but .NET doesn't so no checking is done when calling from C#...
not good.

Is there a way to have Axis on the server check the body in a
Document/Literal type web service against an XML schema (xsd) ?
Hopefully someone can point me in the right direction.

Thanks

Roger

--
Roger May - eIT - Engineering
Email: [EMAIL PROTECTED]

You can't manufacture a miracle

Reply via email to