Httpwebrequest肥皂请求

时间:2016-07-28 16:05:40

标签: httpwebrequest

Hi使用C#发送Http请求的最佳做法是什么,将许多参数传递给SOAP端点。我还要求在请求中添加几个标题。

我将SOAP API定义为

<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/" ; xmlns:mac="iib.macinfra.in/mac">;
    <soapenv:Header>
        <mac:RequestHeader>
            <mac:Id>GFyZxV0</mac:ApplicationId>
            <mac:MessageId>pfoshdttc</mac:MessageId>
        </mac:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
        <mac:FindMailRequest>
            <mac:QueryString>CM7JT</mac:QueryString>
        </mac:FindMailRequest>
    </soapenv:Body>
</soapenv:Envelope>

我想构建HttpRequest并使用HttpWebRequest webreq = WebRequest.Create(webserviceUrl) as HttpWebRequest;

传递参数

0 个答案:

没有答案