?
Solved

Java to XSD conversion

Posted on 2006-04-23
8
Medium Priority
?
6,207 Views
Last Modified: 2008-01-09
I need to convert a class to a XSD. Is there any tool which does this?

For example my class looks something like this.
package com.test;

import com.test.TestInput;
import com.test.TestOutput;

public class TestClass{

public TestOutput testClass(TestInput testInput){
return null;
}
}

TestInput
has setter/getters methods name/address

TestOutput
Has setters/getters methods for String results

When i convert to xsd it should create class details for TestClass, TestInput and TestOutput.

0
Comment
Question by:srivenky
7 Comments
 
LVL 14

Expert Comment

by:hoomanv
ID: 16518222
Look at JAXB, which has a tool called schemagen that might do what you need.
https://jaxb.dev.java.net/nonav/jaxb20-ea/docs/schemagen.html
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 16518383
There are two good ways one is  Apache XMLBeans, other being JAXB.

http://www.onjava.com/pub/a/onjava/2004/07/28/XMLBeans.html

http://roseindia.net/jaxb/r/jaxb.shtml
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16518884
You can download XMLBeans from here:

http://xmlbeans.apache.org/
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Author Comment

by:srivenky
ID: 16532109
shivaspk:
          I couldn't find any tool that converts Java class to xsd in XMLBeans. I also tried installing jaxb. The schemagen doesn't work for me..It throws Java Invocatation Target Exception.

0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16532403
Did you try XMLBeans?
0
 
LVL 3

Author Comment

by:srivenky
ID: 16543087
Yes, i tried XMLBeans too. I couldn't find any specific tool for converting a class to XSD in that. Finally i had to use WSAD and manually create schema for each of the classes.
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16778462
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn different types of Android Layout and some basics of an Android App.
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question