java tec sky
http://ws.apache.org/axis/
http://ws.apache.org/axis/download.cgi
2. unpack to d:/axis-1_1
Given a WSDL file of a web service you can manually code a client based on your understanding of WSDL document or you can use a tool to do that for you. This is very handy when WSDL is very complex. Axis provides such tool. Here is the command that you can run on GoogleSeach.wsdl.
java org.apache.axis.wsdl.WSDL2Java --verbose GoogleSearch.wsdl
Make sure that you have axis.jar file in your classpath while executing this command, as that is where org.apache.axis.wsdl.WSDL2Java resides.
You will find a number of .java files generated in a subdirectory named GoogleSearch. These are the stub files or wrapper classes. The wrapper classes allow you to code in java data types and convert them transparently to XML.
在網上google 一個有效的wsdl:http://www.webservicex.com/stockquote.asmx?WSDL
運行測試:D:\projects\test\webservice\classes>java -classpath %classpath%;.;NET.webserviceX.www.*; Test
D:\projects\test\webservice\classes>成功了。:)
這樣,就完成了對.NET WebService端的調用。
(data filetype:mdb)
方向:分布式系統設計
posted on 2005-03-07 15:52 java光環 閱讀(5827) 評論(3) 編輯 收藏 所屬分類: webservice
好文章! 補充一下: 對方的wsdl 文件 就是xml 文件,在文件中說明了,這個webservice 提供了那些方法可以調用。 然后 生成工具根據 wsdl文件 的描述,生成相應的骨架代碼 用骨架代碼 就能寫程序了 回復 更多評論
好好啊! 受益匪淺! 回復 更多評論
請問,我用JBUILDER2006自動生成客戶端然后在想在JSP中調用,可是總是不能實例化類是為什么,如果不能實例化類那怎么調用里面的方法取出來數值呢 回復 更多評論
Powered by: BlogJava Copyright © java光環