Use. NET WebService Studio to debug Web Service to solve the SOAPAction problem.

Source: Internet
Author: User

Use. NET WebService Studio to debug Web Service to solve the SOAPAction problem.

In other words, a text message sending function has been developed over the past two days, and the customer has sent a Web Service address (no documentation) so that I can send the message by calling it,

I added a service reference in VS 2013. Everything is normal, but when I execute the proxy method, I reported an error.

  • RPC Message receiveExtMTPushRequest1 in operation receiveExtMTPush1 has an invalid body name receiveExtMTPush. It must be receiveExtMTPush1

Is my method name incorrect? However, the automatic generation of VS is impossible, and the parameters are also impossible (the customer has checked ).

I opened this web service in a browser and described it as an AXIS web service. Isn't it possible for. NET to call AXIS web service? I have read that the WSDL is also standard.

So I tried the dynamic call method on the Internet and reported an error when I tried to reflect it. Let's take a look at other methods.

I want to find a web service debugging tool. If it doesn't succeed, tell the customer if there is a problem with the web service? I found. NET WebService Studio, a lightweight tool, dozens of K.

Complete the EndPoint-> click GET to GET the method and parameter list-> select each parameter in Input and enter the corresponding value-> click Invoke to execute, I rely on it, and the Output succeeded.

Click Request/Response to view the Request and Response data.

Now it's easy. Put the SOAP in the Request into Fiddler and POST it!

The proxy class generated by VS fails to be called. An http header parameter SOAPAction (not soap header) should be missing. This parameter is of some significance and can be found in the WSDL, cross-platform calls are especially common. You can search for them online.

 

Solution:

1. Combine a soap xml file, use HttpClient or WebRequest to call the Web Service, and parse the returned XML file;

2. Click WSDLs & Proxy in. NET WebService Studio, which contains the Proxy class and client code and is copied to the project for use.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.