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#?
- I have a webpage with a textbox, user enters am asmx service url.
- 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.
- I get the list of all methods for the service in dropdown.
- 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>
`
精彩评论