namespaces - JAX-WS Spring premature end of file. Line 1 XML -
im using jax-ws spring , applicationcontext not show errors, when start tomcat generates xml error.
my applicationcontext:
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:ws="http://jax-ws.dev.java.net/spring/core" xmlns:wss="http://jax-ws.dev.java.net/spring/servlet" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://jax-ws.dev.java.net/spring/core http://jax-ws.java.net/spring/core.xsd http://jax-ws.dev.java.net/spring/servlet http://jax-ws.java.net/spring/servlet.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <wss:binding url="/hello"> <wss:service> <ws:service bean="#hellows"/> </wss:service> </wss:binding> <!-- web service methods --> <bean id="hellows" class="br.com.myproject.ws.helloworldws"> <property name="helloworldbo" ref="helloworldbo" /> </bean> <bean id="helloworldbo" class="br.com.myproject.ws.helloworldboimpl" /> </beans>
this error generated:
grave: exception sending context initialized event listener instance of class org.springframework.web.context.contextloaderlistener org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 1 in xml document servletcontext resource [/web-inf/applicationcontext.xml] invalid; nested exception org.xml.sax.saxparseexception: premature end of file. @ org.springframework.beans.factory.xml.xmlbeandefinitionreader.doloadbeandefinitions(xmlbeandefinitionreader.java:396)
ok, schema definition location, missing dev.
part core , servlet xsd jaxws definition.
it should below:
http://jax-ws.dev.java.net/spring/core http://jax-ws.dev.java.net/spring/core.xsd http://jax-ws.dev.java.net/spring/servlet http://jax-ws.dev.java.net/spring/servlet.xsd
the above problem resolved.
Comments
Post a Comment