Last post Dec 08, 2014 04:11 AM by l.laxmikant
Dec 04, 2014 04:43 PM|Goalie35|LINK
I'm working on my 1st wcf service & need to create 2 function:
I've been researching some of this, but I'm curious what the best way to do this is? For example, for inserting, I could create a function that accepts a dozen parameters (i.e. "SubmitOrder(String clientName, String address1, String address2, String city,
String state, String zipCode)") but I don't know if that's the right way to do this. Same think goes with returning data back to them.
Can I pass objects via wcf? For example, could something like this work: SubmitOrder(UserOrder order);
My only concern with using the above example, is how would users know what to pass into the "UserOrder" object? I'm just trying to wrap my head around the best way to go about all of this, so it's simple for the clients.
Dec 04, 2014 05:07 PM|PatriceSc|LINK
In all cases either the web service can auto describe itself or you can generate a documentation. Which kind of clients (browsers or desktop apps) do you expect? You could also consider
http://www.asp.net/web-api if not done already.
http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx for détails about the WCF vs Web API choice.
Dec 08, 2014 04:11 AM|l.laxmikant|LINK
yes you can pass custom type or objects from clients to WCF services in form of
for more details check
WCF data contract example
or you can post json data to wcf rest service