This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Spring Web Services 2.0.0 RC2 released

This is the second release candidate in the 2.0 release cycle. The most important new feature in this release is the update of the Spring-WS XML namespace, which now contains <sws:annotation-driven/> and <sws:interceptors/>elements (similar to the Spring-MVC namespace), and <sws:static-wsdl/> and <sws:dynamic-wsdl/> for exporting your WSDLs. All of these features are described in the updated reference documentation, which you can find here:

We consider this release (RC2) complete. If no major new issues are found, we will release 2.0.0-RELEASE in the first half of January 2011.

While we did make some changes, Spring-WS 2.0 should be a drop-in replacement for 1.5. The one exception is the 2.0 version of the XSD namespace, where we removed <sws:marshalling-endpoints/> and <sws:xpath-endpoints/> in favor of <sws:anotation-driven/>. To keep using the two former elements, please make sure to use the 1.5 version of the XSD, like so:

Comment

Comment

I have read lot of forums on this topic but no one has clear solution on this?

Does anybody knows a way to integrate header information during the WSDL generation?
--------------------------------------------------------------------------
Do you have any plans to add this near future?

I need to add custom soap Header to include tenant info to make webservices multi- tenant model?

Comment

That's strange, what is the exact error you get? Is it a STS error or a Spring error?

Two things , within STS , if you open the Webservice configuration file where i have defined this annotations e.t.c and go to Namespace tab and click on the webservice name space, it will only show you 1.5 xsd as the default schema.
There is no "error" as such in STS.
Second thing is the deployment fails with below errors. Thanks for your time

Code:

WARN : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/web-services/web-services-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring-ws.xml]
Offending resource: ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 26 in XML document from ServletContext resource [/WEB-INF/spring/appServlet/spring-ws.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ws:interceptors'.
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)

I encountered this problem the other day. It turns out it's a Maven problem with this 2.0.0 RC. I had to go to my local repository. Clean up whatever version of spring-ws I have. Then update the dependencies again.

I tested this on my home computer and at the office with different Eclipse configuration. So I would say it's either a problem with the Maven or there's a conflict with this release.