[英]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.