cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <>
Subject [jira] Commented: (CXF-340) Support adding extra classes to JAXB context
Date Wed, 20 Jun 2007 06:16:26 GMT


Freeman Fang commented on CXF-340:

My last commit get your testcase working.

One thing you need change is you also need inject jaxb.additionalContextClasses into client

So your client spring config should be

        <!-- Client Proxy -->
        <jaxws:client id="testClient" address="http://localhost:7081/service/TestService"
                        <bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
                        <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"
                        <entry key="jaxb.additionalContextClasses">
                                <bean class="com.hmsinc.cxftest.util.ClassArrayFactoryBean">
                                        <property name="classNames">

Btw, the mock spring container is amazing in your testcase, so I borrow it as a system test
to guarantee extra subclass is work for jaxb marshall/unmarshall. :-)
Thanks very much

> Support adding extra classes to JAXB context
> --------------------------------------------
>                 Key: CXF-340
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 2.0-M1
>            Reporter: Dan Diephouse
>            Assignee: Freeman Fang
>             Fix For: 2.1
>         Attachments: cxf-test-extends.tar.gz, cxf-test.tar.gz,
> Users may have their own JAXB classes which need to be included in the context. We should
provide a simple mechanism to add extra classes to the context. (This worked pretty well in
> HashMap props = new HashMap();
> props.put("jaxb.additionalContextClasses", new Class[] { Foo.class, Bar.class });
> serverFactory.setProperties(props);
> serverFactory.create();

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message