我按照网上的说明开始做,在eclipse->open run dialog里面运行成功了,可是我在部署到tomcat上时遇到了很多麻烦

1jar包的导入网上说只要把apache-cxf-2.1-incubator-SNAPSHOT\lib下的jar包复制到tomcat/

shared/lib底下就行了,另外我还把catalina.properties里面的shared.loader赋值为$

{catalina.home}/shared,${catalina.home}/shared/*.jar。可是tomcat还是不能加载那些

jar包,最后我只好把这些jar包弄到tomcat/lib下了,虽然能运行了,但我知道这样不好,希望明白人指导一下

2 war在tomcat上的部署 我把wsdl文件build package之后生成war文件,发现该war文件里面没有classes这个文件

夹(我的工程的defaultoutputfolder是WebContent/WEB-INF/classes),所以我即使部署到tomcat

下也缺少classes文件夹,而导致加载我自己编写的java文件失败而不能运行。于是我就把我工程下的classes文件夹直接拷到tomcat下

的指定工程下,虽然tomcat能启动了,但是我感觉这是凑的,没找到病根。而且一重新启动服务器,就又没了 苦啊

3 tomcat用上面的办法勉强部署成功了,可是一运行client就报错如下

信息:CreatingService{http://

bishe.wzw.bupt/}ScientificCalculatorServicefromclass

bupt.wzw.bishe.ScientificCalculator

1.2+3.6=2008-4-1017:49:46

org.apache.cxf.phase.PhaseInterceptorChaindoIntercept

信息:Interceptorhasthrownexception,unwindingnow

org.apache.cxf.interceptor.Fault:CouldnotsendMessage.

atorg.apache.cxf.interceptor.MessageSenderInterceptor

$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java­:

64)

at

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai­n.java:

220)

atorg.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)

atorg.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)

atorg.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:

73)

atorg.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:

177)

at$Proxy32.add(UnknownSource)

at

bupt.wzw.bishe.ScientificCalculatorClient.main(ScientificCalculatorClient.j­ava:

31)

...

我编的这个小程序就是实现一个计算器的功能,差不多就是1.2+3.6=4.8的那个意思

在之前我搜了一下,有过类似的错误说是修改client-bean.xml,可是我的项目没加spring等一些东西,没有这些配置文件。

有个cxf-servlet.xml,还有个点错

<jaxws:endpoint

id="JiSuanQiII_xml_bare"

implementor="bupt.wzw.bishe.ScientificCalculatorImpl"

wsdlLocation="WEB-INF/wsdl/JiSuanQiII.wsdl"

address="/JiSuanQiII">

<jaxws:features>

<beanclass="org.apache.cxf.feature.LoggingFeature"/>

</jaxws:features>

</jaxws:endpoint>

旁边报错为thematchingwildcardisstrict,butnodeclarationcanbefound

fortheelement'jaxws:endpoint'但是前几次不在tomcat下运行没报错,部署tomcat时也没出错,我就没

管他

望各位明白人告之...

不胜感激