Hi Daniel,
That did the trick. I did generate the code with wsdl2java, but the last
part is the hookup through Spring with your local service class. That's
where it went wrong.
Thanks for helping me.
Regarding CXF: just throwing a nullpointer when there is some config
issue: it all could all be a lot more helpful. E.g. listing possible
causes when this kind of thing happens.The same thing with the service
not found because of namespace isssues. Not very well documented for the
newbies.
For posterity, this is my spring config that works.
I generated the java stubclasses throguh
wsdl2java
<?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:jaxws="http://cxf.apache.org/jaxws"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<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.wsdl"
xmlns:ns="urn:ec.europa.eu:taxud:vies:services:checkVat"
name="ns:checkVatService"
endpointName="ns:checkVatPort"
serviceName="ns:checkVatService"
/>
</beans>
Service inteface:
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
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/checkVatService",
name="urn:ec.europa.eu:taxud:vies:services:checkVat")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface CheckVatService {
@WebMethod(operationName="checkVat")
public CheckVatResponse checkVat(@WebParam CheckVat params);
}
Cheers,
Marc
On 27-7-2010 20:47, Daniel Kulp wrote:
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
--
M.Schipperheyn
/Principal Consultant/
Orange bits
www.orangebits.nl <http://www.orangebits.nl> t: +31 6 218 03 003
[email protected] <mailto:[email protected]> skype: orangebits