I think you are missing an annotation on the SEI:

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)

Again, when starting with a WSDL, it's MUCH better to use wsdl2java to 
generate the interface and types to make sure everything maps correctly.

Dan




On Tuesday 27 July 2010 7:06:53 am Marc Schipperheyn wrote:
> Hi,
> 
> I'm new to CXF and I'm having a lot of problems trying to consume the
> checkVat webservice from the EU
> (http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl)
> 
> After much experimentation I finally got past the can't find exception
> by specifying the xmlns on jaxws bean.
> 
> Generated base code with wsdl2java.
> 
> This is my code now
> package nl.mysite.service;
> 
> import eu.europa.ec.taxud.vies.services.checkvat.types.CheckVat;
> import eu.europa.ec.taxud.vies.services.checkvat.types.CheckVatResponse;
> 
> @WebService(
> 
> targetNamespace="http://ec.europa.eu/taxation_customs/vies/services/checkVa
> tService", name="urn:ec.europa.eu:taxud:vies:services:checkVat")
> public interface CheckVatService {
> 
>      @WebMethod
>      public CheckVatResponse checkVat(@WebParam CheckVat params);
> }
> 
> ApplicationContext.xml
> <jaxws:client id="vatClient"
>          serviceClass="nl.msw.compraventa.service.CheckVatService"
> 
> address="http://ec.europa.eu/taxation_customs/vies/services/checkVatService
> "
> 
> wsdlLocation="http://ec.europa.eu/taxation_customs/vies/checkVatService.wsd
> l" xmlns:ns="urn:ec.europa.eu:taxud:vies:services:checkVat"
>          name="ns:checkVatService"
>          endpointName="ns:checkVatPort"
>          serviceName="ns:checkVatService"
>          />
> 
> I'm getting this error on the vatNumber field when Spring tries to set
> the CheckVatService as a dependency on another bean. No clue why. The
> error message is not particularly helpful either. Don't see any
> difference between the countryCode field that passes correctly and the
> vatNumber field that fails. But then, I'm a newbie at this. A frustrated
> one.
> 
> java.lang.NullPointerException
>      at
> org.apache.cxf.common.util.ASMHelper.getClassCode(ASMHelper.java:91) at
> org.apache.cxf.jaxws.WrapperClassGenerator.generateMessagePart(WrapperClass
> Generator.java:286) at
> org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassG
> enerator.java:235) at
> org.apache.cxf.jaxws.WrapperClassGenerator.generate(WrapperClassGenerator.j
> ava:138) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanCl
> ass(JaxWsServiceFactoryBean.java:608) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsSer
> viceFactoryBean.java:579) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro
> mWSDL(ReflectionServiceFactoryBean.java:426)
> 
> Any ideas?
> 
> Kind regards,
> 
> Marc

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to