2013-06-25 13 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> 

Sto usando Maven per creare l'applicazione. Dopo l'installazione di mvn clean e di mvn, distribuisco l'applicazione in Tomcat, dopo di che viene visualizzato il seguente errore "La riga 11 nel documento XML dalla risorsa ServletContext [/WEB-INF/classes/cxf-beans.xml] non è valida; l'eccezione nidificata è org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: il carattere jolly corrispondente è rigoroso, ma non è possibile trovare alcuna dichiarazione per l'elemento 'jaxws: endpoint'. 'Errore Parser cxf-beans.xml nessuna dichiarazione può essere trovata per elemento 'jaxws: endpoint'

risposta

7

Le configurazioni della vostra molla sono perfette. Quindi l'unico motivo per cui ho potuto pensare è che ti manca una di queste dipendenze nel classpath (molto probabilmente 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> 

Assicurarsi che li avete nel vostro pom.xml e dovrebbe funzionare.

+0

Grazie mille paolo. Verificherà e ti aggiornerà uno lo stesso – bharanitharan

+0

Ha funzionato come un campione. In realtà ho appena iniziato a usare Maven. – bharanitharan

Problemi correlati