Click here to Skip to main content
15,892,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir

How can I call wcf service from jquery and also I dont want to change wcf functions as those functions are also used from some where else from other platforms..

I know how to retrive in json format but for this i will have to change in wcf functions i dont want to do that...

please help...

my function is as below

C#
<operationcontract()>
        Function GetBedTypeList(ByRef strErrMsg As System.Collections.Generic.List(Of String), _
                                                    ByRef chrErrFlg As Char, _
                                                    ByVal pcompanycode As String,
                                                    ByVal pdiv As Integer, _
                                                    ByVal ploc As Integer) As System.Collections.Generic.List(Of CWReadClasses.clsBedTypeMaster)
Posted
Updated 5-Aug-13 23:05pm
v3

 
Share this answer
 
You need to create a proxy web service here, which would be called by jQuery in your application. And, this proxy web service will call the target web service.

So, if the target web service doesn't provide the result data in required format, you can modify that in your service and send the data after serializing to JSON. In this case even if you do not have access to make any modification in target web service, you can customize the response through your proxy web service.

Hope this would help you.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900