user2255811
user2255811

Reputation: 496

Is it possible to create a ASP classic web service without using SOAP?

I need to create a Web Service in ASP classic(no choice unfortunately) but I need to do it using more modern standards like using JSON instead of SOAP. I'v been searching the web but I can't seem to find any way to do this. Is it even possible? and if it is can you please show me a tutorial or example.

Upvotes: 1

Views: 9929

Answers (2)

Gerald Trost
Gerald Trost

Reputation: 189

My c# WebService Class has these Compiler Tags:

[WebService(Namespace = "http://myWebService/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

Since it was requested that the WebService can also communicate with JSON clients we added this Compiler Tag:

[ScriptService]

Methods are tagged with

[WebMethod] 
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]

It all works fine with SOAP clients and with JSON clients but the JSON Developers want to get Standard Status Codes in case the WebService throws an Exception and I don't know how to accomplish this.

Upvotes: 0

Related Questions