XSD2Java change destination package name
Hi all I am trying to generate java classes from xsd file using xsd2java and I can't figure out how to change the location/package of the generated classes. The problem is that I need the generated classes to be stored into package which has different name than specified in targetnamespace of xsd file. I have read that the xsd2java class accepts only two parameters (in and out file) but perhaps some of you have found the workaround ? any help would be appreciated -- View this message in context: http://www.nabble.com/XSD2Java-change-destination-package-name-tf4371310.html#a12459207 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSD2Java
AFAIK there is no way to tell ADB (or any other binding component) that someone's done this. I've seen this before and I had to do it manually. Paul On 6/5/07, Rich Adili <[EMAIL PROTECTED]> wrote: That's clever thinking Paul! It appears to solve my problem in most cases. Just to make life interesting I've been saddled with a few oddball schemas similar to the one below. The designer has embedded an XML document within another as text content. I can work out how to manually unmarshal this thing but I'm wondering if I can extend your suggestion so Axis will do this for me. Anyone know of a way to inform the code generator of this nesting? 1234 <SideOrders Fries="1"/> Rich -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Saturday, June 02, 2007 2:00 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich One of the aspects of WSDL is "duck-typing". http://en.wikipedia.org/wiki/Duck_typing The result of this is that you can have two different WSDLs. The official WSDL and a "pseudo" WSDL. So one approach would be to take the official WSDL, edit it to include the XSDs and then generate a client from it. You end up with a client that has databinding, but still talks to the real service. Paul On 6/1/07, Rich Adili <[EMAIL PROTECTED]> wrote: > Yep, tons of them. Since writing this I've done some puttering about > with various bindings and not found a good solution. The code generated > by XSD2Java doesn't like my XML. The XML conforms to the schema but does > not reference the schema so the generated code doesn't recognize the > namespace of any of its tags. > > -Original Message- > From: Paul Fremantle [mailto:[EMAIL PROTECTED] > Sent: Friday, June 01, 2007 7:49 AM > To: axis-user@ws.apache.org > Subject: Re: XSD2Java > > Rich > > Do you have schema somewhere (i.e. just not in the WSDL)? > > Paul > > On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: > > Hi, > > > > My services exchange a number of XML documents that aren't code > > generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java > my > > best choice for generating Java bindings for these documents? Any > > documentation or examples lying around? > > > > Thanks, > > Rich > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Paul Fremantle > Co-Founder and VP of Technical Sales, WSO2 > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSD2Java
That's clever thinking Paul! It appears to solve my problem in most cases. Just to make life interesting I've been saddled with a few oddball schemas similar to the one below. The designer has embedded an XML document within another as text content. I can work out how to manually unmarshal this thing but I'm wondering if I can extend your suggestion so Axis will do this for me. Anyone know of a way to inform the code generator of this nesting? 1234 <SideOrders Fries="1"/> Rich -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Saturday, June 02, 2007 2:00 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich One of the aspects of WSDL is "duck-typing". http://en.wikipedia.org/wiki/Duck_typing The result of this is that you can have two different WSDLs. The official WSDL and a "pseudo" WSDL. So one approach would be to take the official WSDL, edit it to include the XSDs and then generate a client from it. You end up with a client that has databinding, but still talks to the real service. Paul On 6/1/07, Rich Adili <[EMAIL PROTECTED]> wrote: > Yep, tons of them. Since writing this I've done some puttering about > with various bindings and not found a good solution. The code generated > by XSD2Java doesn't like my XML. The XML conforms to the schema but does > not reference the schema so the generated code doesn't recognize the > namespace of any of its tags. > > -Original Message- > From: Paul Fremantle [mailto:[EMAIL PROTECTED] > Sent: Friday, June 01, 2007 7:49 AM > To: axis-user@ws.apache.org > Subject: Re: XSD2Java > > Rich > > Do you have schema somewhere (i.e. just not in the WSDL)? > > Paul > > On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: > > Hi, > > > > My services exchange a number of XML documents that aren't code > > generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java > my > > best choice for generating Java bindings for these documents? Any > > documentation or examples lying around? > > > > Thanks, > > Rich > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Paul Fremantle > Co-Founder and VP of Technical Sales, WSO2 > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSD2Java
Rich One of the aspects of WSDL is "duck-typing". http://en.wikipedia.org/wiki/Duck_typing The result of this is that you can have two different WSDLs. The official WSDL and a "pseudo" WSDL. So one approach would be to take the official WSDL, edit it to include the XSDs and then generate a client from it. You end up with a client that has databinding, but still talks to the real service. Paul On 6/1/07, Rich Adili <[EMAIL PROTECTED]> wrote: Yep, tons of them. Since writing this I've done some puttering about with various bindings and not found a good solution. The code generated by XSD2Java doesn't like my XML. The XML conforms to the schema but does not reference the schema so the generated code doesn't recognize the namespace of any of its tags. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 7:49 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: > Hi, > > My services exchange a number of XML documents that aren't code > generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my > best choice for generating Java bindings for these documents? Any > documentation or examples lying around? > > Thanks, > Rich > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSD2Java
As Anne has told normally XSD2java is not in use. but if you want to experiment with ADB generated code you can use something as follows sh axis2.sh org.apache.axis2.schema.XSD2Java eg. sh axis2.sh org.apache.axis2.schema.XSD2Java /home/amila/sample1/sample1.xsd /home/amila/sample1/src/ Here you have to get the latest Axis1.2 distribution or a SNAPSHOT . Then unzip it and set the AXIS2_HOME envirionment variable correctly. then go to the bin directory where you can find axis2.sh file. this file can be used to excecute any main class within axis2 distribution since it set the class path correctly. On 6/1/07, Rich Adili <[EMAIL PROTECTED]> wrote: Yep, tons of them. Since writing this I've done some puttering about with various bindings and not found a good solution. The code generated by XSD2Java doesn't like my XML. The XML conforms to the schema but does not reference the schema so the generated code doesn't recognize the namespace of any of its tags. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 7:49 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: > Hi, > > My services exchange a number of XML documents that aren't code > generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my > best choice for generating Java bindings for these documents? Any > documentation or examples lying around? > > Thanks, > Rich > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
RE: XSD2Java
Yep, tons of them. Since writing this I've done some puttering about with various bindings and not found a good solution. The code generated by XSD2Java doesn't like my XML. The XML conforms to the schema but does not reference the schema so the generated code doesn't recognize the namespace of any of its tags. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 7:49 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: > Hi, > > My services exchange a number of XML documents that aren't code > generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my > best choice for generating Java bindings for these documents? Any > documentation or examples lying around? > > Thanks, > Rich > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSD2Java
Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili <[EMAIL PROTECTED]> wrote: Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSD2Java
XSD2Java won't do you any good if the schema doesn't define the document format. I recommend using WSDL2Java, and Axis2 will map the to an OMElement. You can then process the message using AXIOM. Anne On 5/30/07, Rich Adili <[EMAIL PROTECTED]> wrote: Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XSD2Java
Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]