作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 ksoap2 将数据集值传递到 .net Web 服务。我想将数据集从 Android(客户端)发送到服务器。
需要的请求是这样的:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<myDSTestFun xmlns="http://tempuri.org/">
<dstest>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table1">
<xs:complexType>
<xs:sequence>
<xs:element name="DEPCD" type="xs:string" minOccurs="0" />
<xs:element name="DEPNAME" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table1 diffgr:id="Table11" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<DEPCD>001</DEPCD>
<DEPNAME>IT</DEPNAME>
</Table1>
<Table1 diffgr:id="Table12" msdata:rowOrder="1" diffgr:hasChanges="inserted">
<DEPCD>002</DEPCD>
<DEPNAME>PM</DEPNAME>
</Table1>
</NewDataSet>
</diffgr:diffgram>
</dstest>
</myDSTestFun>
</soap:Body>
</soap:Envelope>
如何创建上述请求并将其发送到 .net Web 服务?
最佳答案
我在没有使用 ksoap2 的情况下做过一次。为此,您可以创建一个支持调用soap请求的映射器类。 You can find here how to send soap request on android without ksoap2 library.
关于java - 如何将数据集值传递给 dotnet Web 服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8409786/
我是一名优秀的程序员,十分优秀!