开发者

Get SOAP Message dynamically from asmx/wsdl

How can I get or create a SOAP Message dynamically if I am able to generate the proxy for the passed service url in c#?

  1. I have a webpage with a textbox, user enters am asmx service url.
  2. I have a code that dynamically generates the proxy. Used the code from http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/39138d08-aa08-4c0c-9a58-0eb81a672f54 Although, I have to figure out how can I determine the namespace/service name dynamically for the selected service.
  3. I get the list of all methods for the service in dropdown.
  4. Now when user selects a method, I want to show the Soap Message like the following in a textarea:

`

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSche开发者_如何转开发ma-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetIncomeReport xmlns="http://tempuri.org/">
      <RequestContext xmlns="">
        <userid>string</userid>
        <fcnumber>string</fcnumber>
        <wirecall>string</wirecall>
        <officeprefix>string</officeprefix>
        <accountaccess>string</accountaccess>
      </RequestContext>
      <ReportParams>string</ReportParams>
    </GetIncomeReport>
  </soap:Body>
</soap:Envelope>

`

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜