你使用生成地址是 使用http://192.168.1.213:8080/axis2/services/AccountService?wsdl
或者修改生成的代码
将 http://localhost:8080/axis2/services/AccountService的 地方修改为
http://192.168.1.213:8080/axis2/services/AccountService首先在本地测试 如果成功
在 远程测试 如果 不成功 请关闭防火墙 或打开 http 8080 端口
或者修改生成的代码
将 http://localhost:8080/axis2/services/AccountService的 地方修改为
http://192.168.1.213:8080/axis2/services/AccountService首先在本地测试 如果成功
在 远程测试 如果 不成功 请关闭防火墙 或打开 http 8080 端口
解决方案 »
- eclipse+ant+subversion的问题,头都大了,搞了三天没结果......求高手啊!!!
- 高分求,关于dao层面向对象增删查改传递bean参数为基本数据类型时处理方式的疑问
- hql order by 问题
- hibernate报错duplicate property mapping: course
- java跟控制台程序之间的通信问题
- 问个LINUX系统下java程序监控的问题,各位高手进,小弟跪求,十万火急!!!
- Hibernate中插入数据问题
- 十一大家准备干什么去啊?没有打算的请进~~~
- 谁用JAVA做过交换机的应用,请指教
- js闭包理解
- hibernate错误,请大家帮忙解决下
- 【散分】不学java web开发了,886
我在本地测试成功,在局域网的其他机器是用http://192.168.1.213:8080/axis2/services/AccountService?wsdl生成的客户端代码,调用也是用http://192.168.1.213:8080/axis2/services/AccountService,就是不行,报上面的错误。
http://192.168.1.213:8080/axis2/services/AccountService?wsdl 当然可以访问啦,我都是通过这个在客户机生成客户端代码的。
<wsdl:definitions xmlns:axis2="http://account" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://account/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://account"><wsdl:documentation>AccountService</wsdl:documentation><wsdl:types><xs:schema xmlns:ns="http://account/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://account/xsd">
<xs:element name="checkInput">
<xs:complexType>
<xs:sequence>
<xs:element name="money" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="checkInputResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="setAccountID">
<xs:complexType>
<xs:sequence>
<xs:element name="id" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="setAccountIDResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="deposit">
<xs:complexType>
<xs:sequence>
<xs:element name="money" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="depositResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAccountResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="withdraw">
<xs:complexType>
<xs:sequence>
<xs:element name="money" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="withdrawResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
将网上几个 实用的 Web Service 用eclipse axis2 插件生成stub,客户端测试也没出现过什么问题。
可能是客户端代码没生成好导致,仔细检查一下看看