Am Dienstag, den 17.07.2007, 12:07 -0400 schrieb James Royalty: > Hi, > > I'm starting a project using CXF and having a couple of newbie issues. > Hoping someone can shed some light on these. > > First, I'm doing Java-first development, using WS and JAXB annotations. > I'm publishing into a servlet container (Tomcat). My service publishes > fine, but I'm interested in changing some defaults in the generated > WSDL. Here's a sample: > > <wsdl:definitions name="Auth" targetNamespace="http://auth.foo.bar/"> > <wsdl:import > location="http://localhost:8080/cxf/services/Auth?wsdl=AuthenticationService.wsdl" > > namespace="http://foo.bar.namespace"> > </wsdl:import> > > 1) How can I set the targetNamespace of the wsdl:definitions element, > other than using the cmdline utility?
The @WebService annotation has a targetNamespace that might help you: https://jax-ws.dev.java.net/jax-ws-ea3/docs/annotations.html#2.1% 20javax.jws.WebService%7Coutline > 2) How can I prevent the use of wsdl:import and just have the contents > of that URL inline? No idea. I wonder if the Sun JAX-WS RI would do the same thing here though. > 3) Is it possible, when publishing to a servlet, to provide endpoint URL > manually? I'm reading Mark Hansen's "SOA using Java Web Services" book right now (not a bad book, BTW.) He discusses this in Chapter 8; apparently much of this is app server-dependent, but two references for this he gives are Section 14.4.2 of the JSR 154 (Servlet 2.5 spec) and Section 5.3 of JSR 109 - Web Services for Java EE spec. Both are downloadable from the JCP site. HTH, Glen
