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

ben Uygulama oluşturmak için Maven kullanıyorum. Mvn temiz ve mvn yüklendikten sonra uygulamayı Tomcat'e dağıttım. Bundan sonra aşağıdaki hatayı alıyorum: "XML belgesinde Satır 11, ServletContext kaynağından [/WEB-INF/classes/cxf-beans.xml] geçersizdir; nested exception org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: Eşleşen joker karakteridir, ancak 'jaxws: endpoint' öğesi için hiçbir bildirim bulunamaz.Ayrıştırıcı Hatası cxf-beans.xml hiçbir beyanı elemanı bulunabilir 'JAXWS: bitiş noktası'

cevap

7

Yay yapılandırmalarınız iyi görünüyor. Yani düşünebildiğim tek nedeni (büyük olasılıkla cxf-rt-frontend-jaxws) Sınıfyolu bu bağımlılıklarından biri eksik olmasıdır:

<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> 

Eğer pom.xml onları olduğundan emin olun ve çalışması gerekir.

+0

Çok teşekkürler paulius. Kontrol edip güncellemeniz için aynı – bharanitharan

+0

Bir şampiyon gibi çalıştı. Aslında daha yeni maven kullanmaya başladım. – bharanitharan

İlgili konular