Hi,

> I am trying to use JaxWSProxyFactoryBean without providing the wsdl
> location.
> 
>         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>         factory.setServiceClass(MyService.class);
>         factory.setAddress(myServiceUrl);
> 
>         JAXBDataBinding jaxBDataBinding = new JAXBDataBinding();
>         jaxBDataBinding.setContext(myCustomJAXBContext);
>         factory.setDataBinding(jaxBDataBinding);
> 
>         MyService stub = factory.create(MyService.class);
> 
> This piece of code is throwing an exception :- Caused by:
> org.apache.cxf.service.factory.ServiceConstructionException: Service class
> com.testing.ph.MyService method createOrder part {urn:testing:ph:order}
> CreateOrderRequest cannot be mapped to schema. Check for use of a JAX-
> WS-specific type without the JAX-WS service factory bean.

What is the reason to use custom JAXB context, how you create it?

> If I supply the WSDL URL here, it works absolutely fine (adding the line
> factory.setWsdlLocation(wsdlUrl);). But we had an SSLHandShakeException
> before when we supplied the wsdllocation. So we had to go without giving
> the wsdl url. Any idea what can be done to resolve this error without giving
> the WSDL?

To resolve that you can either 
- package your wsdl with a jar/war and resolve it through classpath instead 
remote URL
- or configure trust keystore to resolve SSLHandShakeException: 
http://stackoverflow.com/questions/6659360/how-to-solve-javax-net-ssl-sslhandshakeexception-error

Regards,
Andrei.

> -----Original Message-----
> From: bhaskerhari [mailto:[email protected]]
> Sent: Freitag, 26. Juli 2013 16:21
> To: [email protected]
> Subject: CXF client with JaxWsProxyFactoryBean without WSDL is throwing
> ServiceConstructionException
> 
> I am trying to use JaxWSProxyFactoryBean without providing the wsdl
> location.
> 
>         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>         factory.setServiceClass(MyService.class);
>         factory.setAddress(myServiceUrl);
> 
>         JAXBDataBinding jaxBDataBinding = new JAXBDataBinding();
>         jaxBDataBinding.setContext(myCustomJAXBContext);
>         factory.setDataBinding(jaxBDataBinding);
> 
>         MyService stub = factory.create(MyService.class);
> 
> This piece of code is throwing an exception :- Caused by:
> org.apache.cxf.service.factory.ServiceConstructionException: Service class
> com.testing.ph.MyService method createOrder part {urn:testing:ph:order}
> CreateOrderRequest cannot be mapped to schema. Check for use of a JAX-
> WS-specific type without the JAX-WS service factory bean.
> 
> If I supply the WSDL URL here, it works absolutely fine (adding the line
> factory.setWsdlLocation(wsdlUrl);). But we had an SSLHandShakeException
> before when we supplied the wsdllocation. So we had to go without giving
> the wsdl url. Any idea what can be done to resolve this error without giving
> the WSDL?
> 
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-client-
> with-JaxWsProxyFactoryBean-without-WSDL-is-throwing-
> ServiceConstructionException-tp5731490.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to