Hi,

    I'm trying to use a com.sun.xml.bind.characterEscapeHandler for JAXB 
customize escaping,
    in order to output CData text.
    
    This is my cxf configuration :


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:jaxws="http://cxf.apache.org/jaxws";
   xmlns:cxf="http://cxf.apache.org/core";
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd 
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd 
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd";>

   <import resource="classpath:META-INF/cxf/cxf.xml" />
   <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

   
   <jaxws:endpoint id="wsuodb"
      implementor="my.test.odbu.odbActionImpl"
      wsdlLocation="WEB-INF/wsdl/odb.wsdl" address="/odb" >
      <jaxws:serviceFactory>
          <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
             <property name="dataBinding">
                <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
                  <property name="marshallerProperties">
                     <map>
                        <entry>
                           
<key><value>com.sun.xml.bind.characterEscapeHandler</value></key>
                           <bean class="my.test.escape.CDataCEH"/>
                        </entry>
                     </map>
                  </property>
               </bean>                
             </property>
          </bean>
       </jaxws:serviceFactory>   
   </jaxws:endpoint>

</beans>

Here is a part of the wsdl :

   <wsdl:binding name="ODB_XMLBinding" type="myODB:ODBActions">
    <xformat:binding />
    <wsdl:operation name="ODBAction">
      <wsdl:input name="TrRequest" />
      <wsdl:output name="TrResponse" />
    </wsdl:operation>
  </wsdl:binding>
  
  <wsdl:service name="ODBU">
    <wsdl:port binding="myODB:ODB_XMLBinding" name="actionsu">
      <http-conf:server CacheControl="no-cache" />
      <http:address location="http://localhost/odb/odb"; />
    </wsdl:port>    
  </wsdl:service>


   There is no error when it start, and durring a request.
   But there is somme trace in the escape Methode of my.test.escape.CDataCEH 
and It is nerver call.

   When I replace  <bean class="my.test.escape.CDataCEH"/> by 
<value>something</value>
   there is an error during output, syaing that "something" is not an instance 
of "characterEscapeHandler". So that's ok, this configuration is use.
   Why the escape methode is never call ?

Many thanks.
JP


      
__________________________________________________________________________________________________
Ne pleurez pas si votre Webmail ferme ! Récupérez votre historique sur Yahoo! 
Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html

Reply via email to