cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Uri problem
Date Thu, 23 Jun 2011 11:04:26 GMT
Hi

On Thu, Jun 23, 2011 at 9:04 AM, Julien <julien.dufourd@gmail.com> 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

Mime
View raw message