[英]How to consume wsdl web service by using a certificate in Windows Phone 8?
[英]How to consume WSDL web service
我需要使用(發送請求並檢索響應)WSDL SAOP Web服務。
WSDL文檔是使用請求和響應的對象構建的。
如何用XML結構調用它並獲得XML結構數據作為響應?
從文檔:
public class GetOrderDetailRequest : Request
{
public string UserName { get; set; } //Required
public int SiteID { get; set; } //Required
public string Password { get; set; } //Required
public string OrderID { get; set; } //Required
}
// Sample Request XML
// <GetAdminOrderDetail>
// <MethodParameters>
// <req>
// <OrderID>9063384</OrderID>
// <Password>test</Password>
// <SiteID>123</SiteID>
// <UserName>test</UserName>
// </req>
// </MethodParameters>
// </GetAdminOrderDetail>
// GetOrderDetailResponse object
public class AdminOrderDetail
{
public List<OrderedColumn> Columns { get; set; }
public Invoice Invoice { get; set; }
public List<OrderedItem> Items { get; set; }
public AdminOrderDetails Details { get; set; }
}
我在網上找到的唯一示例是在服務中調用函數的示例,但是我現在需要使用的服務-不要使用我可以調用的函數來檢索數據。
我假設您正在使用ac#客戶端使用WCF服務。 您需要向客戶項目添加服務引用。 這將從WSDL創建必要的類,並幫助您創建調用Web服務的請求並獲得響應。 看看這個http://www.c-sharpcorner.com/UploadFile/0c1bb2/using-wcf-service-in-console-application/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.