HTTP SOAP\GET\POST

后端 未结 2 1894
时光说笑
时光说笑 2021-01-13 08:54

I created my first web service 2 days ago in VS 2008 and was thinking about consuming it when I came across the following questions about web services:

1) My web ser

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 09:20

    First of all, you may have made a mistake. Did you create a service with a .ASMX extension?

    That is a legacy "ASMX" web service, and should not be used for new development unless you have no choice. WCF should be used for all new development.

    Second, GET cannot be used to send complex types to the service, as it places the parameters into the query string. POST, is actually of little use, except for the test page (it also cannot send complex types).

    The only thing that really matters for such a service is SOAP. You should create a client application of some kind to test it, perhaps a set of unit tests.

提交回复
热议问题