cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cantalou89 <cantalo...@gmail.com>
Subject StaxTransformFeature outTransformElements problem
Date Sun, 14 Oct 2012 15:57:25 GMT
Hi all,
I encounter a problem when I used cxf 2.6.2 .
I used StaxTransformFeature with configuration '<entry key="{http://www.chinamobile.com/vgop/serviceorder/v1_0}result"
value="result" />' to remove result element's namespace befor the soap message responsed
to client. Althought the result element's namespace has removed , but the namespace description
xmlns:ns2="http://www.chinamobile.com/vgop/serviceorder/v1_0 of <ns2:subscribeServCfmResponse>
also has been removed, it is not what i want . I just want to replce <ns2:result> of
<result> , so how could i do? Thanks .

The spring configuration below:
<jaxws:endpoint id="UserOrderServer" address="/UserOrderServer.jws" implementor="com.funo.ehealth.ws.UserOrderServerImpl">

  <jaxws:outInterceptors>
    <bean name="useForStaxTransformFeature" class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"></bean>
  </jaxws:outInterceptors>
  
  <jaxws:features>
   <bean class="org.apache.cxf.feature.LoggingFeature" />
   <bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature">
     <property name="outTransformElements">
       <map>
        <entry key="{http://www.chinamobile.com/vgop/serviceorder/v1_0}result" value="result"
/>
       </map>
     </property>
    </bean>
  </jaxws:features>
</jaxws:endpoint>

Before I enable the StaxTransformFeature , the clien received a soap message like below:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Header/>
  <soap:Body>
    <ns2:subscribeServCfmResponse xmlns="http://www.chinamobile.com/vgop/serviceorder/v1_0/common"
xmlns:ns2="http://www.chinamobile.com/vgop/serviceorder/v1_0">
     <ns2:SubscribeServCfmResp>
      <ns2:result>0</ns2:result>
     </ns2:SubscribeServCfmResp>
   </ns2:subscribeServCfmResponse>
  </soap:Body>
</soap:Envelope> 

AfterI enable the StaxTransformFeature , the clien received a soap message like below:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Header/>
  <soap:Body>
    <ns2:subscribeServCfmResponse xmlns="http://www.chinamobile.com/vgop/serviceorder/v1_0/common"
>
     <ns2:SubscribeServCfmResp>
      <result>0</result>
     </ns2:SubscribeServCfmResp>
   </ns2:subscribeServCfmResponse>
  </soap:Body>
</soap:Envelope>




cantalou89
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message