应该问题出在delphi程序上吧,你下载fiddler让它在客户端监听请求,然后分别运行java和delphi的webservice客户端,你就会很清楚地比较两者的异同,到底delphi哪里出错了。
解决方案 »
- 小小菜鸟用Swing做的管理工具界面(含源代码)。
- list.get(0)为什么是null的?
- 关于页面list的遍历问题
- 各位高手前来-----指点在线客户系统实现的业务逻辑!!!谢谢!
- 关于jsp中分布图的制作(急!急!急!)
- 怎么用jboss搭建JMS的一个DEMO
- spring+hibernate+oracle处理start with ...connect by ...的问题
- 在8个号码中任意取6个组成一串,不允许重复,将所有可能结果保存在一个字符串数组中,请问如何实现?
- weblogic安装问题,为什么进入console后,左边的快速导航栏是空的,只有一个打叉 的图片?
- 用wsad开发一个管理系统,应该如何进行布局和架构设计?
- 关于JDBC
- 一个ssh分页结构问题
<wsdl:message name="getNameRequest" />
- <wsdl:message name="getNameResponse">
<wsdl:part name="out" type="xsd:string" />
</wsdl:message>
通篇文字里只有message元素,没有任何element元素。而标准的wsdl文件里包含element元素:
- <s:element name="GetString">
<s:complexType />
</s:element>难到真是因为myeclipse生成的wsdl文件格式不对造成上述的错误吗?
而用纯eclipse自动生成的webservice工程的wsdl很标准,不仅java客户端能访问,用delphi,vb也能访问(刚测了)
两者生成的wsdl文件的区别是:myeclipse的没有types标签。而eclipse生成的就有,vb生成的也有。
1,使用纯eclipse随便建立一个java工程,比如叫ddd,
eclipse的版本:wtp-all-in-one-sdk-r-2.0-200706260303-win32.zip
Version: 3.3.0
Build id: I20070625-1500
2,在里面建一个类,一个接口,类里有一个方法返回一个字符串。比如:实现类是:
package com;
public class DDD implements DDDInterface {
public String getName(){
return "dddd";
}
}
3,对工程,new一个other里面的webservice
4,下一步时,选择”Bottom up Java bean Web Service”.
Service implementatiox选择你的实现类。
勾上“Publish the Web service”
5,点击下一步,这个会提示一个错误,不要害怕,“The class "com.DDD" cannot be loaded via project "WebServiceProject". Check that the project contains the class, or that the class is loadable according to the Java Build Path of the project.”,同时,你会发现多了一个工程“WebServiceProject”,这时,你暂停下来,把实现类和接口复制到这个WebServiceProject工程里,然后对这个工程建一个webservice,会发现这次不报错了。
6,这时会看到你想公布的方法,比如“getName()”。就选择“document/literal(wrapped)”,
点击下一步,这时可能会报“\Servers\Tomcat v5.0 Server at localhost-config is missing”,就是忘装tomcat了。装好tomcat,再下一步,正常的话会看到一个按钮“Start server”,点这个按钮。然后就只能点finish了。
在console里会看到一个错误”严重 Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
“别管它没事。
然后测试,应该没问题了。