asp.net - JSON + SOAP - Is DataContract necessary? -


here's problem. i'm using soap retrieve information third-party web service. response time high, planning on using json instead, @ least in couple of methods.

for i'm using datacontractjsonserializer, seem having trouble. example, in soap there's method called getavailablepublic returns object of type getavailablepublicresponse.

there's equivalent method in json, returns object of type getavailablepublicresponse.

in order deserialize information needed create couple of data contracts, , here concerns:

do need create datacontract? why can't use getavailablepublicresponse object asmx?

the problem if create datacontract, need use different name other getavailablepublicresponse, have 2 objects same name (the 1 created me, , 1 soap), , require making several changes in solution.

hope makes sense.

thanks.

can post client code making call web service? don't know using now, i'm fan of restsharp making remote calls , serializing json c# classes. this:

    restclient client = new restclient("http://some.domain.com/someservice?someparam=yes");     var results = client.execute<mygreatdtoclass>(new restrequest(method.get)); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -