2

I have a service written on .NET working on a company server. It designed to do a very simple thing, to receive a request via WCF named pipes from another service working locally on the same server, process it and send a response through named pipes back. Request an response are just a fairly small, XML formatted text.

And now I need to couple it somehow with our in-house iOS application to do the same thing but with a remote connection through internet. I'm not all too experienced with an Objective-C iOS development and not sure how to proceed. I was considering adding a TCP endpoint to the same WCF service but then I'm not sure how reliable will it be plus I'll have to use some sort of encryption "manually" on both ends of the connection.

I can extend or change code of both .NET server and Objective-C iOS client as much as I need but I'm not sure how to ensure reliability and most of all security of data transfer between server and client.

Right now I'm considering rewriting my service part to be a web based app since it works at request-response principle anyway but what would be the best approach? Would it be possible to consume a WCF HTTPS endpoint with an iOS client effective enough?

1
  • Is the performance an issue? For me it is unclear what your are asking for. Commented Jul 15, 2014 at 9:15

3 Answers 3

2

You should be able to consume an HTTPS endpoint in your iOS app, but I can't give you more info since I don't have experience with Objective-C (although I did work on a project where one of the team members had a similar task).

As for the WCF service, you may not need to rewrite it: decorate your interface with the [WebInvoke]/[WebGet] attributes. Deploy a TCP endpoint if you really need it, but pushing data over HTTP should work just fine, especially since you'll be delivering compact text payloads.

1

You would probably be better off just tweaking your WCF service into a web API service. The iOS speaks HTTP very effectively and doing HTTP is a pain in WCF.

0

The only interoperable endpoint supported by WCF are the http ones (ie SOAP) and of those, I would steer well clear of the wshttpbinding option as it doesn't really interoperate with non-Microsoft SOAP clients. (there are other SO questions about this, just trust me. basicHttpBinding is the one you want).

From that point, you're basically making SOAP 1.1 calls into a webservice. You can configure your WCF service to listen on 2 endpoints, one for internal clients, the other for external ones. Use one of the security options on the endpoint (probably TransportCredentialsOnly option as iOS will not support all the Windows-only security options such as NTLM that you can use). Making web service calls should be trivial with iOS.

(ah, quick google shows that there is now a webHttpBinding option that exposes your service as a REST-based http server. this is a much better choice than bloated and poorly defined SOAP. I'd use this now).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.