Announcement Announcement Module
Collapse
No announcement yet.
spring-ws-1.0-m2 airline sample Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-ws-1.0-m2 airline sample

    Hi-

    I just downloaded spring-ws-1.0-m2-full.zip and while going through the airline sample code noticed that the package (and classes within) org.springframework.ws.samples.airline.schema and org.springframework.ws.samples.airline.schema.Impl are missing. FYI.

    Also, the class org.springframework.ws.samples.airline.ws.GetFligh tsEndpoint (well, the entire application) uses separate POJOs for the schema and the domain objects. It's not an architectural decision I have considered before. Can someone explain the pros of this approach over straight mapping of the domain objects? Is it a function of the XML binding framework being used?

    In advance, thanks a bunch.

    Best,
    John

  • #2
    Originally posted by jwoolf330 View Post
    I just downloaded spring-ws-1.0-m2-full.zip and while going through the airline sample code noticed that the package (and classes within) org.springframework.ws.samples.airline.schema and org.springframework.ws.samples.airline.schema.Impl are missing. FYI.
    Yes, these are generated by the build from the xsd schema.

    Originally posted by jwoolf330 View Post
    Also, the class org.springframework.ws.samples.airline.ws.GetFligh tsEndpoint (well, the entire application) uses separate POJOs for the schema and the domain objects. It's not an architectural decision I have considered before. Can someone explain the pros of this approach over straight mapping of the domain objects? Is it a function of the XML binding framework being used?
    This is by design. The danger about using your domain objects in the web service interface is that you're making them part of a public interface. That basically means that you cannot change them without changing the contract of the web service.

    So, by separating the public contract from the internal workings, you can change the two independently.

    Comment


    • #3
      Thank you, Arjen.

      Comment


      • #4
        Originally posted by Arjen Poutsma View Post
        Yes, these are generated by the build from the xsd schema.



        This is by design. The danger about using your domain objects in the web service interface is that you're making them part of a public interface. That basically means that you cannot change them without changing the contract of the web service.

        So, by separating the public contract from the internal workings, you can change the two independently.
        Hi Arjen,

        I can't use Maven in my work environment. I tired using the XJC utility from JAXB, to generate the required source files from the airline.xsd . It did not generate the Impl files for some reason. I would appriciate it if could you help me out on this.

        By the way i am trying to run this example from within Eclipse.

        Thanks
        -Venkatesh

        Comment


        • #5
          Ok. I found the problem... I was using jaxb 2.0. The required files were generated when i used the 1.6 version.

          Comment

          Working...
          X