As you said in a subsequent response, Axis provides rudimentary support for
automatic marshalling of document-style messages (simple beans). This
support is less than what you can find in some of the other Java SOAP
implementations. See, for example, WASP's serialization framework:
http://www.systinet.com/doc/wasp_jserver/messageProcessing/serializationFram
ework.html. WASP provides equivalent serialization capabilities in RPC and
Document styles. And WASP's java2wsdl tool generates document-style by
default.

Microsoft started the "document style by default" trend. Both MS SOAP
Toolkit and .NET Framework generate document-style by default. Most of the
other SOAP vendors followed suit. WS-I has just published its Basic Profile
draft, which only supports document-style. Pretty much every SOAP vendor is
involved with WS-I, so it won't be long before all SOAP implementations
generate document style by default.

I agree with you that it isn't always trivial to map an existing schema to
existing Java objects. When I said "no problem building automatic
serializers", I was referring to a situation where you have the ability to
generate one from the other.

RE: multi-refs.
You can certainly design a schema that includes type=idref or keyref. That's
how soap encoding works (although soap encoding doesn't necessarily conform
to a schema, which is why it so hard to validate.)

Anne


> -----Original Message-----
> From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 4:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Document style web services
>
>
> Hi Anne,
>
> Does Axis support automatic marshalling of document-style messages? I
> was under the impression it does not, which was why I suggested a
> DataBindingProvider might be useful to add this support. I agree that
> document-style is a better approach for the future, though I'd hardly
> call it a "predominant consensus" at this point. AFAIK document style
> interfaces are not as widely supported as RPC style, though, and I'm
> surprised to see your statement that most SOAP implementations support
> automatic marshalling for document style. Can you give me any figures
> for this?
>
> As for "no problem building automatic serializers" I have to disagree. A
> Schema definition does not, in general, provide enough information to
> directly map to Java data structures. If you use an approach where the
> data structures are either pre-generated from the Schema or constrained
> to obey a predefined mapping to and from the Schema you can get around
> this, but that's hardly automatic.
>
> I'm also puzzled by your statement that it's difficult handle
> multi-referencing object structures using document style. Is there a
> reason this can't be handled with ID/IDREF or key/keyref links?
>
> Thanks,
>
>   - Dennis
>
> Dennis M. Sosnoski
> Enterprise Java, XML, and Web Services Support
> http://www.sosnoski.com
>
> Anne Thomas Manes wrote:
>
> >Dennis,
> >
> >This is a pretty antiquated view of document style. Document style is no
> >longer used just for XML messaging. Most SOAP implementations support
> >automatic marshalling of both RPC-style and document-style
> messages. As long
> >as you have a WSDL description of the message structure, there's
> no problem
> >building automatic serializers.
> >
> >The predominant consensus in the industry at this point is to use
> >document-style by default. Document style is much easier to validate,
> >transform, and manipulate. The primary reason to consider using
> rpc/encoded
> >is if you need to send multi-referencing object structures. SOAP encoding
> >does a really nice job marshalling these structures. It's much harded to
> >represent them using literal XML Schema. But if you're not using
> multi-refs,
> >it's a better practice to use document-style.
> >
> >Regards,
> >Anne
> >
> >
> >
> >>-----Original Message-----
> >>From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]]
> >>Sent: Thursday, November 21, 2002 1:25 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Document style web services
> >>
> >>
> >>Hi Matt,
> >>
> >>The whole point of document style is that your application gets passed
> >>the XML message payload as XML document fragments. See the "message"
> >>sample for an example of this. With a document style interface your
> >>class would look like:
> >>
> >>public class SomeXMLService {
> >>    public Element[] someXMLMethod(Element[] elems) {
> >>        ...
> >>    }
> >>}
> >>
> >>If you want to convert the XML into objects you need to do it yourself,
> >>perhaps using a framework such as Castor (http://www.castor.org). I know
> >>there's been some integration of Castor with Axis, though I think this
> >>was for custom serialization with RPC style.
> >>
> >>This brings up an interesting point, though. Why not have a Java
> >>DataBindingProvider as a replacement for the MsgProvider? This should
> >>allow easy use of document style while converting seamlessly between XML
> >>and objects without the application needing any special code. I'm
> >>looking into some data binding code currently, perhaps I'll see if I can
> >>work in this direction.
> >>
> >>  - Dennis
> >>
> >>Dennis M. Sosnoski
> >>Enterprise Java, XML, and Web Services Support
> >>http://www.sosnoski.com
> >>
> >>
> >
> >
>

Reply via email to