You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Avner Levy <av...@checkpoint.com> on 2013/04/13 17:50:25 UTC

RE: Reuse JAXB context in jaxws

Thanks Dan.
I've tried the following configuration:
http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-share-jaxb-context-between-services
But obviously I'm doing something very wrong.
Any help will be greatly appreciated (I'm trying to solve this one for few months).
Thanks in advance,
  Avner

* I'm working with CXF 2.7.4

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Monday, January 28, 2013 9:02 PM
To: users@cxf.apache.org
Subject: Re: Reuse JAXB context in jaxws


On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:

> In the past I've posted a question about reusing jaxb context between services.
> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
> 
> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>    <jaxws:dataBinding>
>        <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>            <constructor-arg index="0" ref="globalJAXBContextBean"/>
>        </bean>
>    </jaxws:dataBinding>
> 
> I've tried to do the same through code:
> 
>    
> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>    jaxwsEndpoint.publish(URL);

The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.

To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.

Dan



> 
> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
> Any idea how come I finish with a different context?
> Thanks in advance,
>   Avner
> 

--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com


Email secured by Check Point

Re: Reuse JAXB context in jaxws

Posted by Johan Edstrom <se...@gmail.com>.
You need to extend that class, initialize a jaxb context (statically) and in the ctor
Provide an array of all the object factories 

On Apr 15, 2013, at 0:14, Avner Levy <av...@checkpoint.com> wrote:

> You are correct.
> The parts missing are the service messages classes.
> But how can I add these manually to my global context?
> As far as I understand only CXF knows to read the methods of the service and translate them to java / xml classes.
> 
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] 
> Sent: Sunday, April 14, 2013 11:55 PM
> To: users@cxf.apache.org
> Subject: Re: Reuse JAXB context in jaxws
> 
> You probably haven't instantiated the whole object graph with every single ObjectFactory?
> 
> 
> On Apr 13, 2013, at 11:12 PM, Avner Levy <av...@checkpoint.com> wrote:
> 
>> Thanks Johan,
>> I create my services by code (although it should be equivalent to your configuration file):
>> 
>>       JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
>>       factory.setDataBinding(jaxbDataBinding);
>>       //register WebService interface
>>       factory.setServiceClass(o.getClass());
>>       //publish the interface
>>       factory.setAddress(URL);
>>       factory.setServiceBean(o);
>>       //create WebService instance
>>       factory.create();*/
>> 
>> but on Run-Time all the service messages classes are missing from the jaxb context.
>> Any idea why?
>> 
>> -----Original Message-----
>> From: Johan Edstrom [mailto:seijoed@gmail.com] 
>> Sent: Saturday, April 13, 2013 11:45 PM
>> To: users@cxf.apache.org
>> Subject: Re: Reuse JAXB context in jaxws
>> 
>> I haven't done it in a while but on older versions you set it like this 
>> 
>> <jaxws:endpoint id="NotificationProducer"
>>                 implementor="#notificationProducerImpl"
>>                 address="${wcs.subscribe.httpEndpoint}" wsdlLocation="classpath:NNEW-SubscriptionManagement.wsdl"
>> 
>>   <jaxws:properties></jaxws:properties>
>> 
>>   <jaxws:features>
>>     <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
>>   </jaxws:features>
>> 
>>   <jaxws:dataBinding>
>>     <ref component-id="jaxb"/>
>>   </jaxws:dataBinding>
>> 
>>   <jaxws:inFaultInterceptors>
>>     <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>   </jaxws:inFaultInterceptors>
>> 
>> </jaxws:endpoint>
>> 
>> Where jaxb is 
>> 
>> <bean class="aaa.bbb.ccc.jaxbcontext.engine.AAAJaxbContext" id="jaxb">
>>   <property name="engineContext" ref="globalContext"/>
>> </bean>
>> 
>> And that bean extends  JAXBDataBinding
>> 
>> 
>> On Apr 13, 2013, at 9:50 AM, Avner Levy <av...@checkpoint.com> wrote:
>> 
>>> Thanks Dan.
>>> I've tried the following configuration:
>>> http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-sh
>>> are-jaxb-context-between-services But obviously I'm doing something 
>>> very wrong.
>>> Any help will be greatly appreciated (I'm trying to solve this one for few months).
>>> Thanks in advance,
>>> Avner
>>> 
>>> * I'm working with CXF 2.7.4
>>> 
>>> -----Original Message-----
>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>> Sent: Monday, January 28, 2013 9:02 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: Reuse JAXB context in jaxws
>>> 
>>> 
>>> On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:
>>> 
>>>> In the past I've posted a question about reusing jaxb context between services.
>>>> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
>>>> 
>>>> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>>>> <jaxws:dataBinding>
>>>>     <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>>>>         <constructor-arg index="0" ref="globalJAXBContextBean"/>
>>>>     </bean>
>>>> </jaxws:dataBinding>
>>>> 
>>>> I've tried to do the same through code:
>>>> 
>>>> 
>>>> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>>>> jaxwsEndpoint.publish(URL);
>>> 
>>> The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.
>>> 
>>> To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.
>>> 
>>> Dan
>>> 
>>> 
>>> 
>>>> 
>>>> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
>>>> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
>>>> Any idea how come I finish with a different context?
>>>> Thanks in advance,
>>>> Avner
>>> 
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>>> http://coders.talend.com
>>> 
>>> 
>>> Email secured by Check Point
>> 
>> 
>> Email secured by Check Point
> 
> 
> Email secured by Check Point

RE: Reuse JAXB context in jaxws

Posted by Avner Levy <av...@checkpoint.com>.
You are correct.
The parts missing are the service messages classes.
But how can I add these manually to my global context?
As far as I understand only CXF knows to read the methods of the service and translate them to java / xml classes.


-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] 
Sent: Sunday, April 14, 2013 11:55 PM
To: users@cxf.apache.org
Subject: Re: Reuse JAXB context in jaxws

You probably haven't instantiated the whole object graph with every single ObjectFactory?


On Apr 13, 2013, at 11:12 PM, Avner Levy <av...@checkpoint.com> wrote:

> Thanks Johan,
> I create my services by code (although it should be equivalent to your configuration file):
> 
>        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
>        factory.setDataBinding(jaxbDataBinding);
>        //register WebService interface
>        factory.setServiceClass(o.getClass());
>        //publish the interface
>        factory.setAddress(URL);
>        factory.setServiceBean(o);
>        //create WebService instance
>        factory.create();*/
> 
> but on Run-Time all the service messages classes are missing from the jaxb context.
> Any idea why?
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] 
> Sent: Saturday, April 13, 2013 11:45 PM
> To: users@cxf.apache.org
> Subject: Re: Reuse JAXB context in jaxws
> 
> I haven't done it in a while but on older versions you set it like this 
> 
> <jaxws:endpoint id="NotificationProducer"
>                  implementor="#notificationProducerImpl"
>                  address="${wcs.subscribe.httpEndpoint}" wsdlLocation="classpath:NNEW-SubscriptionManagement.wsdl"
>> 
> 
>    <jaxws:properties></jaxws:properties>
> 
>    <jaxws:features>
>      <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
>    </jaxws:features>
> 
>    <jaxws:dataBinding>
>      <ref component-id="jaxb"/>
>    </jaxws:dataBinding>
> 
>    <jaxws:inFaultInterceptors>
>      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>    </jaxws:inFaultInterceptors>
> 
>  </jaxws:endpoint>
> 
> Where jaxb is 
> 
> <bean class="aaa.bbb.ccc.jaxbcontext.engine.AAAJaxbContext" id="jaxb">
>    <property name="engineContext" ref="globalContext"/>
>  </bean>
> 
> And that bean extends  JAXBDataBinding
> 
> 
> On Apr 13, 2013, at 9:50 AM, Avner Levy <av...@checkpoint.com> wrote:
> 
>> Thanks Dan.
>> I've tried the following configuration:
>> http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-sh
>> are-jaxb-context-between-services But obviously I'm doing something 
>> very wrong.
>> Any help will be greatly appreciated (I'm trying to solve this one for few months).
>> Thanks in advance,
>> Avner
>> 
>> * I'm working with CXF 2.7.4
>> 
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Monday, January 28, 2013 9:02 PM
>> To: users@cxf.apache.org
>> Subject: Re: Reuse JAXB context in jaxws
>> 
>> 
>> On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:
>> 
>>> In the past I've posted a question about reusing jaxb context between services.
>>> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
>>> 
>>> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>>>  <jaxws:dataBinding>
>>>      <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>>>          <constructor-arg index="0" ref="globalJAXBContextBean"/>
>>>      </bean>
>>>  </jaxws:dataBinding>
>>> 
>>> I've tried to do the same through code:
>>> 
>>> 
>>> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>>>  jaxwsEndpoint.publish(URL);
>> 
>> The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.
>> 
>> To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.
>> 
>> Dan
>> 
>> 
>> 
>>> 
>>> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
>>> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
>>> Any idea how come I finish with a different context?
>>> Thanks in advance,
>>> Avner
>>> 
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>> 
>> 
>> Email secured by Check Point
> 
> 
> Email secured by Check Point


Email secured by Check Point

Re: Reuse JAXB context in jaxws

Posted by Johan Edstrom <se...@gmail.com>.
You probably haven't instantiated the whole object graph with 
every single ObjectFactory?


On Apr 13, 2013, at 11:12 PM, Avner Levy <av...@checkpoint.com> wrote:

> Thanks Johan,
> I create my services by code (although it should be equivalent to your configuration file):
> 
>        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
>        factory.setDataBinding(jaxbDataBinding);
>        //register WebService interface
>        factory.setServiceClass(o.getClass());
>        //publish the interface
>        factory.setAddress(URL);
>        factory.setServiceBean(o);
>        //create WebService instance
>        factory.create();*/
> 
> but on Run-Time all the service messages classes are missing from the jaxb context.
> Any idea why?
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] 
> Sent: Saturday, April 13, 2013 11:45 PM
> To: users@cxf.apache.org
> Subject: Re: Reuse JAXB context in jaxws
> 
> I haven't done it in a while but on older versions you set it like this 
> 
> <jaxws:endpoint id="NotificationProducer"
>                  implementor="#notificationProducerImpl"
>                  address="${wcs.subscribe.httpEndpoint}" wsdlLocation="classpath:NNEW-SubscriptionManagement.wsdl"
>> 
> 
>    <jaxws:properties></jaxws:properties>
> 
>    <jaxws:features>
>      <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
>    </jaxws:features>
> 
>    <jaxws:dataBinding>
>      <ref component-id="jaxb"/>
>    </jaxws:dataBinding>
> 
>    <jaxws:inFaultInterceptors>
>      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>    </jaxws:inFaultInterceptors>
> 
>  </jaxws:endpoint>
> 
> Where jaxb is 
> 
> <bean class="aaa.bbb.ccc.jaxbcontext.engine.AAAJaxbContext" id="jaxb">
>    <property name="engineContext" ref="globalContext"/>
>  </bean>
> 
> And that bean extends  JAXBDataBinding
> 
> 
> On Apr 13, 2013, at 9:50 AM, Avner Levy <av...@checkpoint.com> wrote:
> 
>> Thanks Dan.
>> I've tried the following configuration:
>> http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-sh
>> are-jaxb-context-between-services But obviously I'm doing something 
>> very wrong.
>> Any help will be greatly appreciated (I'm trying to solve this one for few months).
>> Thanks in advance,
>> Avner
>> 
>> * I'm working with CXF 2.7.4
>> 
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Monday, January 28, 2013 9:02 PM
>> To: users@cxf.apache.org
>> Subject: Re: Reuse JAXB context in jaxws
>> 
>> 
>> On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:
>> 
>>> In the past I've posted a question about reusing jaxb context between services.
>>> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
>>> 
>>> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>>>  <jaxws:dataBinding>
>>>      <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>>>          <constructor-arg index="0" ref="globalJAXBContextBean"/>
>>>      </bean>
>>>  </jaxws:dataBinding>
>>> 
>>> I've tried to do the same through code:
>>> 
>>> 
>>> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>>>  jaxwsEndpoint.publish(URL);
>> 
>> The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.
>> 
>> To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.
>> 
>> Dan
>> 
>> 
>> 
>>> 
>>> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
>>> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
>>> Any idea how come I finish with a different context?
>>> Thanks in advance,
>>> Avner
>>> 
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>> 
>> 
>> Email secured by Check Point
> 
> 
> Email secured by Check Point


RE: Reuse JAXB context in jaxws

Posted by Avner Levy <av...@checkpoint.com>.
Thanks Johan,
I create my services by code (although it should be equivalent to your configuration file):

        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setDataBinding(jaxbDataBinding);
        //register WebService interface
        factory.setServiceClass(o.getClass());
        //publish the interface
        factory.setAddress(URL);
        factory.setServiceBean(o);
        //create WebService instance
        factory.create();*/

but on Run-Time all the service messages classes are missing from the jaxb context.
Any idea why?

-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] 
Sent: Saturday, April 13, 2013 11:45 PM
To: users@cxf.apache.org
Subject: Re: Reuse JAXB context in jaxws

I haven't done it in a while but on older versions you set it like this 

 <jaxws:endpoint id="NotificationProducer"
                  implementor="#notificationProducerImpl"
                  address="${wcs.subscribe.httpEndpoint}" wsdlLocation="classpath:NNEW-SubscriptionManagement.wsdl"
    >

    <jaxws:properties></jaxws:properties>

    <jaxws:features>
      <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
    </jaxws:features>
  
    <jaxws:dataBinding>
      <ref component-id="jaxb"/>
    </jaxws:dataBinding>

    <jaxws:inFaultInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    </jaxws:inFaultInterceptors>

  </jaxws:endpoint>

Where jaxb is 

<bean class="aaa.bbb.ccc.jaxbcontext.engine.AAAJaxbContext" id="jaxb">
    <property name="engineContext" ref="globalContext"/>
  </bean>

And that bean extends  JAXBDataBinding


On Apr 13, 2013, at 9:50 AM, Avner Levy <av...@checkpoint.com> wrote:

> Thanks Dan.
> I've tried the following configuration:
> http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-sh
> are-jaxb-context-between-services But obviously I'm doing something 
> very wrong.
> Any help will be greatly appreciated (I'm trying to solve this one for few months).
> Thanks in advance,
>  Avner
> 
> * I'm working with CXF 2.7.4
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, January 28, 2013 9:02 PM
> To: users@cxf.apache.org
> Subject: Re: Reuse JAXB context in jaxws
> 
> 
> On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:
> 
>> In the past I've posted a question about reusing jaxb context between services.
>> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
>> 
>> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>>   <jaxws:dataBinding>
>>       <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>>           <constructor-arg index="0" ref="globalJAXBContextBean"/>
>>       </bean>
>>   </jaxws:dataBinding>
>> 
>> I've tried to do the same through code:
>> 
>> 
>> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>>   jaxwsEndpoint.publish(URL);
> 
> The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.
> 
> To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.
> 
> Dan
> 
> 
> 
>> 
>> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
>> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
>> Any idea how come I finish with a different context?
>> Thanks in advance,
>>  Avner
>> 
> 
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
> http://coders.talend.com
> 
> 
> Email secured by Check Point


Email secured by Check Point

Re: Reuse JAXB context in jaxws

Posted by Johan Edstrom <se...@gmail.com>.
I haven't done it in a while but on older versions you set it like this 

 <jaxws:endpoint id="NotificationProducer"
                  implementor="#notificationProducerImpl"
                  address="${wcs.subscribe.httpEndpoint}" wsdlLocation="classpath:NNEW-SubscriptionManagement.wsdl"
    >

    <jaxws:properties></jaxws:properties>

    <jaxws:features>
      <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
    </jaxws:features>
  
    <jaxws:dataBinding>
      <ref component-id="jaxb"/>
    </jaxws:dataBinding>

    <jaxws:inFaultInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    </jaxws:inFaultInterceptors>

  </jaxws:endpoint>

Where jaxb is 

<bean class="aaa.bbb.ccc.jaxbcontext.engine.AAAJaxbContext" id="jaxb">
    <property name="engineContext" ref="globalContext"/>
  </bean>

And that bean extends  JAXBDataBinding


On Apr 13, 2013, at 9:50 AM, Avner Levy <av...@checkpoint.com> wrote:

> Thanks Dan.
> I've tried the following configuration:
> http://stackoverflow.com/questions/15989583/how-to-configure-cxf-to-share-jaxb-context-between-services
> But obviously I'm doing something very wrong.
> Any help will be greatly appreciated (I'm trying to solve this one for few months).
> Thanks in advance,
>  Avner
> 
> * I'm working with CXF 2.7.4
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org] 
> Sent: Monday, January 28, 2013 9:02 PM
> To: users@cxf.apache.org
> Subject: Re: Reuse JAXB context in jaxws
> 
> 
> On Jan 27, 2013, at 3:37 AM, Avner Levy <av...@checkpoint.com> wrote:
> 
>> In the past I've posted a question about reusing jaxb context between services.
>> Daniel Kulp suggested configure a data binding object in the following form (for the specific scenario):
>> 
>> <jaxws:endpoint xmlns:tns="urn:ihe:iti:xcpd:2009" .......>
>>   <jaxws:dataBinding>
>>       <bean class="org.apache.cxf.jaxb.JAXBDataBinding" >
>>           <constructor-arg index="0" ref="globalJAXBContextBean"/>
>>       </bean>
>>   </jaxws:dataBinding>
>> 
>> I've tried to do the same through code:
>> 
>> 
>> jaxwsEndpoint.getProperties().put("org.apache.cxf.jaxb.JAXBDataBinding", jaxbDataBinding); before calling:
>>   jaxwsEndpoint.publish(URL);
> 
> The data binding isn't a property in the jaxws:endpoint, otherwise it would be set in a <jaxws:properties> type element.
> 
> To do this, you would need to use the JaxWsServerFactoryBean to create a server instead of the Endpoint.publish methods.  The server factory has a setDataBinding method on it that can be used.
> 
> Dan
> 
> 
> 
>> 
>> And the service starts very fast as if they are reusing the context in the jaxbDataBinding object passed.
>> But when connecting later I've discovered that the service context contains only 50 classes while the original contained 700.
>> Any idea how come I finish with a different context?
>> Thanks in advance,
>>  Avner
>> 
> 
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
> 
> 
> Email secured by Check Point