please tell that can we consume .net web services in php or not.
if yes then please tell me how can we do it.
i am to create a web service which takes values and save it in database also it will take values and reply some data as a standard xml format.
i know how to create web service and how to use it in asp.net but don't know how to use/call it from php.
thing is that i will not be writing code in php to consume but wants to know that do i need to take care of any special thing or need to do some extra code to make it available and use by php developers.
i am to create web service in .net framework 2.0
Thanks
It's possible, but it looks like you have your work cut out for you. .Net web services are based on SOAP. The PHP class you're looking for is SoapClient.
Take some time to read through the PHP site's documentation. .Net hides a lot of the raw SOAP nuts and bolts, so you're going to need to peel back the curtain on your web service a bit.
One easy way is to play with an existing WS client through a proxy like Fiddler, which lets you see exactly what's going back and forth.
Good luck,
n.
Related
We are rolling out one of our services to another service provider in PHP. They have already built the client, it just sends data in a post (no xml/json etc). Our script then processes it and returns an xml string with the response. Also they will need a token authentication system. Because of the fact they are just using cURL to post raw data, I don't think I can use soap/rest/xml-rpc ... can anyone point me to any good tuts etc?
Cheers,
Oauth is a secure and easy to implement for security solution for tokens. And they have libraires for java, php, python, and pretty much any language you can think of.
Very strange (and backwards) they built a client without an existing service. but the important thing is to document the interface between your two systems, and adhere to it.
David Walsh explains a simple php web service that returns JSOn or XML.
http://davidwalsh.name/web-service-php-mysql-xml-json
I have looked on here and anddev for a suitable response, but haven't found anything suitable.
Here is the question: My friend has an instant chat application with iPhone, and since I have some basic android experience he asked me to check out "porting" it to Android. So before I set up the UI, I decided to look into php which I don't have much experience with. I know the UI will need an array to call contacts, but I'm not sure about retrieving the information from the php.
How do I know if I can use his script or not? I haven't found any good tutorials about Android and Php - has anyone found one?
I might as well learn this stuff now because my next app will require an online database to be used in it - I know his has users and passwords, and he'd like to be able to send im's between iPhone and Android clients.
Thanks for any help you may provide!
EDIT:
Yes, this issue is more related to http requests from android to a remote server; I have changed the tags and subject accordingly, but would still appreciate a guide to android-friendly php writing. Thank you!
There really isn't Android-Friendly PHP but there is mobile friendly PHP. Basically, you need your PHP scripts to emit something that is easy to parse in an application (like XML or JSON) rather than the standard HTML. After that, all you need to do is figure out what the API should look like on the server side. That is, what functions does the server need to provide and how is it going to provide them. Are you going to use simple HTTP authentication or are you going to use something more complicated?
With regards to his chat application, I would imagine that if he already has an iPhone version, then you won't need to mess with the sever side at all. All you need to do is figure out what URLs and parameters to use for what operations. You also need to ask him what data format his server uses. If it's XML, you need to find an XML parser, if it's JSON then you need to find a JSON parser etc. (there are plenty of tutorials on how to do both in Android via Google). I would start by asking him, at a high-level, not with Objective-C specifics, how his chat application communicates with the sever. You can then use that to build your application to communicate in the same manner.
I have accessed .net webservices in iPhone,now i like to develop PHP webservice which has to be consumed by my iPhone application.
Is it possible to consume a PHP web service in iPhone,if possible can anybody suggest me a good tutorial or web reference for designing a simple web service in PHP and consuming it through a iPhone application.
Thank a lot in advance...
Yes, it's perfectly possible. The client (iPhone) doesn't care in the very least what programming language you use on the server, as long as the output (HTML, XML, JSON, whatever else you want to consume) is something the client understands.
You don't need a tutorial, it's no different from making a normal website with PHP.
I am new in web service. I was totally confused when seeing examples to create web service in internet. Actually, My client have xml to place the orders. what they want is they need to create a wsdl(web service) to call the xml by their vendor forms. So i need to create a webservice that integrate with xml and vendopform(it may be in any language). How i can do this, my mind has empty now to think this. Can any body help me to sort this issue.
If you're creating a SOAP service (which it sounds like you are, and I feel sorry for you ;)), try starting by looking at PHP's SOAP extension:
http://php.net/manual/en/book.soap.php
If you can create something more RESTful, Ruby on Rails does a good job at allowing you to throw together a quick and dirty web service without too many headaches, but even in PHP you can create RESTful APIs pretty easily.
You can read the HTTP request body via e.g. fgets(STDIN) if your requests will accept XML as a POST/PUT format.
But yes, your question is too broad to provide anything more than nudges towards the tools you might choose to use.
I am wondering how to integrate jabber instead of using my AJAX polling script. I chanced upon the following: http://code.google.com/p/xmpphp/
It gives me access to a jabber server, but does not tell me how to exactly go about it. I mean for example
$payloads = $conn->processUntil(array('message', 'presence', 'end_stream', 'session_start'));
Are there a fixed set of commands that I can use? Is there some site which explains the jabber workflow in very simple terms?
Thank you very much for your time.
I've been wondering about technologies to play around with XMPP, been looking at:
Strophe
BOSH
Examples of this technology can be seen at:
drop.io
Chesspark
These two doc pages seem to be fairly readable:
Core
Instant Messaging and Presence
Also, you might already be heavily invested into xmpphp, but if not, you may want to take a look at Phurple. It gives you access to the libpurple library (the code-base for Pidgin) from PHP.
From the project page:
This libpurple PHP binding, which
defines a set of internal classes,
gives a possibility to use aol and icq
(oscar), yahoo, msn, jabber, irc and
much more protocols directly from PHP.
Write your own IM chat client in PHP,
as simply as PHP enables it.