Footnote: bare is in the eye of the beholder

As long as we're on the topic, I feel compelled to note that the distinction between doc/literal/wrapped and doc/literal/bare exists solely at the tool level. WSDL doesn't differentiate between them; services are just doc/literal. The ASMX code gen tools use a portType's operation's message's part's name attribute to decide what to do. If the value is “parameters”, the service is wrapped. In that case, the element in the message body maps to the operation and its contents map to parameters. If the value is anything else, e.g., “body”, the service is bare. In that case, the element(s) in the message body maps to parameter(s). (For WS-I Basic Profile compatibility, a bare service should only have one child element inside the body of a message.)


Posted Jun 30 2004, 12:12 PM by tim-ewald

Comments

David wrote re: Footnote: bare is in the eye of the beholder
on 07-02-2004 4:48 AM
For WS-I Basic Profile compatibility it should not only have only one child element, there is another requirement that you only have one operation with that signature! So you can't have two methods that take the same argument.

So, while I agree with you two guys that bare is much nicer, I think the general advice right now should be to NOT use it, if you want to interop with other stacks.

You can of course be WS-I BP compliant by using only one argument and only having one methods per class that has that message signature (i.e. only one method that takes that type as a parameter), but that by itself is quite a complicated guidline already, right? And then: While you can implement an Axis (that being the other main stack, right?) service that interops with that, it is a pain. Things might improve with Axis 1.2, which is in beta right now. But again, if you just want easy interop with what is running right now on the servers in this world, you can't really count on that.

On the other hand: If you don't use bare, you have a slightly less elegant solution but don't have to worry about any of these interop problems. Way better, right?

Obviously all this changes once you take WS-Addressing into account. But if you want interop right NOW, you are much better adviced to leave your fingers from that.

Maybe you should point out these points on your main blog? I remember implementing a couple of web services with bare without knowing all that, expecting that interop with Axis would be easy. I had to change everything back after trying things out and it was just incredible difficult to find good information on all this.
At Your Service wrote More on doc/literal/bare - David expresses his concern
on 07-02-2004 7:36 AM
Craig wrote re: Footnote: bare is in the eye of the beholder
on 07-19-2004 10:08 AM
Interesting - I wasn't aware of the BP constraint you mention. It does seem to counter-indicate the use of doc/literal/bare from an interop standpoint.

Tim?
Craig wrote re: Footnote: bare is in the eye of the beholder
on 07-19-2004 10:11 AM
Ah - I spoke too soon. Tim has already addressed this. That's what I get for being offline for a while. :p

Add a Comment

(required)  
(optional)
(required)  
Remember Me?