Announcement Announcement Module
Collapse
No announcement yet.
jaxb1 behaviour Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jaxb1 behaviour

    1) With sping-ws integration what's the recomended way to instantiate beans in app context given you are supposed to use ObjectFactory to instantiate beans

    2) is there an abstraction that would avoid tying your code to jaxb through mention of objectFactory in the case you have to instantiate bean in code

    3) I was using castor b4 and now I want to use jaxb. I have multiple packages where in the root of both packages, I have classes of the same name. With castor that wasn't a problem I just needed to specify when I receive x in xml then use class y.. i.e:

    <mapping>
    <description>Description of the mapping</description>
    <class name="com.xxx.common.domain.xsd.java.errormessager eply.ErrorMessageReply"
    auto-complete="true">
    <map-to xml="ErrorMessageReply"/>
    </class>

    How do I do that with jaxb1

  • #2
    Originally posted by garpinc2 View Post
    1) With sping-ws integration what's the recomended way to instantiate beans in app context given you are supposed to use ObjectFactory to instantiate beans
    Interesting. I usually directly use to the implementation classes. You could wire up an ObjectFactory, of course, but since it doesn't implement an interface, it is harder to mock in unit tests.

    Originally posted by garpinc2 View Post
    2) is there an abstraction that would avoid tying your code to jaxb through mention of objectFactory in the case you have to instantiate bean in code
    Not yet. All marshalling frameworks are different, so it is hard to accomplish this. It's an interesting thought though, and perhaps I should investigate it further.

    Originally posted by garpinc2 View Post
    3) I was using castor b4 and now I want to use jaxb. I have multiple packages where in the root of both packages, I have classes of the same name. With castor that wasn't a problem I just needed to specify when I receive x in xml then use class y.. i.e:

    <mapping>
    <description>Description of the mapping</description>
    <class name="com.xxx.common.domain.xsd.java.errormessager eply.ErrorMessageReply"
    auto-complete="true">
    <map-to xml="ErrorMessageReply"/>
    </class>

    How do I do that with jaxb1
    Perhaps you can use multiple marshallers? And tie them to particular endpoints?

    Comment

    Working...
    X