對方提供web service “deviceChanged”介面,讓我去呼叫。
XML格式:
請求:
<?xml version="1.0" encoding="UTF-8"?>
<request>
<Device>
<deviceId>
<resId></resId>
<physId></physId>
</deviceId >
<type></type>
<vendorId></vendorId>
<vendorDeviceType></vendorDeviceType>
<hardware></hardware>
<software></software>
<description></description>
<splitterRatio></splitterRatio>
<parentDeviceId></parentDeviceId>
<splitterPosition>
<shelfNo></shelfNo>
<moduleNo></moduleNo>
<seq></seq>
</splitterPosition>
<shelfRule></shelfRule>
<shelfDirection></shelfDirection>
</Device>
<changeType></changeType>
<changeLevel></changeLevel>
</request>
對方回傳的
回應:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result>
<isSuccess></isSuccess>
<failReason></failReason>
<remark></remark>
</result>
</response>
soap的包格式好像不是這樣的啊,怎么構建這樣的xml的資料包?
是不是把這個XML檔案做為一個string 引數傳過去嗎?
很急,因為以前沒有做過web service,請各位看看,該怎么做.謝謝啊
uj5u.com熱心網友回復:
作為一個流傳過去。uj5u.com熱心網友回復:
你找點基礎的看看吧,不是一句話能說清楚的。你用的什么編程環境?用2010 new-》other-》webservices 里面選擇第一個,根據向導匯入你這個服務,后面就好做一點了,大概是這個步驟uj5u.com熱心網友回復:
我看到的李維書上soap包的結構:POST /PWADDEMO.ch04DemoServer/soap/IWADDemoService HTTP/1.1
Accept: application/octet-stream, text/xml
Content-Type: text/xml
User-Agent: Borland SOAP 1.1
Host: localhost:1024
Content-Length: 760
Connection: Keep-Alive
Cookie: LastProgID
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<NS1:BuyBooks xmlns:NS1="urn:WADDemoServiceIntf-IWADDemoService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sBookName xsi:type="xsd:string">實戰C++Builder 6-SOAP/Web Service 程式設計篇
</sBookName>
<sMemberID xsi:type="xsd:string">A123456789</sMemberID>
<iCopies xsi:type="xsd:int">1</iCopies>
<iConfirmID xsi:type="xsd:int">0</iConfirmID>
<cDate xsi:type="xsd:date">2001-11-25</cDate>
</NS1:BuyBooks>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
怎么傳我需要的XML格式啊??
uj5u.com熱心網友回復:
能不能詳細一點,或有這方面的參考,謝謝
uj5u.com熱心網友回復:
用自帶的importwsdl 匯入后不能用么?或者你可以用HTTPReqResp來發送自己構造的xml轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/156740.html
標籤:網絡及通訊開發
