Hello Cyrille
Your statement about the XML Schema just containing the data structure
and the WSDL adding the operations (and ports and URLS and and and ),
just hit home to me.
You see, this XML Schema document that I'm coding against actually
contains the data types, plus a type called "Request". Inside that
request type is an <xs:choice> block which contains all the possible
pseudo-operations that I can ask of the server. For example, if I want
to add a new Bean, I need to make my HTTP request carry something like
this:
<SOAP-ENV:Envelope ....
<SOAP-ENV:Body>
<NS:Request ...
<NS:addBean>
<NS:bean_prop_1>...
<NS:bean_prop_2>...
<NS:bean_prop_3>...
</NS:addBean>
</NS:Request
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The schema for this service also contained types called "Response" and
"Fault" types, again with a <xs:sequence> in them for the possible
returns that could come back. Now, even me in my Newbie state thought
this smelt funny, but wasn't able to defend my opinions.
So, let me clarify: when you state that the XML Schema should contain
the data structure, it shouldn't contain anything about the operations
or commands that can be requested/executed on the server, correct?
I.e.: that the schema should only contain the structure of the data
that's being passed back and forth, and not the requests that can be
made of the server. Is this correct?
Thanks for being patient with such generic questions.
JDG
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cyrille Le Clerc
> Sent: Monday, January 09, 2006 11:07 AM
> To: [email protected]
> Subject: Re: how to create axis client from XML Schema?
>
> Hello Jay,
>
> The XML Schema (XSD) is just a subset of a WSDL. The XSD only
> describes the structure of the data.
> Then you have to describe :
> - the operations (name and parameters) of your service
> (<wsdl:portType> and <wsdl:binding> elements of the WSDL)
> - the URL on which your service is available (<wsdl:service> element
> of the WSDL)
>
> More over, it is a good practice to separate the data structure (ie
> the XML Schema) from the WSDL importing an XSD into the WSDL.
>
> Thanks to this, instead of the XSL you were talking about, you would
> have a lightweight WSDL that would import a complex XSD.
>
> Hope this helps,
>
> Cyrille
>
> --
> Cyrille Le Clerc
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> On 1/9/06, Jay Glanville <[EMAIL PROTECTED]> wrote:
> > Davanum,
> >
> > Thanks for the suggestions.
> >
> > Concerning the suggestion of writing my own WSDL document,
> I'd prefer it
> > if I could codify the creation of the WSDL. That way I
> could incorporate
> > it into my build script. Does anyone know of an XSLT (or other
> > translator) that would convert an XML Schema to a WSDL?
> >
> > JDG
> >
> > > -----Original Message-----
> > > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, January 06, 2006 2:54 PM
> > > To: [email protected]
> > > Subject: Re: how to create axis client from XML Schema?
> > >
> > > Jay,
> > >
> > > you can try Apache Xmlbeans
> (http://xmlbeans.apache.org/). Axis2 also
> > > has a XSD2Java.
> > >
> > > My recommendation is for you to write a local wsdl that
> best fits the
> > > service (never mind that they don't publish one :) and then do the
> > > code generation using WSDL2Java.
> > >
> > > thanks,
> > > dims
> > >
> > > On 1/6/06, Jay Glanville
> <[EMAIL PROTECTED]> wrote:
> > > > Hello all
> > > >
> > > > Please excuse the potentially really stupid question I'm
> > > about to ask
> > > > (blame it on too much eggnog over the holidays).
> > > >
> > > > Is there a way that I can create an Axis client for a
> > > service that only
> > > > has an XML Schema (it doesn't publicize a WSDL)?
> > > >
> > > > We're currently using SAAJ to construct our requests to
> this server,
> > > > along with the parsing of the responses. Thus, we've
> > > started to write
> > > > wrapper code to make an interface to this service.
> However, I would
> > > > like to avoid this if I could find a tool like WSDL2Java.
> > > >
> > > > So, is there any way that I can get Axis to implement
> my client? If
> > > > not, is there a recommendation for a tool that's analogous
> > > to WSDL2java
> > > > (creation of beans, dealing with communication, etc) but for XML
> > > > Schemas?
> > > >
> > > > Thanks
> > > >
> > > > JDG
> > > >
> > > > ---
> > > > Jay Dickon Glanville
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas : http://wso2.com/blogs/
> > >
> >
>