Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: dilemma and doubt: XFire or Spring-WS

  1. #11
    Join Date
    Dec 2006
    Location
    San Francisco Bay Area
    Posts
    70

    Default

    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
    I've been using Altova's XMLSPY (a commercial product) which is a Swiss Army knife of XML editors. Among many other features, it can generate XSD and WSDL from sample XML files, assuming that you've accurately reflected any repeating elements in your sample. It costs $$. I was lucky enough to win a free copy at a conference (call me cheap), but you can download a 30-day trial for free and give it a spin:

    http://www.download.com/Altova-XMLSp...-10743625.html

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

    Default

    Hi CorbaTheGeek

    thanks for the reply and the link

    but you can download a 30-day trial for free
    i will check it , the sad is that the installer is a ugly .exe, i will see if wine in linux can help me


    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

  3. #13
    Join Date
    Dec 2006
    Location
    San Francisco Bay Area
    Posts
    70

    Default

    XMLSpy apparently works under Linux/Wine:

    http://www.altova.com/support_platform_linux.html

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

    Default

    thanks for the link friend

    i hope that the documentation be useful

    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. #15
    Join Date
    Oct 2004
    Posts
    207

    Default

    In the investigations I've been doing for my project, I've come to the following conclusions...

    Jaxb2 is faaar better than Jaxb1. Avoid Jaxb1 at all costs.

    Jaxb2, in regards to Web Service projects, is best used from a Schema First approach. Design your XSD, use the xjc2 ant task to generate the Annotated java code.

    Also, when it comes to the OXM stuff in Spring-WS, I subclassed the AbstractMarshallingPayloadEndpoint to make our endpoints a little simpler. The idea being that we would have many endpoints, each with their own marshaller.

    As this is a Java5 project (using jaxb2 annotations and such) the "AbstractJaxb2MarshallingPayloadEndpoint uses generics as well.

    Code:
    public abstract class AbstractJaxb2MarshallingEndpoint<RQ, RS> extends AbstractMarshallingPayloadEndpoint {
    
        protected AbstractJaxb2MarshallingEndpoint(Class... classesToBeBound) {
            Jaxb2Marshaller marshaller = buildMarshaller(classesToBeBound);
            setMarshaller(marshaller);
            setUnmarshaller(marshaller);
        }
    
        private Jaxb2Marshaller buildMarshaller(Class... classesToBeBound) {
            Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
            marshaller.setClassesToBeBound(classesToBeBound);
            initializeMarshaller(marshaller);
            try {
                marshaller.afterPropertiesSet();
            } catch (Exception e) {
                throw new RuntimeException("Failed to initialize Jaxb2Marshaller", e);
            }
            return marshaller;
        }
    
        protected void initializeMarshaller(Jaxb2Marshaller marshaller) {
        }
    
        @SuppressWarnings("unchecked")
        protected final Object invokeInternal(Object object) throws Exception {
            return invokeEndpoint((RQ) object);
        }
    
        protected abstract RS invokeEndpoint(RQ request) throws Exception;
    }
    Our final endpoint looks like this then...
    Code:
    public class CurrencyExchangeEndpoint extends AbstractJaxb2MarshallingEndpoint<ExchangeRequest, ExchangeResponse> {
    
        private final CurrencyExchangeProcessor currencyExchangeProcessor;
    
        public CurrencyExchangeEndpoint(CurrencyExchangeProcessor currencyExchangeProcessor) {
            super(ExchangeRequest.class, ExchangeResponse.class);
            this.currencyExchangeProcessor = currencyExchangeProcessor;
        }
    
        protected ExchangeResponse invokeEndpoint(ExchangeRequest request) throws Exception {
            return currencyExchangeProcessor.execute(request);
        }
    
    }

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

    Default

    Hello RayKrueger

    thanks so much by your reply

    Jaxb2 is faaar better than Jaxb1. Avoid Jaxb1 at all costs.
    oh thanks, second advice to favor for jaxb2

    Jaxb2, in regards to Web Service projects, is best used from a Schema First approach. Design your XSD, use the xjc2 ant task to generate the Annotated java code.
    nice

    Also, when it comes to the OXM stuff in Spring-WS, I subclassed the AbstractMarshallingPayloadEndpoint to make our endpoints a little simpler. The idea being that we would have many endpoints, each with their own marshaller.

    As this is a Java5 project (using jaxb2 annotations and such) the "AbstractJaxb2MarshallingPayloadEndpoint uses generics as well
    thanks for this suggestion

    i appreciate

    sadly i dont understand your code yet, i am sitll rookie in this painful area of WS

    again thanks!
    - 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
  •