I'm not sure how to resolve the issue at the jaxws:client level, but as far as using StaxTransformfeature is concerned, you need to get jaxws:client referencing it and the feature itself is not configured properly, you are getting an unmarshalling exception on the client side, thus an 'inTransformElement' property should be set

Sergey
hello,

actually, I was on version 2.3.3 of Apache CXF. I'll update to try again.
To give more details on my problem, I'll send the wsdl and xsd's that we need to call the webservice.

Here also our spring configuration and the code in my java client:

file test.xml:

/<?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:sec="http://cxf.apache.org/configuration/security"/
/  xmlns:http="http://cxf.apache.org/transports/http/configuration"/
/  xmlns:jaxws="http://cxf.apache.org/jaxws"/
/  xsi:schemaLocation="/
/           http://cxf.apache.org/configuration/security/
/           http://cxf.apache.org/schemas/configuration/security.xsd/
/           http://cxf.apache.org/transports/http/configuration/
/           http://cxf.apache.org/schemas/configuration/http-conf.xsd/
/   http://cxf.apache.org/jaxws/
/   http://cxf.apache.org/schemas/jaxws.xsd/
/           http://www.springframework.org/schema/beans/
/ http://www.springframework.org/schema/beans/spring-beans.xsd";>/ / <jaxws:client id="ServiceValiderInterventionPIDIS2F1" serviceClass="com.francetelecom.pidi.metierexterne.entree.validationcri.s2f1.ServiceValiderInterventionPIDI" address="https://xxxxx"/>/
/  <http:conduit name="*.http-conduit">/
/ <http:tlsClientParameters secureSocketProtocol="SSL" disableCNCheck="true">/
/ /
/      <sec:keyManagers keyPassword="XXXXX">/
/           <sec:keyStore type="JKS" password="XXXXX" file="XXXXX.jks"/>/
/      </sec:keyManagers>/
/
/
/  </http:tlsClientParameters>/
/   </http:conduit>/
/ <bean id="transformFeature" class="org.apache.cxf.feature.StaxTransfromFeature">/
/    <property name="outTransformElements">/
/ <map>/
/ <entry key="beanReponseTransfertCRI" value="{http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/}beanReponseTransfertCRI <http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/%7DbeanReponseTransfertCRI>"/>/
/ </map>/
/ </property>/
/   </bean>/
/</beans> /

The call of this file:

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"test.xml"}); ServiceValiderInterventionPIDI client = (ServiceValiderInterventionPIDI) context.getBean("ServiceValiderInterventionPIDIS2F1");

best regards

Julien

2011/6/24 Sergey Beryozkin <[email protected] <mailto:[email protected]>>

    Hi  - it's available only in 2.4.0+
    This problem might also be resolved without this feature, but you need
    to give us more info about the relevant schema and WSDL info

    Cheers, Sergey

    On Fri, Jun 24, 2011 at 9:31 AM, Julien Dufourd
    <[email protected] <mailto:[email protected]>> wrote:
    > Hi,
    >
    > I think i understand our problem. Actualy i try to use Spring
    >
    > *   <bean id="transformFeature"
    > class="org.apache.cxf.feature.StaxTransfromFeature">*
    > *    <property name="outTransformElements">*
    > * <map>*
    > * <entry key="beanReponseTransfertCRI" value="{
    >
    
http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/}beanReponseTransfertCRI
    
<http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/%7DbeanReponseTransfertCRI>
    > "/>*
    > * </map>*
    > * </property>*
    > *   </bean>*
    >
    > but i don't know where i can find the
    > *org.apache.cxf.feature.StaxTransfromFeature
    > *class.
    >
    > Do you know where i can find it ?
    >
    > thank you very much
    >
    > Julien
    >
    >
    > 2011/6/23 Sergey Beryozkin <[email protected]
    <mailto:[email protected]>>
    >
    >> Hi
    >>>
    >>> On Thu, Jun 23, 2011 at 9:04 AM, Julien
    <[email protected] <mailto:[email protected]>> wrote:
    >>> > Hi,
    >>> >
    >>> > I have a problem when i call a webservice. We are build our
    client with
    >>> ant (using The xsd and The wsdl That our supplier give us).
    >>> > However we have a error that we don't undestand.
    >>> >
    >>> > Do someone can help us please ?
    >>> >
    >>> > (ps: sorry for my very bad english :/)
    >>> >
    >>> >
    >>> >
    >>> > DefaultValidationEventHandler: [ERROR]: unexpected element
    (uri:"
    >>>
    http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/";,
    >>> local:"beanReponseTransfertCRI"). Expected elements are
    >>> <{}beanReponseTransfertCRI>
    >>> >     Location:  node: [ns2:beanReponseTransfertCRI: null]
    >>> > Exception : javax.xml.ws.soap.SOAPFaultException:
    Unmarshalling Error:
    >>> unexpected element (uri:"
    >>>
    http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/";,
    >>> local:"beanReponseTransfertCRI"). Expected elements are
    >>> <{}beanReponseTransfertCRI>
    >>> >
    >>>
    >>> Consider configuring a JAXWS client with Transform feature:
    >>>
    >>>
    
http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-JAXWS
    >>>
    >>> See the text above that section on how to do the same from Spring.
    >>> Example,
    >>>
    >>> Map<String, String> inTransformMap =  Collections.singletonMap(
    >>> "{
    >>>
    
http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/}beanReponseTransfertCRI
    
<http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/%7DbeanReponseTransfertCRI>
    >>> ",
    >>> "beanReponseTransfertCRI");
    >>> org.apache.cxf.interceptor.transform.TransformInInterceptor
    >>> transformInInterceptor =
    >>>    new
    org.apache.cxf.interceptor.transform.TransformInInterceptor();
    >>> transformInInterceptor.setInTransformElements(inTransformMap);
    >>> client.getInInterceptors().add(transformInInterceptor);
    >>>
    >>> will configure the client to drop a
    >>>
    "http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/";
    >>> namespace from 'beanReponseTransfertCRI'.
    >>>
    >>> Perhaps you can get the above fixed by dealing with the (schema)
    >>> elementFormDefault issue, assuming  it is the cause of the
    problem,
    >>> but the suggested 'fix' can help...
    >>>
    >>> Sergey
    >>>
    >>> >
    >>> >
    >>> >
    >>> >
    >>> >
    >>>
    >>>
    >>>
    >>> --
    >>> Sergey Beryozkin
    >>>
    >>> Application Integration Division of Talend
    >>> http://sberyozkin.blogspot.com
    >>>
    >>
    >>
    >



    --
    Sergey Beryozkin

    Application Integration Division of Talend
    http://sberyozkin.blogspot.com



Reply via email to