正常流程查看:http://www.blogjava.net/nokiaguy/archive/2009/01/02/249556.html
axis2.war部署到 jboss4.2.3出现的问题。
java.io.FileNotFoundException:
F:jboss-4.2.3.GAserverdefault.deployaxis2.warWEB-INF (拒绝访问。)
解决办法:
修改文件:conf/axis2.xml,删除下列行:
<deployer extension=".jar" directory="servicejars"
class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
生成客户端:
1、将axis-bin下的lib目录下的lib拷贝到某个目录:如D:\javaSoftware\axis-1_4
2、编写bat文件,内容如下:
set LibPath=D:\javaSoftware\axis-1_4
set AxisClassPath=%LibPath%\axis.jar;%LibPath%\commons-logging.jar;%LibPath%\commons-
discovery.jar;%LibPath%\jaxrpc.jar;%LibPath%\saaj.jar;%LibPath%\wsdl4j.jar;
set WSDL2JavaCommand=java -classpath %AxisClassPath% org.apache.axis.wsdl.WSDL2Java
set WsDeploy=-sset WSDL2JavaCommand=java -classpath %AxisClassPath%
org.apache.axis.wsdl.WSDL2Java
set WsDeploy=-s
%WSDL2JavaCommand% %WsDeploy% test.wsdl
调用bat文件,生成客户端文件
编写客户端测试文件
package ws.client;
public class Client
{
public static void main(String[] args) throws Exception
{
MyServiceLocator service = new MyServiceLocator();
MyServicePortType stub = service.getmyServiceHttpSoap12Endpoint();
System.out.println(stub.getGreeting("wolao"));
}
}
axis2.war部署到 jboss4.2.3出现的问题。
java.io.FileNotFoundException:
F:jboss-4.2.3.GAserverdefault.deployaxis2.warWEB-INF (拒绝访问。)
解决办法:
修改文件:conf/axis2.xml,删除下列行:
<deployer extension=".jar" directory="servicejars"
class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
生成客户端:
1、将axis-bin下的lib目录下的lib拷贝到某个目录:如D:\javaSoftware\axis-1_4
2、编写bat文件,内容如下:
set LibPath=D:\javaSoftware\axis-1_4
set AxisClassPath=%LibPath%\axis.jar;%LibPath%\commons-logging.jar;%LibPath%\commons-
discovery.jar;%LibPath%\jaxrpc.jar;%LibPath%\saaj.jar;%LibPath%\wsdl4j.jar;
set WSDL2JavaCommand=java -classpath %AxisClassPath% org.apache.axis.wsdl.WSDL2Java
set WsDeploy=-sset WSDL2JavaCommand=java -classpath %AxisClassPath%
org.apache.axis.wsdl.WSDL2Java
set WsDeploy=-s
%WSDL2JavaCommand% %WsDeploy% test.wsdl
调用bat文件,生成客户端文件
编写客户端测试文件
package ws.client;
public class Client
{
public static void main(String[] args) throws Exception
{
MyServiceLocator service = new MyServiceLocator();
MyServicePortType stub = service.getmyServiceHttpSoap12Endpoint();
System.out.println(stub.getGreeting("wolao"));
}
}