RE: how to create axis client from XML Schema?
> Hello Jay, > >It is common to wrap the operation parameters in a parent element ; > it is the wrapped/literal approach. But why do you want this wrapping > element to be generic with a meaning less name "Request". >Couldn't you give it a meaningfull name ? Your service consumers > and your QA & integration teams will thank you for this clarity ? It > is self-documented. Sorry for the minor miss-communication error here, Cyrille. I didn't write the XML Schema as I'm not the author of the service. I'm actually trying to write a client. Some other company wrote the service. Why did they decide on names like "Request", "Response" and "FaultDetails"? I wish I knew. Your suggestions on the separation of schema and operations certainly makes sense. Unfortunately for me, I can't really influence the situation that much, I just have to live with it. ;-( JDG
Re: how to create axis client from XML Schema?
Hello Jay, It is common to wrap the operation parameters in a parent element ; it is the wrapped/literal approach. But why do you want this wrapping element to be generic with a meaning less name "Request". Couldn't you give it a meaningfull name ? Your service consumers and your QA & integration teams will thank you for this clarity ? It is self-documented. When I say the XSD should contain the data structure, I mean I want to separate my widely shared "domain/enterprise objects" from specific "application operations" : - the "domain/enterprise objects" are described in widely spread XML Schemas (available on an intranet web site) - the "application operations" are described in a WSDL that refers the XSD (with an xsd:import) Moreover, to prevent versioning issues, I advise the XSD file to be immutable with the version number in its file name. Like this, management of data structure versions will be self-documented. If the structure changes, a new file is published with a new version (ie a new file name). Here is a sample of the WSDL : http://xsd.mycompany.com/humanresources-1.1.xsd"; /> ... ... Note that it is possible to split more the wsdl. You could separate the operation description ( and elements) from the entry point (url) description ( element). however, I never saw a case where it was useful. It think it is most of the time counter productive. Anyone to debate on this ? Cyrille -- Cyrille Le Clerc [EMAIL PROTECTED] [EMAIL PROTECTED] On 1/9/06, Jay Glanville <[EMAIL PROTECTED]> wrote: > 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 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: > > > ... > ... > ... > > > > The schema for this service also contained types called "Response" and > "Fault" types, again with a 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: axis-user@ws.apache.org > > 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 > > ( and elements of the WSDL) > > - the URL on which your service is available ( 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 > > > > > >
RE: how to create axis client from XML Schema?
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 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: ... ... ... The schema for this service also contained types called "Response" and "Fault" types, again with a 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: axis-user@ws.apache.org > 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 > ( and elements of the WSDL) > - the URL on which your service is available ( 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: axis-user@ws.apache.org > > > 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/ > > > > > >
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 ( and elements of the WSDL) - the URL on which your service is available ( 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: axis-user@ws.apache.org > > 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/ > > >
RE: how to create axis client from XML Schema?
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: axis-user@ws.apache.org > 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/ >
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/