Apache CXF alguem ae pode me ajudar?

0 respostas
fabioebner

Pessoal comecei a mexer com o apache cfx e fiz o seguinte:

package br.com.dnasolution.interfaces;

import javax.jws.WebService;

@WebService
public interface HelloWorld {
    String sayHi(String text);
}
package br.com.dnasolution.classes;

import br.com.dnasolution.interfaces.HelloWorld;
import javax.jws.WebService;

@WebService(endpointInterface = "br.com.dnasolution.interfaces.HelloWorld", 
            serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld {

    public String sayHi(String text) {
        return "Hello " + text;
    }
}
<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.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 address="http://localhost/HelloWorld"
    serviceName="t:HelloWorld"
    xmlns:t="urn:my:namespace">
    <jaxws:implementor>
      <bean class="br.com.dnasolution.classes.HelloWorldImpl"/>
    </jaxws:implementor>
  </jaxws:endpoint>

</beans>

qdo eu mando ele dar o build (utilizo Netbeans)

ele me traz o seguinte erro:

Copying 1 file to D:\desenvolvimento\java\netbeans\WebServiceTeste\build\web\WEB-INF\lib
Copying 1 file to D:\desenvolvimento\java\netbeans\WebServiceTeste\build\web\WEB-INF\lib
library-inclusion-in-manifest:
Compiling 2 source files to D:\desenvolvimento\java\netbeans\WebServiceTeste\build\web\WEB-INF\classes
wsgen-init:
Created dir: D:\desenvolvimento\java\netbeans\WebServiceTeste\build\generated\wsgen\service
Created dir: D:\desenvolvimento\java\netbeans\WebServiceTeste\build\generated\wsgen\binaries
wsgen-HelloWorld:
Problem encountered during annotation processing; 
see stacktrace below for more information.
java.lang.NoSuchMethodError: com.sun.xml.bind.api.JAXBRIContext.mangleNameToPropertyName(Ljava/lang/String;)Ljava/lang/String;
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.writeMember(WebServiceWrapperGenerator.java:608)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.writeMembers(WebServiceWrapperGenerator.java:451)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:260)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:125)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:435)
        at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:360)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:326)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:96)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitInterfaceDeclaration(WebServiceVisitor.java:118)
        at com.sun.tools.apt.mirror.declaration.InterfaceDeclarationImpl.accept(InterfaceDeclarationImpl.java:32)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.inspectEndpointInterface(WebServiceVisitor.java:406)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:139)
        at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:326)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:267)
        at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
        at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
        at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
        at com.sun.tools.apt.main.Main.compile(Main.java:1102)
        at com.sun.tools.apt.main.Main.compile(Main.java:964)
        at com.sun.tools.apt.Main.processing(Main.java:95)
        at com.sun.tools.apt.Main.process(Main.java:85)
        at com.sun.tools.apt.Main.process(Main.java:67)
        at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:194)
        at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.tools.ws.Invoker.invoke(Invoker.java:116)
        at com.sun.tools.ws.WsGen.main(WsGen.java:52)
error: compilation failed, errors should have been reported
Command invoked: wsgen C:\java\jdk\jre\bin\java.exe "-Djava.endorsed.dirs=C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api" -classpath "C:\java\jdk\lib\tools.jar;D:\desenvolvimento\java\netbeans\WebServiceTeste\build\web\WEB-INF\classes;C:\java\apache-cxf-2.0.1-incubator\lib\aopalliance-1.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\asm-3.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\bcprov-jdk14-136.jar;C:\java\apache-cxf-2.0.1-incubator\lib\commons-lang-2.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\commons-logging-1.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\cxf-2.0.1-incubator.jar;C:\java\apache-cxf-2.0.1-incubator\lib\cxf-manifest-incubator.jar;C:\java\apache-cxf-2.0.1-incubator\lib\stax-api-1.0.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\XmlSchema-1.2.jar;C:\java\apache-cxf-2.0.1-incubator\lib\spring-beans-2.0.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-ws-metadata_2.0_spec-1.1.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jetty-6.1.5.jar;C:\java\apache-cxf-2.0.1-incubator\lib\velocity-dep-1.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jaxb-impl-2.0.5.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-activation_1.1_spec-1.0-M1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\spring-core-2.0.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\xalan-2.7.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\stax-utils-20060502.jar;C:\java\apache-cxf-2.0.1-incubator\lib\velocity-1.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\wsdl4j-1.6.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\slf4j-api-1.3.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\saaj-impl-1.3.jar;C:\java\apache-cxf-2.0.1-incubator\lib\spring-web-2.0.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\spring-context-2.0.4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jaxws-api-2.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\wstx-asl-3.2.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jetty-util-6.1.5.jar;C:\java\apache-cxf-2.0.1-incubator\lib\wss4j-1.5.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-jms_1.1_spec-1.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jaxb-xjc-2.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-javamail_1.4_spec-1.0-M1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jdom-1.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jaxb-api-2.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\xmlsec-1.3.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\xml-resolver-1.2.jar;C:\java\apache-cxf-2.0.1-incubator\lib\slf4j-jdk14-1.3.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jaxen-1.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-servlet_2.5_spec-1.1-M1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\xml-apis-1.3.02.jar;C:\java\apache-cxf-2.0.1-incubator\lib\saaj-api-1.3.jar;C:\java\apache-cxf-2.0.1-incubator\lib\xbean-2.2.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\js-1.6R5.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jra-1.0-alpha-4.jar;C:\java\apache-cxf-2.0.1-incubator\lib\jettison-1.0-RC2.jar;C:\java\apache-cxf-2.0.1-incubator\lib\neethi-2.0.jar;C:\java\apache-cxf-2.0.1-incubator\lib\geronimo-annotation_1.0_spec-1.1.jar;C:\java\apache-cxf-2.0.1-incubator\lib\servlet-api-2.5-6.1.5.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\activation.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\FastInfoset.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\http.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\jaxb-api.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\jaxb-impl.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\jaxb-xjc.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\jaxws-api.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\jaxws-rt.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\saaj-impl.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\sjsxp.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\resolver.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\stax-ex.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\streambuffer.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\jaxws-tools.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\jsr173_api.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\jsr181-api.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\jsr250-api.jar;C:\Arquivos de programas\NetBeans 6.0 Beta 1\java1\modules\ext\jaxws21\api\saaj-api.jar" com.sun.tools.ws.WsGen -d D:\desenvolvimento\java\netbeans\WebServiceTeste\build\generated\wsgen\binaries -keep -wsdl -r D:\desenvolvimento\java\netbeans\WebServiceTeste\build\generated\wsgen\service -s D:\desenvolvimento\java\netbeans\WebServiceTeste\build\generated\wsgen\service br.com.dnasolution.classes.HelloWorldImpl
D:\desenvolvimento\java\netbeans\WebServiceTeste\nbproject\jaxws-build.xml:17: wsgen failed
BUILD FAILED (total time: 5 seconds)

alguem sabe o pq disso???
obrigado

Criado 20 de setembro de 2007
Respostas 0
Participantes 1