Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

According to client requirement , we have to generate both SOAP, REST (JSON , XML )output in same webservice for future expansion in Android , iPhone Applications etc.

1) So Is it possible to create webservice in WCF which give us both SOAP & REST Services ?

2) Also is it possbile to create REST Service without use of WebGet Attribute ??

3) Also if i want to use Property & Method in same class then how to use it.
I want to keep separate class only for interface , not for property.
Also we have tried with [OperationContract] before get ,set . it solved our issue but throws error while build a .svc file .

4) Also is it possible to pass object in URL for REST Services ? If yes then how ? otherwise How we pass whole entityclass ?

We believe there are more questions but plz give answer.

Regards,
WCF Beginner
Posted

1 solution

1) Massive amount of informatio available[^]
- the answer is yes.

2) WebGetAttribute Class[^] - answer is given in the first few lines. You can also use the WebInvokeAttribute Class[^]

3) Methods only

4) serialize and base64 encode - probably not a good idea though

Regards
Espen Harlinn
 
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