Have you created your client side JAR that contains all the classes to include also having the WSDL and any XSDs packaged in a /META-INF/wsdl location - where they are "localized" with the classes that were generated from them. This avoids the "over the wire call" to get the WSDL itself.
This thread might help: http://metro.1045641.n5.nabble.com/JAX-WS-clients-td5709817.html There is also a wealth of information on JAX-WS client and server development on Glen Mazza's weblog http://www.jroller.com/gmazza/entry/blog_article_index Mark On Fri, Jul 26, 2013 at 10:21 AM, bhaskerhari <[email protected]> wrote: > 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. >
