JAXB vs. Castor or Zeus

Hi,
How does JAXB compare to things like Castor or Zeus?
Specifically, does Castor/Zeus support DTD's or do they only work with XML schemas.
Also, do Casor/Zeus support all the features JAXB supports (or is supposed to support)?
I read through a little tutorial about using Castor and it seemed to be a little more complex than JAXB. Is this true? With JAXB, all you have to write is your DTD and binding schema, run it through the xjc compiler and you have your XML classes. Castor seemed to require more more steps to get the XML java classes. Unless I just misread the Castor stuff.
Any info would be very appreciated.
Thanks,
Nate

It depends on your needs. The current implementation of Castor is able to marshall/unmarshall XML to java without the need for any mapping definition. This only works if the elements in the document meet certain criteria when compared to your bean.
You can also introduce a mapping file to explicitly define how XML gets translated into your bean.
One major advantage of Castor over JAXB is that Castor does not need to build any intermediate java classes. It can create an instance of your bean and unmarshall the XML data into it directly. Likewise, it can marshall a bean directly. Castor also provides a JDO approach that uses XML to persist object data.
The disadvantages of Castor are that it has a questionable future and it does not currently marshall/unmarshall EJBs (as far as I can tell).

Similar Messages

  • XmlBeans vs JAXB vs Castor

    Hi guys,
    I just briefly read BEA's XMLBeans overview and it seems very similar (if not
    identical) to Sun's JAXB specification. Are they one and the same?
    Also, I am currently using the open source software from Castor (www.castor.org)
    for xml-java & java-xml translations. It seems to be a lot simpler and flexible
    than XMLBeans...
    If anyone else has used bot Castor & XMLBeans(or JAXB), i would appreciate your
    comments...
    thanks,
    sudu

    Follow these 2 threads:
    If the link is wraped to the next line, copy and paste in your browser.
    1.
    http://newsgroups.bea.com/cgi-bin/dnewsweb?utag=&group=weblogic.developer.in
    terest.xmlbeans&xrelated=34&cmd_thread_next.x=44&cmd_thread_next.y=12
    2.
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.develo
    per.interest.xmlbeans&item=17&utag=
    /k
    "sudu" <[email protected]> wrote in message news:3e958c7d$[email protected]..
    >
    Hi guys,
    I just briefly read BEA's XMLBeans overview and it seems very similar (ifnot
    identical) to Sun's JAXB specification. Are they one and the same?
    Also, I am currently using the open source software from Castor(www.castor.org)
    for xml-java & java-xml translations. It seems to be a lot simpler andflexible
    than XMLBeans...
    If anyone else has used bot Castor & XMLBeans(or JAXB), i would appreciateyour
    comments...
    thanks,
    sudu

  • JAXB vs Castor

    Hi ,
    can anyone please suggest which is better to use Castor or JAXB.

    I was using Castor, but as JAXB is a standard (and a number of groups are working on implmentations) I switched when JAXB became available.
    Castor is in fact faster and lighter (smaller classes) than Sun's JAXB implementation (you can also do a lot of other things with Castor), I might swap again when alternatives to Sun's JAXB become available.
    HH

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • Need help in displaying XML in JSP

    Hi there,
    i'm a newbi in XML and Java - I have the following prob, think for most of u nothing very difficult (or better thought so, I've posted this question in different forums here, but nobody answers :)
    I get an XML response from a search engine, now I want to display the search result in a jsp.
    The result is stored in the session [I hope I figured out correctly ;)]
    with the following command ->
    this.pageContext.getSession().setAttribute(SEARCHRESULT, dSearchResult);
    [its from the java class, which generates the result]
    Result example ->
    <?xml version="1.0" encoding="UTF-8"?>
    <FindSearchResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xml/SearchResult.xsd">
    <Result Hits="2" Name="OfficeLand_en_US">
    <Items>
    <Item Score="250">
    <Field FieldNo="0" Name="ProductID">KqvAqAB1Tq0AAADnFthtpZvC</Field>
    <Field FieldNo="1" Name="CatalogCategoryID">gh0KAAFvj3wAAADiW8SMtr6o</Field>
    </Item>
    <Item Score="250">
    <Field FieldNo="0" Name="ProductID">4rwKAAFvtNYAAADiwdCMtr6o</Field>
    <Field FieldNo="1" Name="CatalogCategoryID">gh0KAAFvj3wAAADiW8SMtr6o</Field>
    </Item>
    </Items>
    <HitDistribution>
    <Hit Hits="75" Score="0"/>
    <Hit Hits="2" Score="250"/>
    </HitDistribution>
    </Result>
    </FindSearchResult>
    How many 'Field' elements exist, depends on the query.
    The result example is a response, which is send to my JSP page. It is stored in an variable under the name SEARCHRESULT (it's the result of a query in a search engine).
    My JSP page is the page, which should display the searchresult.
    So i need to know, how to programm something in my JSP page to check the SEARCHRESULT to display not the whole xml file. I just want to display all Items (compare with result example) -> The name of each existing FieldNo, the Score and the HitDistribution.
    Please help me :)

    hi there,
    first create a xml schema for the xml you will be receiving.
    use jaxb or castor with the schema and create a class.
    in your jsp unmarshal the xml result you are getting with the class
    generated by either jaxb or castor. the class will have methods that return you the required elements.
    get to know xml schema better and just a pass thru of jaxb or castor will solve the problem.
    vedha_g

  • Automatic Generation of classes with required attribute names

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

  • Strange Error in Validating with JAXP1.2

    Hello,
    I have 3 big xsd files. The problem is that I cann't validate an xml sample using JAXP1.2. Also I tryed with JAXB and Castor but seems to be the same problem.
    I made an simple example in 3 files that generate the error:
    1.xsd - this is the main file
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.example.com/response" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fmcg="http://www.example.com/fmcg" xmlns:core="http://www.example.com/core" xmlns="http://www.example.com/response" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xsd:import namespace="http://www.example.com/fmcg" schemaLocation="2.xsd"/>
         <xsd:element name="response" type="ResponseType"/>
         <xsd:complexType name="ResponseType">
              <xsd:sequence>
                   <xsd:element name="senderName" type="xsd:string"/>
                   <xsd:element ref="fmcg:item" minOccurs="0" maxOccurs="unbounded"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>2.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.example.com/fmcg" xmlns:core="http://www.example.com/core" xmlns="http://www.example.com/fmcg" xmlns:fmcg="http://www.example.com/fmcg" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xsd:import namespace="http://www.example.com/core" schemaLocation="3.xsd"/>
         <xsd:element name="item" type="ItemType"/>
         <xsd:complexType name="ItemType">
              <xsd:complexContent>
                   <xsd:extension base="core:ItemType">
                        <xsd:sequence>
                             <xsd:element name="itemName" type="xsd:string"/>
                        </xsd:sequence>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
    </xsd:schema>3.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.example.com/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.com/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
         <xsd:complexType name="ItemType" abstract="true">
              <xsd:sequence>
                   <xsd:element name="additionalItemName" type="xsd:string" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>And this is a sample xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.example.com/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.com/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
         <xsd:complexType name="ItemType" abstract="true">
              <xsd:sequence>
                   <xsd:element name="additionalItemName" type="xsd:string" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>This files was all validated by XML Spy 5.0.
    When I run this piece of code(an ordinary code for validating):
          File input = new File("test.xml"),schema = new File("1.xsd");
          DocumentBuilderFactory factory =
                DocumentBuilderFactory.newInstance();     
          factory.setNamespaceAware(true);
          factory.setValidating(true);     
          factory.setAttribute(SCHEMA_LANGUAGE,XML_SCHEMA);
          factory.setAttribute(SCHEMA_SOURCE,schema);
          DocumentBuilder parser = factory.newDocumentBuilder();
          parser.setErrorHandler(new ErrorPrinter() );     
          parser.parse(input);I got this ERROR:
    (file:test.xml: 7, 28): cvc-complex-type.2.4.a: Invalid content starting with element 'core:additionalItemName'. One of '{"":additionalItemName, "http://www.example.com/fmcg":itemName}' is expected.
    It seems that the parser expects 'additionalItemName' instead of 'core:additionalItemName'.
    Why ? I think the namespace is OK.
    (Also I tryed with Castor and JAXB and seems to have the same error).
    Regards,
    Catalin

    Jeni Tennison ( http://www.jenitennison.com/ ) solved my problem:
    The <additionalItemName> element is declared with a local declaration
    in 3.xsd. When you declare an element locally, the namespace for the
    element is either the target namespace for the schema or no namespace;
    it depends on the "form" for the element declaration. Since you have
    no form attribute on the <xs:element> element declaration, the "form"
    comes from the elementFormDefault attribute on the <xs:schema>
    element. In this case, it's 'unqualified', which means that the
    <additionalItemName> element is in no namespace.
    If you want the <additionalItemName> element to be in the core
    namespace (the target namespace for 3.xsd), then you should set the
    elementFormDefault attribute on the <xs:schema> element to
    'qualified' or add a 'form' attribute to the <xs:element> element with
    the value 'qualified'.
    Thank you Jeni.

  • How to parse XML to Java object... please help really stuck

    Thank you for reading this email...
    If I have a **DTD** like:
    <!ELEMENT person (name, age)>
    <!ATTLIST person
         id ID #REQUIRED
    >
    <!ELEMENT name ((family, given) | (given, family))>
    <!ELEMENT age (#PCDATA)>
    <!ELEMENT family (#PCDATA)>
    <!ELEMENT given (#PCDATA)>
    the **XML** like:
    <person id="a1">
    <name>
         <family> Yoshi </family>
         <given> Samurai </given>
    </name>
    <age> 21 </age>
    </person>
    **** Could you help me to write a simple parser to parse my DTD and XML to Java object, and how can I use those objects... sorry if the problem is too basic, I am a beginner and very stuck... I am very confuse with SAXParserFactory, SAXParser, ParserAdapter and DOM has its own Factory and Parser, so confuse...
    Thank you for your help, Yo

    Hi, Yo,
    Thank you very much for your help. And I Wish you are there...I'm. And I plan to stay - It's sunny and warm here in Honolulu and the waves are up :)
    A bit more question for dear people:
    In the notes, it's mainly focus on JAXB,
    1. Is that mean JAXB is most popular parser for
    parsing XML into Java object? With me, definitely. There are essentially 3 technologies that allow you to parse XML documents:
    1) "Callbacks" (e.g. SAX in JAXP): You write a class that overrides 3 methods that will be called i) whenever the parser encounters a start tag, ii) an end tag, or iii) PCDATA. Drawback: You have to figure out where the heck in the document hierarchy you are when such a callback happens, because the same method is called on EACH start tag and similarly for the end tag and the PCDATA. You have to create the objects and put them into your own data structure - it's very tedious, but you have complete control. (Well, more or less.)
    2) "Tree" (e.g. DOM in JAXP, or it's better cousin JDOM): You call a parser that in one swoop creates an entire hierarchy that corresponds to the XML document. You don't get called on each tag as with SAX, you just get the root of the resulting tree. Drawback: All the nodes in the tree have the same type! You probably want to know which tags are in the document, don't you? Well, you'll have to traverse the tree and ask each node: What tag do you represent? And what are your attributes? (You get only strings in response even though your attributes often represent numbers.) Unless you want to display the tree - that's a nice application, you can do it as a tree model for JTree -, or otherwise don't care about the individual tags, DOM is not of much help, because you have to keep track where in the tree you are while you traverse it.
    3) Enter JAXB (or Castor, or ...): You give it a grammar of the XML documents you want to parse, or "unmarshall" as the fashion dictates to call it. (Actually the name isn't that bad, because "parsing" focuses on the input text while "unmarshalling" focuses on the objects you get, even though I'd reason that it should be marshalling that converts into objects and unmarshalling that converts objects to something else, and not vice versa but that's just my opinion.) The JAXB compiler creates a bunch of source files each with one (or now more) class(es) (and now interfaces) that correspond to the elements/tags of your grammar. (Now "compiler" is a true jevel of a misnomer, try to explain to students that after they run the "compiler", they still need to compile the sources the "compiler" generated with the real Java compiler!). Ok, you've got these sources compiled. Now you call one single method, unmarshall() and as a result you get the root node of the hierarchy that corresponds to the XML document. Sounds like DOM, but it's much better - the objects in the resulting tree don't have all the same type, but their type depends on the tag they represent. E.g if there is the tag <ball-game> then there will be an object of type myPackage.BallGame in your data structure. It gets better, if there is <score> inside <ball-game> and you have an object ballGame (of type BallGame) that you can simply call ballGame.getScore() and you get an object of type myPackage.Score. In other words, the child tags become properties of the parent object. Even better, the attributes become properties, too, so as far as your program is concerned there is no difference whether the property value was originally a tag or an attribute. On top of that, you can tell in your schema that the property has an int value - or another primitive type (that's like that in 1.0, in the early release you'll have to do it in the additional xjs file). So this is a very natural way to explore the data structure of the XML document. Of course there are drawbacks, but they are minor: daunting complexity and, as a consequence, very steep learning curve, documentation that leaves much to reader's phantasy - read trial and error - (the user's guide is too simplicistic and the examples too primitive, e.g. they don't even tell you how to make a schema where a tag has only attributes) and reference manual that has ~200 pages full of technicalities and you have to look with magnifying glas for the really usefull stuff, huge number of generated classes, some of which you may not need at all (and in 1.0 the number has doubled because each class has an accompanying interface), etc., etc. But overall, all that pales compared to the drastically improved efficiency of the programmer's efforts, i.e. your time. The time you'll spend learning the intricacies is well spent, you'll learn it once and then it will shorten your programming time all the time you use it. It's like C and Java, Java is order of magnitude more complex, but you'd probably never be sorry you gave up C.
    Of course the above essay leaves out lots and lots of detail, but I think that it touches the most important points.
    A word about JAXB 1.0 vs. Early Release (EA) version. If you have time, definitively learn 1.0, they are quite different and the main advantage is that the schema combines all the info that you had to formulate in the DTD and in the xjs file when using the EA version. I suggested EA was because you had a DTD already, but in retrospect, you better start from scratch with 1.0. The concepts in 1.0 are here to stay and once your surmounted the learning curve, you'll be glad that you don't have to switch concepts.
    When parser job is done,
    what kind of Java Object we will get? (String,
    InputStream or ...)See above, typically it's an object whose type is defined as a class (and interface in 1.0) within the sources that JABX generates. Or it can be a String or one of the primitive types - you tell the "compiler" in the schema (xjs file in EA) what you want!
    2. If we want to use JAXB, we have to contain a
    XJS-file? Something like:In EA, yes. In 1.0 no - it's all in the schema.
    I am very new to XML, is there any simpler way to get
    around them? It has already take me 4 days to find a
    simple parser which give it XML and DTD, then return
    to me Java objects ... I mean if that kind of parser
    exists....It'll take you probably magnitude longer that that to get really familiar with JAXB, but believe me it's worth it. You'll save countless days if not weeks once you'll start developing serious software with it. How long did it take you to learn Java and it's main APIs? You'll either invest the time learning how to use the software others have written, or you invest it writing it yourself. I'll take the former any time. But it's only my opinion...
    Jan

  • Converting XML to Excel.

    Hi Everybody,
    I have a requirement to have a prebuit XML templete in the database, when a person download it it will populate with some default values in a EXCEL file format.
    How can i acheive this.Please help.
    Thanks

    If I understand you correctly, you have data as XML document and you want to use that data to create a Excel spread sheet. If this is right. I would suggest use any XML binding technoloy such as XMLBeans or JAXB or Castor to parse that document into a Java object and then you can use Apache POI library to generate Excel document. I hope this would help.
    -- Deha Peker

  • Creating XML using JSP

    Hi I want to create a xml using JSP For eg I want to create a report
              and I want to take all the data required for the report from the user
              and want to put all the information in a session and whenever a user
              wants to see the html output I should be able to parse the xml file
              and show it to user.
              I know it is doable but I am confused about storing the data in
              session and concerting that data into XML file any help would be
              great.
              Thanks,
              Preeti
              

    Sounds like you might want to look at XML data binding. Something like JAXB
              or Castor can create an object that can be turned into XML by merely calling
              a single method and probably streamed to Xalan or whatever to create HTML.
              However, don't quote me on this - I am having enough troubles with trying to
              get the compiled Objects to be as I wish. Basically, they both take your
              DTD with an extra file that defines the types to be used in the classes -
              i.e. instead of string int might be used - and which tags to turn into
              classes and general information such as this about the output of your
              classes. You then simply call Unmarshal (for both castor and JAXB) and it
              loads the file from the selected input stream into the created object, you
              edit the object, what ever - store it on the server... and call Marshal to
              get back the xml... as this is all using streams it could be passed to Xalan
              for processing i think...
              Hope I've helped, and answered your question a little!
              "Preeti Sikri" <[email protected]> wrote in message
              news:[email protected]...
              > Hi I want to create a xml using JSP For eg I want to create a report
              > and I want to take all the data required for the report from the user
              > and want to put all the information in a session and whenever a user
              > wants to see the html output I should be able to parse the xml file
              > and show it to user.
              >
              > I know it is doable but I am confused about storing the data in
              > session and concerting that data into XML file any help would be
              > great.
              >
              > Thanks,
              > Preeti
              

  • Use of Codec class genereted by Autotyype for xml-jave binding?

    I have generated the java representation and codec classes using Autotype against xml schema. Just wondering can i use this codec class to do Java to xml binding like other tools (XMLBeans, JAXB and Castor) do. If answer is yes can you give me an example how can I use it.
    Thanks,
    Mujeeb

    manoj,
    Thanks for the help.
    Sample 4 tells me that there is no code generated that I can use to write out
    my non-built-in datatype to xml. For each of my non-built-in datatypes, I will
    have to hand write such code, or use a handler.
    John
    "manojc" <[email protected]> wrote:
    Here is an example of start form WSDL usecase:
    http://www.manojc.com/?sample11
    If you want to log the xml input/output to the web service
    you can use a handler. You need to edit the web-services.xml
    dd file to add handler.
    Here is a example of using handler. But this use source2wsdd
    instead of wsdl2service:
    http://www.manojc.com/?sample4
    Regards,
    -manoj
    "John Franey" <[email protected]> wrote in message
    news:3ef30db2$[email protected]..
    Hi,
    I created a wsdl and used the autotype and wsdl2service ant tasks togenerate
    java files.
    As part of my service, I want to log output in xml format of the datareceived.
    I can write my own serialization, or use the code that was generatedby
    autotype.
    I would rather not write my own. I want to use the code generated bywsdl2service.
    Trouble is I can not find a javadoc nor a sample code segment thatshows
    how!
    Call me dense, but I've spent several hours on BEA web pages lookingfor
    answers.
    This is what I found, but I could not get to work for various reasons:
    XML streaming: I have a codec (generated by autotype ant task), butit
    requires
    a SerializationContext. Where do I get a Serialization Context? I thinkserialize
    is a callout from WS and not for applicaiton code to call.
    javax.xml.rpc.encoding.Serializer: An object of this type is madeavailable by
    AbstractCodec (base class of generated code, but how is this classused?
    [Sorry if you've seen this posting a couple of days ago on interest.xml
    newsgroup.>>  I didn't intend to repost but due to lack of response there, I thought>this newsgroup>> was more appropriate and read more.
    Thanks,
    John

  • Getting the body of a SOAP call as a String or DOM

    Hi.
    I'm using Weblogic 7.1. I'd like to be able to get the contents of the body of a SOAP call as a String, or a DOM if it's already been parsed (and there's no way of preventing it from being parsed into a DOM).
    Basically I want to do my own custom de-serialization using JAXB or Castor or something similar, without using the Weblogic XML API.

    I had a look at the examples posted, can I clarify, I see that the Handler has
    public boolean handleRequest(MessageContext messageContext).
    and that the examples do things like log the message received.
    But can someone explain a bit more about, how this would be done to plug say Castor
    XML data binding in on the way in and way out e.g :-
    - in handleRequest() how you could add some unmarshalling to Castor classes but
    how do you return these ?
    - in handleResponse() - how would you receive a Castor class and add to the Soap
    Message ? How do you pass the castor class that holds the response xml into the
    handler ?
    I thinking of document oriented web service here.
    thanks
    Bruce Stephens <[email protected]> wrote:
    Hi Neil,
    Sure, here's a example that uses a handler chain without backend
    components [1]
    Bruce
    [1]
    http://webservice.bea.com/nocomponent.zip
    Neil wrote:
    Thanks for your reply. I have a couple of questions/clarificationsthough.
    [2] refers to an architecture with SOAP handlers, and also back-endcomponents
    that automatically serialize and deserialize the XML. Since I wantto do all the
    serialization/deserialization myself wouldn't a more appropriate architecture
    be: http://edocs.bea.com/wls/docs81/webserv/arch.html#1041917 ? Presumably
    then
    my handlers could delegate to whatever does the serialisation/deserialisation?
    Bruce Stephens <[email protected]> wrote:
    Hi Neil,
    Use a JAX-RPC handler. There are several examples; I'd suggest to
    begin
    with Manoj's [1] and also this section in the docs [2]
    Regards,
    Bruce
    [1]
    http://manojc.com/?sample4
    [2]
    http://edocs.bea.com/wls/docs81/webserv/arch.html#1041912
    Neil wrote:
    Hi.
    I'm using Weblogic 7.1. I'd like to be able to get the contents
    of
    the body of a SOAP call as a String, or a DOM if it's already beenparsed
    (and there's no way of preventing it from being parsed into a DOM).
    Basically I want to do my own custom de-serialization using JAXB
    or
    Castor or something similar, without using the Weblogic XML API.

  • Generate XML from XML-Schema

    What possibilities do I have to generate an XML-Instance from the XML-Schema?
    I heard of JAXB and Castor, that generate Classes for acessing XML-Information and genarating XML-files and I heard of Sun's XML-Generator, a command line tool.
    Does anybody know other possibilities?

    i use XMP Spy for converting XML schema to an instance file. it works fine.

  • Which XML Parser gives best performance? Please respond!!

    Hi,
    I am trying to figure out what is the best performing XML parser. I know that SAX implementation is good for XML reading and DOM is good when building XML documents.
    Now, I want to know which parser (JAXP? JDOM? Piccolo?) I understand that JAXP underneath uses Xerces and SAX2. Is it right?
    Is it a good practice to have a single application using a SAX parser for reading xml docs and a DOM parser to build xml parser?
    We are also planning to migrate from Apache Soap to Apache Axis. Do you have any recommendations?

    I think JAXP is an API, not a parser. It uses an underlying parser called Crimson by default. If you want it to use other parsers you can configure it to do so. I can't tell you which parser is more fastest.
    The easiest way of reading and writing XML documents is to use an XML data binding library such as JAXB or castor. It's much nicer than implementing the SAX callback methods or building document trees. The steps involve are...
    1. Write an XML Schema
    2. Tell the XML data binding tool to generate the source code to marshall / unmarshall XML documents to and from java objects
    3. Compile the source code
    4. Package the classes into a library
    5. Use the library in your application
    Steps 2-4 can be added into your build script.
    It may take you a couple of days to become familiar with the tools, but will save you weeks of maintenance & debugging.

  • Is Netweaver the right choice?

    We have recently upgrading our portal/webdynpro server to NW 7.0 Support Stack 14 (J2EE only).  While this stack level fixed some issues that we were having (in particular cleanup of JCO pools to prevent expired SSO ticket errors) it also introduced some other problems with Oracle.  This has led us to the discussion of whether Netweaver is the right choice for our custom application development environment. I'm posting this to get some feedback on what other companies are doing with their Netweaver enviroments.  I'm particularly interested in custom application development using webdynpro and the Netweaver Portal.
    We've been running various permutations of the Netweaver platform since 2005 (BI, Portals, and now ERP).  We are using a single J2EE instance to host the SAP EP, a custom jsp "intranet", and our webdynpro apps (we have 6 custom webdynpro apps).  Our user base is somewhere between 150-250 users.  We use the portal to access these custom apps, our BW web templates, and some SAP transactions.  With the rolllout of some of these custom apps, our portals environment is now becoming mission critical and we seem to continue to have problems with the stability of the J2EE engine on the portal machine.
    Are other customers having stability problems with NW04s?  Are other customers using web dynpro and SAP's enterprise portal for Mission Critical applications?  If so, what do your environments look like?  If not, what are you using for custom applications that communicate with SAP and other systems?
    Thanks for any and all input
    Eric

    Assuming your legacy apps don't need to update the new OM system an MDB sounds reasonable. You may want to consider passing the messages as XML and using a library (JAXB/P, castor etc) for parsing / inserting into a database.
    You should also work out how to handle technical failures updating the legacy database and poison messages (i.e. when an invalid message is received). You may decided to automatically retry technical failures a set number of times before moving them to a backout queue. There's no point retrying poison messages as they'll repeatedly fail, but you may need to fix / manually insert them.

Maybe you are looking for

  • SAP ABAP Query

    Hi, Standard aging analysis report (RFDOPR10) displays only the customer line items. But the client also wants to display the offsetting line item details. I am a functional person and I am trying to write a query to generate offsetting line items fr

  • Strange messase on update

    I got a message after doing a pacman -Syu that reads: (4/5) upgrading sane warning: directory permissions differ on var/ filesystem: 755  package: 775 warning: directory permissions differ on var/lock/ filesystem: 755  package: 775 What does that mea

  • Regarding message error in bap webdynpro

    hai friends i am new to abap webdynpro i have doubt that , i palced the table ui element in the view if that table is not initial i have to give error message, is it same way as normal abap in the view the ui element id name of table is TABLE1 can wr

  • Translation bug in phone's settings when change ph...

    Hello, I'm using WIndows Phone 8.1 and I found a small thing with translation from Russian to English and vice verse.  Pre-conditions: 1. Phone uses Russian language (Settings -> language ->русский). 2. All settings' names and their summaries are tra

  • Help? with my video on the web - Bad playback...

    So I exported my videos to HTML 5 (webm, ogg, mp4) and gave them to the web guy to add to the site. When I play them back on the website the videos look like they're skipping frames -- just does not look normel. When i play back the origonal HTML fil