通过调用webservice 如何获取到soap这个协议的xml文件

Oym-D 发布于 2011/03/11 17:31
阅读 3K+
收藏 1

用工具生成了这样一个soap的xml文件

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><SOAP-CHK:Success xmlns:SOAP-CHK = "http://soaptest1/soaptest/" xmlns="urn:candle-soap:attributes"><TABLE name="KLZ.KLZCPU">
<OBJECT>KLZ_CPU</OBJECT>
<DATA>
<ROW>
<Busy_CPU dt="number">10.34</Busy_CPU>
</ROW>
<ROW>
<Busy_CPU dt="number">10.34</Busy_CPU>
</ROW>
</DATA>
</TABLE>
</SOAP-CHK:Success></SOAP-ENV:Body></SOAP-ENV:Envelope>

我怎么能取到这样的一个格式的数据

提供的是这样的一个形式的webservice:http://192.168.32.27:1920///cms/soap/kshwct.wsdl内容如下:这里的.wsdl不是写错了 就是这种后缀名

  <? xml version="1.0" encoding="UTF-8" ?>
- < definitions name =" CT " targetNamespace =" http://tempuri.org/wsdl/ " xmlns:wsdlns =" http://tempuri.org/wsdl/ " xmlns:typens =" http://tempuri.org/type " xmlns:soap =" http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:xsd =" http://www.w3.org/2001/XMLSchema " xmlns:stk =" http://schemas.microsoft.com/soap-toolkit/wsdl-extension " xmlns =" http://schemas.xmlsoap.org/wsdl/ " >
- < types >
- < schema targetNamespace =" http://tempuri.org/type " xmlns =" http://www.w3.org/2001/XMLSchema " xmlns:SOAP-ENC =" http://schemas.xmlsoap.org/soap/encoding/ " xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/ " >
- < complexType name =" RESPONSE " >
- < sequence >
  < any minOccurs =" 0 " maxOccurs =" unbounded " namespace =" #any " processContents =" skip " />
  </ sequence >
  </ complexType >
- < complexType name =" QUERY " >
- < sequence >
  < any minOccurs =" 0 " maxOccurs =" unbounded " namespace =" #any " processContents =" skip " />
  </ sequence >
  </ complexType >
  </ schema >
  </ types >
- < message name =" XMLQuery " >
  < part name =" Query " type =" typens:QUERY " />
  </ message >
- < message name =" XMLResponse " >
  < part name =" Response " type =" typens:RESPONSE " />
  </ message >
- < portType name =" CTSoapPort " >
- < operation name =" CT_Got " parameterOrder =" X " >
  < input message =" wsdlns:XMLQuery " />
  < output message =" wsdlns:XMLResponse " />
  </ operation >
  </ portType >
- < binding name =" CTSoapBinding " type =" wsdlns:CTSoapPort " >
  < stk:binding preferredEncoding =" UTF-8 " />
  < soap:binding style =" rpc " transport =" http://schemas.xmlsoap.org/soap/http " />
+ < operation name =" CT_Got " >
  < soap:operation soapAction =" http://tempuri.org/action/CT.EchoXML " />
- < input >
  < soap:body use =" encoded " namespace =" http://tempuri.org/message/ " encodingStyle =" http://schemas.xmlsoap.org/soap/encoding/ " />
  </ input >
- < output >
  < soap:body use =" encoded " namespace =" http://tempuri.org/message/ " encodingStyle =" http://schemas.xmlsoap.org/soap/encoding/ " />
  </ output >
  </ operation >
  </ binding >
- < service name =" CT " >
- < port name =" CTSoapPort " binding =" wsdlns:CTSoapBinding " >
  < soap:address location =" " />
  </ port >
  </ service >
  </ definitions >

希望有兄台能给予帮助

加载中
0
大苹果
大苹果

webservice:http://192.168.32.27:1920///cms/soap/kshwct.wsdl

很多方式啊. 首先你可以使用各种webservice框架生成客户端.

其次可以用soapui eclipse 等...

0
Oym-D
Oym-D

引用来自#2楼“大苹果”的帖子

webservice:http://192.168.32.27:1920///cms/soap/kshwct.wsdl

很多方式啊. 首先你可以使用各种webservice框架生成客户端.

其次可以用soapui eclipse 等...

不明白

0
大苹果
大苹果

好吧. 您可以去百度或是gg搜索 soapui 使用方式..

也可以去搜索 axis xfire cxf 等...

返回顶部
顶部