I have a wsdl service and as I generate it with svcutil.exe, it gave me a .cs file. Now my question is how can I call the service with javascript for android. Where do I go from here? Any suggestions or any reference/step-by-step tutorial or a sample demo would be a great help for me. I am developing an application for android with phonegap 1.4.1, Many thanks.
Asked
Active
Viewed 279 times
1 Answers
0
The .cs file you have is just a DTO. You would need to code you Operations and Data contracts in the WCF service to make anything happen.
With javascript in mind, I would just use JQuery and the .Ajax() method for making the calls from the client side. There are tons of articles on how to accomplish that.
http://www.codeproject.com/Articles/128478/Consuming-WCF-REST-Services-Using-jQuery-AJAX-Call

Community
- 1
- 1

jeffreyhamby
- 26
- 1
- 5
-
Thank you for the links you provide. but what is DTO? and what do you mean that i need to code operations and data contracts in the wcf service? sorry. my name says it all., but thank you. :) – Newbie Mar 08 '12 at 20:36
-
and also. scvutil.exe generated a output.config file. which i dont have any idea what is it. or what it does. :), thank you sir. for the reply – Newbie Mar 08 '12 at 20:46
-
Ahh sorry. A DTO is a Data Transfer Object. Really not much more than a class of properties with no behaviors. It's used for handling data transfers between two systems. (oops, enter closed rather than crlf) Also, I meant to type Service Contract rather than Operation Contract. The Service Contract describes the operations that are available in the WCF. The Data Contract is a contract between the service and client that describes the data itself. All of these are (or at least can be) handled with Attributes assigned over the methods. – jeffreyhamby Mar 08 '12 at 20:48
-
Take a look at http://wcftutorial.net/Home.aspx . There's quite a bit to understand, but none of it is horribly complicated. – jeffreyhamby Mar 08 '12 at 20:52
-
oww, ok sir. uhhm, what is the output.config that was generated also by svcutil.exe? what does it do or what is it for? cause my boss gave me the service address. and that it was indicated that in order for me to generate the file and code i need to use scvutil.exe, and that's how i got this .cs file and the output.config. is everything all set after that? t – Newbie Mar 08 '12 at 20:55
-
You can use output.config settings (such as
) in your app.config file. This will add settings based on the WSDL service you used to generate the files. – jeffreyhamby Mar 08 '12 at 21:36