On Wed July 22 2009 3:14:39 pm jdmichal wrote: > Thanks for the suggestion. Just a clarification, what class do you mean I > annotate when you say JAX-WS SEI interface?
Normally (but this isn't required), you would have an interface that defines the methods for the service. The @WebService annotation would point to that as the "endpointInterface". In most cases, you can add the XmlSeeAlso to that interface and it will be picked up. Adding it to the actual implementation should also work. Putting it on the interface has an advantage IF you use the the same interface for the client and server as both would be able to pick it up. Dan > > Later today we'll be trying to import the types XSDs to the WSDL, but keep > the xsd:anyType in the message. Hopefully this will be enough for CXF to > hook them up together. > > I should explain that the whole reason of switching to xsd:anyType to start > with was because having these imports (which are massive) in the WSDL was > causing PermGen OutOfMemory errors when generating a proxy via > javax.xml.ws.Service#getPort. Then we found out that the parameter we > thought we were giving the JVM to increase the PermGen space wasn't > actually making it into the JVM. This time we'll try again, but making sure > that parameter gets through. > > ~Justin > > dkulp wrote: > > No idea on the error message. > > > > However, one possible solution that may work for you is to add an > > @XmlSeeAlso > > annotation onto the JAX-WS SEI interface (and/or the impl class) that > > points > > to your jaxb beans that you really would be sending. (or the > > ObjectFactory > > for them) That SHOULD then make sure they are added into the > > JAXBContext that CXF would created. Probably added to the WSDL as well. > > > > Dan > > > > On Tue July 21 2009 6:53:39 pm jdmichal wrote: > >> I am using CXF to transform a WSDL into Java code. My WSDL is defined in > >> XML namespace "http://my.wsdl.namespace" and the files are generated to > >> the > >> Java namespace "my.wsdl.namespace". The WSDL uses "xsd:anyType", and the > >> data elements being sent are in namespace "my.data.namespace". Because > >> the > >> WSDL does not actually contain the data definitions, I am attempting to > >> use > >> a JAXBDataBinding in order to allow the backend to unmarshall the > >> elements > >> into something other than > >> "com.sun.org.apache.xerces.internal.dom.ElementNSImpl". > >> > >> I set a JAXBDataBinding as so in beans.xml: > >> > >> <jaxws:dataBinding> > >> <bean class="org.apache.cxf.jaxb.JAXBDataBinding"> > >> <constructor-arg index="0"> > >> <bean class="javax.xml.bind.JAXBContext" > >> factory-method="newInstance"> > >> <constructor-arg index="0" > >> value="my.wsdl.namespace:my.data.namespace"/> > >> </bean> > >> </constructor-arg> > >> </bean> > >> </jaxws:dataBinding> > >> > >> > >> What I end up seeing in the Tomcat log is this: > >> > >> org.springframework.beans.factory.parsing.BeanDefinitionParsingException > >>: Configuration problem: Unable to locate Spring NamespaceHandler for XML > >> schema namespace [http://my.wsdl.namespace] > >> Offending resource: ServletContext resource [/WEB-INF/beans.xml] > >> > >> > >> Note that the namespace indicated is that of my WSDL file. > >> > >> Any information is appreciated. Been bashing my head against this one > >> for a > >> few hours now. Can find very little useful on the web regarding this. > > > > -- > > Daniel Kulp > > [email protected] > > http://www.dankulp.com/blog -- Daniel Kulp [email protected] http://www.dankulp.com/blog
