2013-06-25 15 views
5
<?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:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 
<import resource="classpath:META-INF/cxf/cxf.xml" /> 
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> 
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> 
<jaxws:endpoint xmlns:tns="http://sampleService.viasat.com/" 
id="sampleserviceinterfcae" implementor="com.viasat.sampleservice.SampleServiceInterfcaeImpl" 
    wsdlLocation="wsdl/sampleserviceimplementation.wsdl" endpointName="tns:SampleServiceImplementationPort" 
    serviceName="tns:SampleServiceImplementationService" address="/SampleServiceImplementationPort"> 
<jaxws:features> 
<bean class="org.apache.cxf.feature.LoggingFeature" /> 
</jaxws:features> 
</jaxws:endpoint> 
</beans> 

Używam Mavena do zbudowania aplikacji. Po zainstalowaniu mvn clean i mvn zainstaluję aplikację w Tomcat, po czym otrzymuję następujący błąd: "Wiersz 11 w dokumencie XML z zasobu ServletContext [/WEB-INF/classes/cxf-beans.xml] jest nieprawidłowy; Zagnieżdżony wyjątek to org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: Pasujący symbol wieloznaczny jest ścisły, ale nie można znaleźć deklaracji dla elementu 'jaxws: endpoint'. 'Błąd analizatora składni cxf-beans.xml nie można znaleźć deklaracji dla elementu "jaxws: punkt końcowy"

Odpowiedz

7

Twoje wiosenne konfiguracje wyglądają dobrze. Tak tylko dlatego mogłem pomyśleć, że brakuje jednego z tych zależności w ścieżce klas (najprawdopodobniej cxf-rt-frontend-jaxws):

<dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-bindings-soap</artifactId> 
    <version>${cxf.version}</version> 
    <scope>compile</scope> 
</dependency> 
<dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-transports-http</artifactId> 
    <version>${cxf.version}</version> 
    <scope>compile</scope> 
</dependency> 
<dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-frontend-jaxws</artifactId> 
    <version>${cxf.version}</version> 
    <scope>compile</scope> 
</dependency> 
<dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-rs-extension-providers</artifactId> 
    <version>${cxf.version}</version> 
    <scope>compile</scope> 
</dependency> 

Upewnij się, że masz je w swoim pom.xml i powinno działać.

+0

Wielkie dzięki Pauliuszowi. Sprawdzę i zaktualizuję jeden taki sam – bharanitharan

+0

To działało jak mistrz. Właściwie to właśnie zacząłem używać maven. – bharanitharan

Powiązane problemy