Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: dilemma and doubt: XFire or Spring-WS

  1. #1
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Exclamation dilemma and doubt: XFire or Spring-WS

    hello guys

    i am reading Spring in action 2nd edition and i like it

    i have a problem, in chapter 8 talk about of xfire
    and chapter 9 is all about spring ws

    but jesus is really cumbersome

    the author said that xfire has a disadvantage about the reflection of internal API

    some help about best practices or if is a suicide work with xfire , really i am lost

    i appreacite

    thanks in advanced
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney
    Posts
    503

    Default

    same...I really like the Spring-WS stuff right up until the part about marshalling, where it begins to look like a complete pain to use Spring-WS.

    CXF (previously XFire) seems (?) to be *much* easier to handle marshalling.

    I've not really used either and so I too am looking for feedback or reference to a post from someone with experience choosing between the two (or maybe other choices).

    Happy to hear from the Spring team who no doubt have had this conversation when building Spring-WS.

    I know the CXF REST stuff (http://cwiki.apache.org/CXF20DOC/http-binding.html) is not really 'XSD interface first' but it does look easier/simpler.

  3. #3
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Spring-WS and XFire have different goals. The goal of XFire, IMO, is to make it easy to expose an existing Spring bean as SOAP service. It does this completely transparently, just as easy any other RemoteExporter you can find in Spring itself.

    The goal of Spring-WS is to take a contract-first, message-driven approach. The fact that you are handling XML messages is much more obvious: no transparent data binding is being done for you. And believe me: sometimes you really have to have control over the XML Messages, for instance when you want to have a constant contract, or when you have to conform to a third-party contract.

    So I would say that both projects have different usage scenarios.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello guys

    thanks both you for your replies

    gmatthews
    same...I really like the Spring-WS stuff right up until the part about marshalling, where it begins to look like a complete pain to use Spring-WS.
    i am agree, OXM is pain for my brain , many options for that is cumbersome and the classic advice, "each option has advantages and disadvantages"

    i dont know if this is a suicide, but if spring can create its own OXM mechanism, please do it

    i love spring and i know that web services is a complicated way to integrate system, but.... you are the experts

    Arjen
    The goal of Spring-WS is to take a contract-first, message-driven approach. The fact that you are handling XML messages is much more obvious: no transparent data binding is being done for you.
    thats right

    tell me, do you now a friendly tool to create xsd from xml?, spring in action 2nd edition talk about trang, maybe you or other member know other better tool

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  5. #5
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Quote Originally Posted by dr_pompeii View Post
    i dont know if this is a suicide, but if spring can create its own OXM mechanism, please do it
    Creating an OXM tool is not as simple as it might look, and I would say there is little added value in creating a new one. Nowadays, I usually recommend using JAXB2, unless you cannot/will not use annotations.

    Quote Originally Posted by dr_pompeii View Post
    tell me, do you now a friendly tool to create xsd from xml?, spring in action 2nd edition talk about trang, maybe you or other member know other better tool
    Microsoft also has a tool, which might suit you better. I haven't used it though, since I don't use Windows.

    Cheers,
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  6. #6
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Creating an OXM tool is not as simple as it might look, and I would say there is little added value in creating a new one.
    yes i know, is like talk about ORM, but the point if Spring can take the best of each tool for OXM and create a new standard/tool, it would be great

    Nowadays, I usually recommend using JAXB2, unless you cannot/will not use annotations.
    the obvious question for a rookie like me in this world WS,
    why and which advantages has against the others options?

    i dont know really much about annotions, but if i learn this to work with JAXB2 and then this save my life with OXM, i must learn it

    Microsoft also has a tool, which might suit you better. I haven't used it though, since I don't use Windows.
    oh Tux, our old friend microsoft, , some advice for linux OS? , maybe exist one tool out there based in Java

    regards and thanks for yoru reply
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  7. #7
    Join Date
    Aug 2004
    Location
    Sydney
    Posts
    503

    Default some feedback

    OK, so I got something going over the weekend.

    i dont know really much about annotions, but if i learn this to work with JAXB2 and then this save my life with OXM, i must learn it
    At a simple level, all there is to JAXB 2 (if you're using Java 6, with it built in), is to annotate a target class with @XmlRootElement and optionally @XmlElement and @XmlAttribute. There you are, you are now an expert in JAXB2!

    That annotated class can then act as a target for having XML unmarshalled into it.

    I wasted a lot of time faffing about with namespaces and JAXB2, obviously doing something stupid -- so at the moment not using namespaces at all anywhere, but might revisit that.

    The other thing I could imagine JAXB2 being useful for is marshalling a JAXB2 annotated Java object to XML, saving having to do String manipulation manually to create some XML on the client side for posting.

    I'm also using Spring @Endpoint annotation and PayloadRootAnnotationMethodEndpointMapping class to detect annotated @Endpoint's, pretty much as per 5.3.3 of doco.

    I'm not using MarshallingMethodEndpointAdapter, but instead an adapter contributed in this forum as an attachment by someone. That class handles empty param lists or something after I had some problem with MarshallingMethodEndpointAdapter, possibly also due to something stupid I was doing.

    All in all, works well.

    Next step is to see about putting a REST spin on the whole thing -- I want to publish an API sort of like the Amazon and eBay REST APIs, but not sure (?) want to inflict WS on our customers -- but not sure if that would be bastardising the use of Spring-WS too much. e.g. need to find out how I do GET, POST, PUT, DELETE if at all possible with Spring-WS.
    Last edited by gmatthews; Sep 17th, 2007 at 01:19 AM. Reason: insert original poster's quote

  8. #8
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    thanks for the reply

    At a simple level, all there is to JAXB 2 (if you're using Java 6, with it built in), is to annotate a target class with @XmlRootElement and optionally @XmlElement and @XmlAttribute. There you are, you are now an expert in JAXB2!
    i used to work with jdk1.5 update 12, not 6 and even if i dont bad remember that some features of subproject of Spring not support yet version 6

    if i dont bad remember annotations work too in jdk 5 right?

    tell me is outthere a book or web tutorial of your preference to learn some tricks about JAXB2???

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  9. #9
    Join Date
    Aug 2004
    Location
    Sydney
    Posts
    503

    Default

    tell me is outthere a book or web tutorial of your preference to learn some tricks about JAXB2???
    I just did a combination of reading the Spring-WS doco, which as always is fairly extensive, and googling JAXB2.

  10. #10
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Thumbs up

    thanks for the reply

    it seems that this link
    https://jaxb.dev.java.net/
    is the source

    i will read this carefully

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •