The easiest way is to add a package-info.java to the package the beans are in that has something like: @javax.xml.bind.annotation.XmlSchema(namespace = "http://domain.test.com/") package com.test.domain;
That should take care of it. If not, you'll need to add @XmlRootElement and @XmlType annotations to the SampleA/SampleB beans to definte the targetNamespaces for those beans. Dan On Fri September 11 2009 9:47:57 pm zem_user wrote: > I am trying to add custom classes using the "jaxb.additionalContextClasses" > property on JaxWsServerFactoryBean. The resulting WSDL file lists the added > classes under the schema section but doesn't reflect the appropriate > namespace. > > This is my service interface and its implementation. > http://www.nabble.com/file/p25410793/TestWebservice.java > TestWebservice.java > http://www.nabble.com/file/p25410793/TestWebserviceImpl.java > TestWebserviceImpl.java > > This is the service factory which configures the JaxWsServerFactoryBean. > http://www.nabble.com/file/p25410793/TestWebserviceFactory.java > TestWebserviceFactory.java > > These are the sample classes that i make available using the > "jaxb.additionalContextClasses" property. > http://www.nabble.com/file/p25410793/SampleA.java SampleA.java > http://www.nabble.com/file/p25410793/SampleB.java SampleB.java > > This is the Spring configuration file. > http://www.nabble.com/file/p25410793/beans.xml beans.xml > > And this is the web.xml. > http://www.nabble.com/file/p25410793/web.xml web.xml > > I am using CXF 2.2.3 on JBoss 4.2.3. This is the resulting WSDL i see. > http://www.nabble.com/file/p25410793/test.wsdl test.wsdl > > Notice that the type definition for SampleA and SampleB is under the > namespace "http://test.com/" as opposed to "http://domain.test.com/". Is > there a way to ensure that the schema definition for the custom classes > have their own namespace? > > Thanking you in advance, > Zem_User > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
