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
"/>*
* </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]>

> 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]> 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
> > "/>*
> > * </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]>
> >
> >> Hi
> >>>
> >>> On Thu, Jun 23, 2011 at 9:04 AM, Julien <[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
> >>> ",
> >>> "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
>
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="ServiceValiderInterventionPIDISoapBindingImplService" targetNamespace="http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<import namespace="http://s2f1.validationcri.entree.metierexterne.pidi.francetelecom.com/"; schemaLocation="ServiceValiderInterventionPIDIS2F1.xsd" />
</schema>
  </wsdl:types>
  <wsdl:message name="validationCRI">
    <wsdl:part element="tns:validationCRI" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="validationCRIResponse">
    <wsdl:part element="tns:validationCRIResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="ServiceFaultS2F1">
    <wsdl:part element="tns:ServiceFaultS2F1" name="ServiceFaultS2F1">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ServiceValiderInterventionPIDI">
    <wsdl:operation name="validationCRI">
      <wsdl:input message="tns:validationCRI" name="validationCRI">
    </wsdl:input>
      <wsdl:output message="tns:validationCRIResponse" name="validationCRIResponse">
    </wsdl:output>
      <wsdl:fault message="tns:ServiceFaultS2F1" name="ServiceFaultS2F1">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceValiderInterventionPIDISoapBindingImplServiceSoapBinding" type="tns:ServiceValiderInterventionPIDI">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"; />
    <wsdl:operation name="validationCRI">
      <soap:operation soapAction="urn:ValidationCRI" style="document" />
      <wsdl:input name="validationCRI">
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output name="validationCRIResponse">
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="ServiceFaultS2F1">
        <soap:fault name="ServiceFaultS2F1" use="literal" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ServiceValiderInterventionPIDISoapBindingImplService">
    <wsdl:port binding="tns:ServiceValiderInterventionPIDISoapBindingImplServiceSoapBinding" name="ServiceValiderInterventionPIDISoapBindingImplPort">
      <soap:address location="http://pidi.vente.francetelecom.fr/pidiG2R1/servicescxf/ServiceValiderInterventionPIDIS2F1"; />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Reply via email to