How to consume WCF Service with WSHttpBinding in iOS application? - ios

Can we consume WSHTTPBinding service in iPhone Application?
I am trying to consume such a service, but I am getting status code 415. I also tried it with all different possible ways but getting same error code everytime.
In one article, I read that, to consume WSHttpBinding services, .NET 3.0 is required on client side.
So is there any way to consume the WSHttpBinding service in iPhone applications or its not possible.Need some guidance on this one.
Thanks in advance.

There is a response to your question here.
Short answer is "Usually not, but it depends how you configure the WSHttpBinding. BasicHttpBinding is better (and also prefer transport security)."
As I know the situation with iOS+WSHTTPBinding didn`t changed.

Related

What to choose WCF or WebAPI for mixed mode application

I have been using WCF for my web applications as it has the vast features of supporting multiple protocols, hosting with or without IIS and many other features though it is little confusion in understanding the configurations (ABCs) at client & server sides especially in terms of message sizes.
Though I haven't implemented applications using WebAPI but has got an idea as how it does the miracles with HTTP
I however need to decide for my new mixed mode application where the Service layer is common for both Mobile & Web based requests.
I do keep hearing about MVC6 but not sure how would it fit for my requirement.
So, trying to understand which one is more Apt for the requirement. Is this WCF or Web API or MVC6
Appreciate your master suggestions and thanks in advance.

What is the best way to communicate via RESTful-Http with an web-service from an iPhone App

My iphone App should be able to communicate with a Webserver via RESTful HTTP.
So now i want to figure out what is the best approach of doing this. Is there a lightweight framework out there which which provides the functionality i want ? With functionality i mean : doing simple http requests with a few lines of code. I read a lot about RESTkit and testet it inside my Project but after upgrading to 0.20 everything seems really confusing to me.
So my question is :
What is the best approach of communicating from an iPhone with a Webservice via RESTFul Http ?
If you only need to communicate with a Web service for a simple task without local caching (i.e offline access to the data), simply go with AFNetworking.
If you need to communicate with a Web service and also need mapping to objects and caching to Core Data in your app, trust me, Restkit will save you A LOT of time at the long run. My app is built around a web service and once configured properly, it's a joy to work with, especially the new version (0.2.x).
Personally, my approach is to use NSURLConnection, Grand Central Dispatch and NSJSONSerialization. I write a web service class for each project with simple convenience functions reflecting the needs of each individual app. I of course reuse some of the code across projects, but I don't make any concious effort to write reusable code.
I too have tried RESTKit and found it too confusing/complicated to use.
I personally use just NSURLConnection from standard SDK of iOS. It has not less or much more then I need.

Can an iOS app consume a WCF service using wsHttpBinding?

I am building a WCF service now, that has a wsHttpBinding endpoint.
The client for now is WPF.
I would like to know if in the future, it would be possible to develop an iOS application that would be able to connect to my WCF service endpoint (it has to be wsHttpBinding, because I need security, reliability and ordered messaging).
Thanks.
I researched a bit and from what I found, it is not possible (at least not easily), please inform me if there is a way
For security I followed the following solution, which fulfills my needs:
Building .NET WCF service for iPhone with authentication
Usually not, but it depends how you configure the WSHttpBinding. If you use any kind of message level security almost surely you will not be able to call it from iOS. I'm saying almost b/c iOS supports sendins soap over http and some of the scenarios (useranme) are not complex so in theory you could manually push them to the soap. But for the most part basicHttpBinding is better (and also prefer transport security).

Discover WCF Rest Service from iOS5

I am building an iOS app that should communicate with a WCF Rest Service. They both will be on the same local network. While testing a have hardcoded the IP of the service, but that wont work when it will be deployed.
How can i get the service address, or connect to it in any way?
I was reading about WCF discovery but I don't know how I would implement this in iOS.
If it is of any help, im using WCF REST Service Template 40(CS)
Any help would be appreciated.
EDIT: How about using bonjour? Any thoughts?
WCF Discovery is an implementation of the WS-Discovery specification, which is an open standard. As such there are a few implementations of it, for example one in Java called java-ws-discovery, one in Python called python-ws-discovery and one in c sharp called WS Discovery proxy.
I haven't found an implementation in Objective-C but given those three are all open source you may be able to port one, or at least the part you need (depending on whether you are able to understand one of those languages).

Blackberry - Consume .Net Soap Service

I am new to blackberry app development and was wondering if someone could point me in the right direction(and may be a sample application) of how to consume web service in native apps. I'm using Blackberry JDE plugin for Eclipse.
I am able to consume a restful webservice, but now I want to consume a SOAP service. I am new to eclipse , so I would require in detail information.
Thanks,
I followed this none-ksoap2 route and it worked well for me:
http://www.johnwargo.com/index.php/blackberry/dbja2.html
This series of articles explains how to utilise the support the BlackBerry Platform has built in for JSR 172, the J2ME Web Services Specification, by creating a java stub class through the use of a utility in the Sun Java Wireless Toolkit for CLDC and the wsdl for your web service.
The articles give a very thorough and detailed explanation of the steps required to achieve the objective, so I would not wish to repeat them here in full, nor paraphrase them at the risk of my debased shorter version being quoted later. I understand the risk of answering in this way, and I realise that my short explanation above will in no way compensate should the original articles disappear from the internet.
Hey thanks for all the help. Figured it out. The problem was wcf service. When I tried with a simple web service(.asmx), it worked like charm and all the stubs were generated correctly. Probably wcf uses Soap 1.2 default and asmx service SOAP 1.1.
I even tried using KSOAP2 for calling wcf service with little success. Again switching back to asmx instead of wcf, solved the issue.
Now I have problem of plenty, which method to use(KSOAP or Stub) :)
I am all for non KSOAP method, but the only thing that is stopping me is I have to generated stub files everytime a introduce a new method.
Anyways +1 for all the help

Resources