Definitive version of the VOTable schema for web services
Matthew Graham
mjg at cacr.caltech.edu
Tue Jul 29 21:01:54 PDT 2008
Hi,
If you specify in the WSDL that your service returns a string then
that string can just as easily be "Hello World" as the string
representation of a VOTable. The serialization is really trivial. Of
course, you have to code your client and service to translate that
string back into VOTable class code to do the business logic.
If you specify in the WSDL that your service returns a piece of XML
then the story is pretty much the same except that the serialization
code will probably throw an error if you send something that is not
XML up or down the wire.
If you specify in the WSDL that your service returns VOTable then you
have define what VOTable is in terms of schema so that the service can
build the appropriate serialization code to convert the service-side
object into a form that can go over the wire. Unfortunately most of
the toolkits which are supposed to make this easy for you were not
designed for complex (recursive) data structures such as VOTable.
So the moral of the story is don't use the toolkits if you can
possibly avoid it - they really complicate things. Actually just
building the SOAP requests and response by hand is a lot faster and
simpler than using the toolkits and allows to just send VOTable as XML
instead of putting it through a code binding. Of course, you have to
be able to read and understand WSDL.
Cheers,
Matthew
On Jul 29, 2008, at 8:47 PM, Doug Tody wrote:
> Hi -
>
> This discussion may be academic as we may not want to modify "legacy"
> code such as SkyNode etc., but it may still be worthwhile to help
> determine why we have this problem and how to avoid it if we mix
> VOTable and WSDL in the future.
>
> The easiest way for a client app to deal with something as complex as
> a VOTable is using VOTable class code. The VOTable is passed through
> the interface as a string or file, and accessed via the class code.
> There is no need to bind it in a SOAP interface, except possibly to
> a string parameter.
>
> Of course a beginner (or wizard) might want to just use a tool such
> as wsdl2java. So the real question is, are WSDL and SOAP capable of
> passing through a large complex string containing an encoded object?
> In other words, is the problem with the SkyNode etc. interface and
> WSDL, with the VOTable schema, or both?
>
> This stuff really is broken if it tries to parse and validate very
> complex schemas for external objects - that is a matter for the object
> class code, not the interface, to deal with.
>
> We still might want to simplify the VOTable schema, but the reason to
> do that would be to simplify the schema and avoid unnecessary
> problems,
> not to fix broken SOAP code. It would be good to understand better
> how these two issues sort out.
>
> - Doug
>
>
> On Tue, 29 Jul 2008, Matthew Graham wrote:
>
>> Hi,
>>
>> I agree entirely with you, Doug. There, however, a number of
>> services such as
>> OpenSkyQuery, SkyNodes, CasJobs, WESIX, etc. which give VOTable in
>> response.
>> The easiest way to use these for complete beginners is to use
>> wsdl2java or
>> wsdl2py and then just employ the client stubs. It takes a certain
>> amount of
>> experience and knowledge to bypass these tools and deal with
>> VOTable directly
>> in client calls with SOAP.
>>
>> Cheers,
>>
>> Matthew
>>
>>
>> On Jul 29, 2008, at 7:51 PM, Doug Tody wrote:
>>
>>> Hi -
>>>
>>> I sympathize with the folks who don't much care about automatically
>>> code-binding a VOTable, as this makes little sense for such a
>>> complex
>>> object, however we have little need for a recursive constructs in
>>> a table mechanism. Simplifying the schema would have little effect
>>> on any existing, heavily used code but could simplify these SOAP use
>>> cases so might be worthwhile in any case. On the other hand, why
>>> are
>>> we referencing something as large and complex as the VOTable schema
>>> at all in a SOAP call? (the same question would apply to something
>>> like STC). There ought to be a way to pass-through the VOTable as a
>>> string without need to reference the schema. The schema should
>>> only be
>>> used for simple function arguments can be bound to language
>>> datatypes.
>>>
>>> - Doug
>>>
>>>
>>> On Tue, 29 Jul 2008, Matthew Graham wrote:
>>>
>>>> Hi,
>>>>
>>>> I really think that this has to come from the VOTable WG, even if
>>>> it is
>>>> now
>>>> officially dormant. We have complained about this enough for long
>>>> enough
>>>> that
>>>> it is shocking that we do not have a solution. Hopefully, one of
>>>> the other
>>>> national projects is sitting on a version of VOTable that
>>>> actually works
>>>> with
>>>> all the code binders so it's minimal effort.
>>>>
>>>> Cheers,
>>>>
>>>> Matthew
>>>>
>>>> On Jul 29, 2008, at 6:44 PM, Roy Williams wrote:
>>>>
>>>>> If only there were some really smart person who understands XML
>>>>> schema
>>>>> and
>>>>> WSDL and all that -- who would be kind enough to volunteer to
>>>>> help the
>>>>> IVOA
>>>>> by proposing a universal VOTable schema.
>>>>> Roy
>>>>>
>>>>>
>>>>> Matthew Graham wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Yes, I know it has and it's normally this time of year that I
>>>>>> make the
>>>>>> same request. It would be nice if we could actually sort this
>>>>>> out once
>>>>>> and
>>>>>> for all.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Matthew
>>>>>>
>>>>>> On Jul 29, 2008, at 6:02 PM, Alberto Conti wrote:
>>>>>>
>>>>>>> I hope you will have more success that I had pointing this out.
>>>>>>> It has been this way since a long long time ago....
>>>>>>> -A
>>>>>>>
>>>>>>> On Jul 29, 2008, at 8:18 PM, Matthew Graham wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> The VOTable schema that exists on the IVOA web site cannot
>>>>>>>> just be
>>>>>>>> imported into a WSDL document. There are several web services,
>>>>>>>> e.g.
>>>>>>>> Open SkyQuery, SkyNode, WESIX, which have produced their own
>>>>>>>> version
>>>>>>>> of the schema to work with WSDL - essentially all the
>>>>>>>> complexTypes
>>>>>>>> need to be named and globally defined instead of being
>>>>>>>> anonymous
>>>>>>>> under
>>>>>>>> the elements. I was wondering whether the VOTable group could
>>>>>>>> produce
>>>>>>>> a sanctioned version of the VOTable 1.1 schema that will work
>>>>>>>> with
>>>>>>>> WSDL?
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> Matthew
>>>>>>>
>>>>>>> Dr Alberto Conti
>>>>>>> Community Missions Office
>>>>>>> Space Telescope Science Institute
>>>>>>> contact | tel: 410-338-4534 | aim: wscience
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> California Institute of Technology
>>>>> 626 395 3670
>>>>>
>>>>
>>>
>>
>
More information about the grid
mailing list