问题描述
<?xmlversion="1.0"encoding="UTF-8"?><projectname="GenerateWSDLfromSessionBeansasWebServices"default="j2w-all"basedir="."><propertyname="build.dir"value="..bin"/><propertyname="axis.dir"location="C:/axis-1_4/"/><pathid="classpath.id"><filesetdir="${axis.dir}/lib"><includename="*.jar"/></fileset><!--pathelementlocation="C:/bea/wlserver_10.3/server/lib/weblogic.jar"/--><pathelementlocation="${build.dir}"/></path><taskdefname="axis-java2wsdl"classname="org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask"loaderref="axis"><classpathrefid="classpath.id"/></taskdef><targetname="j2w-all"><antcalltarget="j2w-UserLoginService"/></target><targetname="j2w-UserLoginService"><axis-java2wsdlclassname="com.passwordBean"classpath="${build.dir}"methods="passworldtext"output="AxisService.wsdl"location="http://localhost:8080/webTomcat/services/passwordBean"namespace="http://localhost:8080/webTomcat/services/passwordBean"namespaceImpl="http://localhost:8080/webTomcat/services/passwordBean"></axis-java2wsdl></target><!--targetname="j2w-UserLoginJdkService"><axis-java2wsdlclassname="com.ejb.s</axis-java2wsdl></target--></project>这是我在服务器端写的build.xml以生成WSDL文件,但是在客户端调用却报404错误:AxisFaultfaultCode:{http://xml.apache.org/axis/}HTTPfaultSubcode:faultString:(404)/webTomcat/services/passwordBeanfaultActor:faultNode:faultDetail:{}:returncode:404<html><head><title>ApacheTomcat/5.0.28-Errorreport</title><style><!--H1{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}H2{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}H3{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}BODY{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}P{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A{color:black;}A.name{color:black;}HR{color:#525D76;}--></style></head><body><h1>HTTPStatus404-/webTomcat/services/passwordBean</h1><HRsize="1"noshade="noshade"><p><b>type</b>Statusreport</p><p><b>message</b><u>/webTomcat/services/passwordBean</u></p><p><b>description</b><u>Therequestedresource(/webTomcat/services/passwordBean)isnotavailable.</u></p><HRsize="1"noshade="noshade"><h3>ApacheTomcat/5.0.28</h3></body></html>{http://xml.apache.org/axis/}HttpErrorCode:404(404)/webTomcat/services/passwordBeanatorg.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)atorg.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)atorg.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)atorg.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)atorg.apache.axis.SimpleChain.invoke(SimpleChain.java:83)atorg.apache.axis.client.AxisClient.invoke(AxisClient.java:165)atorg.apache.axis.client.Call.invokeEngine(Call.java:2784)atorg.apache.axis.client.Call.invoke(Call.java:2767)atorg.apache.axis.client.Call.invoke(Call.java:2443)atorg.apache.axis.client.Call.invoke(Call.java:2366)atorg.apache.axis.client.Call.invoke(Call.java:1812)atlocalhost.webTomcat.services.passwordBean.PasswordBeanSoapBindingStub.passworldtext(PasswordBeanSoapBindingStub.java:95)atcom.cn.client.Client.main(Client.java:17)问一下这是我在build.xml文件里本地文件调用地址写错或是域名空间地址写错了。
解决方案
解决方案二:
不好意思,路过,但不知道