2013-04-15 1 views
0

스프링 프로젝트에서 JAXWS를 사용하여 서버와 통신하고 있으며 응용 프로그램 컨텍스트 xml에 XSD 읽기 오류가 있습니다. 여기에 애플리케이션 컨텍스트입니다 -Spring 'application-context'XSD 스키마 읽기 문제

<?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:p="http://www.springframework.org/schema/p" 
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:ws="http://jax-ws.java.net/spring/core" 
    xmlns:wss="http://jax-ws.java.net/spring/servlet" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 

    //**error at this below line -** **cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'wss:binding'.** 
    <wss:binding url="/hello"> 
    <wss:service> 
     <ws:service bean="#helloWs"/> 
    </wss:service> 
    </wss:binding> 

    <!-- Web service methods --> 
    <bean id="helloWs" class="com.mkyong.ws.HelloWorldWS"> 
    <property name="helloWorldBo" ref="HelloWorldBo" /> 
    </bean> 

    <bean id="HelloWorldBo" class="com.mkyong.bo.impl.HelloWorldBoImpl" /> 

어느 한 날이 오류 및 솔루션의 이유가 될 수 있는지 알려 주시기 바랍니다 수 있습니다. 어떤 도움을 주셔서 감사합니다.

+0

동일한 문제입니까? http://stackoverflow.com/questions/14741729/jax-ws-schema-http-jax-ws-dev-java-net-spring-servlet-xsd-not-able-to -be-found – OQJF

답변

3

을? 저도 같은 문제가 있었다,하지만 난 내 받는다는 봄 - 잭스 - WS를 포함하면 해결 문제 종속성 실제로, META-INF/spring.schemas 파일이 XSD 위치를 재정의하고 있다는 것을 그 항아리에서 볼 수 있습니다 :

http : //jax-ws.java.net/spring/core.xsd=spring -jax-ws-core.xsd http : //jax-ws.java.net/spring/servlet.xsd=spring-jax-ws-servlet.xsd http : //jax-ws.java.net /spring/local-transport.xsd=spring-jax-ws-local-transport .xsd

도움이 되었으면합니다.

+0

u가 동일하게 추가 한 항아리 목록을 알려주시겠습니까? – Krishna

3

왜 당신이 다음 XML 시도하지 말라 : 당신은 당신의 프로젝트에 스프링을 사용하는

<?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-2.5.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-3.0.xsd"> 

<wss:binding url="/hello"> 
<wss:service> 
    <ws:service bean="#helloWs"/> 
</wss:service> 
</wss:binding> 

<!-- Web service methods --> 
<bean id="helloWs" class="com.mkyong.ws.HelloWorldWS"> 
<property name="helloWorldBo" ref="HelloWorldBo" /> 
</bean> 
<bean id="HelloWorldBo" class="com.mkyong.bo.impl.HelloWorldBoImpl" /> </beans> 
+0

동일한 오류가 발생하여 XML을 프로젝트로 바꿨습니다. 이제 다음과 같은 오류가 있습니다 : ServletContext 리소스 [/WEB-INF/applicationContext.xml]에서 XML 문서의 줄 1이 잘못되었습니다. 상자의 예외는 org.xml.sax.SAXParseException입니다. systemId : http://jax-ws.java.net/spring/servlet.xsd; lineNumber : 1; columnNumber : 1; 파일 조기 종료. –

+0

아마도 복사 및 붙여 넣기로 인해 흰색 문자 문제 일 수 있습니다. 파일을 수동으로 업데이트하십시오. – luksmir