You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Steven McDowall <sj...@aptest.com> on 2000/07/26 17:47:10 UTC

RE: [SOAP] Usign your own schema

What Sanjiva says may be correct, but, I think this is a HUGE TODO ASAP for
apache SOAP..

If, given a nice and valid Schema.xsd .. either file, uri, or whatever,
there is no way to USE that schema to specify types for elements, then we
are in serious trouble for real compatibility, etc.

Having a response that MUST be in the following format
	<Field xsi:type="blah">Value</Field>

Is way out of spec.. In fact, 90% of the examples in the W3C Soap spec
USE schemas to define the types for elements..

So, the question I think still stands from someone..

Given a SCHEMA, (i.e. a xxx.xsd valid schema file) how does one USE it?
What are the steps needed?

If you need to create your own "mapper".. then HOW?

Are there different steps from a pure client versus server perspective?

The case I have is that I am receiving a response from a non-apache SOAP
implementation that uses a schema.. and of course am dying since it is not
putting out the xsi:type  attribute on the element because the specs say
that
one is NOT needed if given a schema which defines the types for the
elements..

-Steve


-----Original Message-----
From: SOAP [mailto:SOAP@DISCUSS.DEVELOP.COM]On Behalf Of Andrew Layman
Sent: Wednesday, July 26, 2000 9:49 AM
To: SOAP@DISCUSS.DEVELOP.COM
Subject: Re: [SOAP] Usign your own schema


What Sanjiva says is correct (of course!) and there is something additional
to consider, which is that whoever is running a web server may prefer to use
cached, known schemas than to blindly download and use whatever resource is
referenced by xsi:schemaLocation.

-----Original Message-----
From: Sanjiva Weerawarana [mailto:sanjiva@WATSON.IBM.COM]
Sent: Wednesday, July 26, 2000 7:36 AM
To: SOAP@DISCUSS.DEVELOP.COM
Subject: Re: [SOAP] Usign your own schema


> Let me rephrase:
>
> I want to have something like this:
>
> <SOAP-ENV:Envelope
>         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>         xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance/"
>         xmlns:xsd="http://www.w3.org/1999/XMLSchema/">
> <SOAP-ENV:Body>
> <m:getRecipe xmlns:m="http://cse-mfayad.unl.edu/xml-soap/RecipeFetcher"
>         SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>         xsi:schemaLocation="http://cse-mfayad2.unl.edu/~ochipara/Schema1
>         http://cse-mfayad2.unl.edu/~ochipara/Schema1.xsd">
>                 <Recipe>NachoDip</Recipe>
> </m:getRecipe>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> As you can see for getRecipe I have defined my own schema. This is what I
> want to achive! I want the parameters that I send (ex. Recipe) to be
> compliant with my defined schema! Does this work with this implementation
> of SOAP? I have tried with the apache-SOAP and it blows up!

The Apache SOAP code does not look for xsi:schemaLocation to find
schemas. The current model is that the runtime has been configured
with information for how to handle each schema type and that the
type is determined by looking at the value of the xsi:type attribute
on an element. Definitely there's room for improvement!

Sanjiva.

You can read messages from the SOAP archive, unsubscribe from SOAP, or
subscribe to other
DevelopMentor lists at http://discuss.develop.com.

You can read messages from the SOAP archive, unsubscribe from SOAP, or
subscribe to other
DevelopMentor lists at http://discuss.develop.com.