I have been trying to call a webservice that is in dotnet platform from a client prepared in php.
New to the webservice business and trying my best ...... but I have been unable to send objects from php as client to the dotnet webserver. If anyone could suggest a basic idea or point me to any resource of study where one can send php objects using SOAP to a dotnet it'll be a bunch of help.
Probably you need to learn a bit more on how to call SOAP web services from PHP. This question seems to provide a good overview on that: PHP SOAP client Tutorial/Recommendation?
Furthermore, give more details on your concrete problems: what are you being unable to do (more details), what have you already developed/tested?
Finally, when working with SOAP web services you do (should!) not need to care about how the web service is implemented. SOAP is a protocol for managing/specifying the communications between a client and a server (with the web service). The actual internal implementation of the web service should never matter, only its "interface" that normally is defined in the WSDL document.
HTH.
Related
I work on a django website. Currently, I need to integrate it with a third-party API that provides only PHP endpoints and some shitty documentation that instructs how to build PHP requests. The API provider introduces a PHP client containing a class that handles requests to PHP API webservice via SOAP.
First, is it possible to build python client that will interact with PHP endpoints without knowing server-side trickery of the API provider? Should I dive deeper into PHP client source code and try to rewrite it in python?
Second, should I create intermediary PHP webservice that will integrate third-party PHP API and provide a precise API to interact with python client.
Is there any better option?
P.S. Please, note that I'm new to PHP and SOAP.
Just like any other API. You just have to use the PHP client as a guide to build the API client in python. If you feel it's no help at all, throw it away and look what the endpoints are and what they spit out.
In the end, the endpoints on the remote server can be programmed in Smalltalk for you care. The API client only cares about what parameters to send to the server and what the response looks like.
So pick your basics:
requests for network protocol
soap client
authentication if oauth
and start coding ;) Good luck!
i wanna consume a php web service with asp.net but web service requires post data. So add reference tab is not working for me? is there any solution to that problem.
thanks
If your php service has a WSDL, you can use that to consume the service in .Net, otherwise you need to generate your soap messages manually - see Building SOAP message with XMLDocument VB.NET for an example
Hey!
I don't really understand what soap is but it doesn't matter. I need to make some soap site that redirect to normal site or have simple content in it like 'test'.
I will need to acces it by soap:// ---- is it ever possible ?
Never good idea to use something that you classify as "I don't really understand what soap is but it doesn't matter"
http://www.w3schools.com/SOAP/soap_intro.asp
Go through it its quite good and simple
And yea its not possible at least to my knowledge
And if you do not feel like clicking link this might help (from w3schools.com)
What is SOAP?
SOAP stands for Simple Object Access Protocol
SOAP is a communication protocol
SOAP is for communication between applications
SOAP is a format for sending messages
SOAP communicates via Internet
SOAP is platform independent
SOAP is language independent
SOAP is based on XML
SOAP is simple and extensible
SOAP allows you to get around firewalls
SOAP is a W3C recommendation
No it's not really possible. Yes, it does mater if you understand what SOAP is.
You can't redirect from a SOAP "site" to a "normal" site. That's because there are no SOAP "sites". SOAP uses XML that is not able to be parsed by a web browser. The web browser needs to do the redirecting.
If you mean to say that you want a certain URL that runs a SOAP service to redirect web browsers to a different page, then you'll have to look reading the user agent, and giving the appropriate response.
This is in fact a useful and good idea if you are developing a SOAP service, but it doesn't sound like that's what you are doing.
I've got a site running on php and I need my form to post data to an ASP.Net web service. All I have from the ASP.Net web service is a url ending in .svc and then I open up the url I get another link that I can click on which ends in .svc?wdsl
This is all pretty new to me so I'm not sure where to begin, any pointers?
Thanks
The ASP.NET site is exposing a WCF service, and the ?wsdl url you're seeing (pronounced wis-dul) is a XML file which describes all of the functionality provided by the service and the input/output parameters. See the Wikipedia article on Web Services Description Language for more info.
With the small amount of background info, you can find some examples about consuming a WCF service from PHP (the fact that it's a WCF service shouldn't make any difference btw, so any example of consuming a web service should work):
http://weblogs.asp.net/gunnarpeipman/archive/2007/09/17/using-wcf-services-with-php.aspx
http://spacebug.com/php-calling-wcf-part-2-html/
The .svc?wsdl link will give you the WSDL for the web service (which describes which methods are available and what their parameters are).
Once you have the WSDL, you can construct a SoapClient with it and call the methods.
It sounds like you've been given a .NET SOAP Web Service to consume.
Check out the PHP docs for consuming/working with SOAP Services:
PHP: SOAP - Manual (Paying close attention to SoapClient which is what you'll use to actually construct and call the service)
steven,
you'll need to do a refresher on wsdl and webservices under .net.
there are obviously lots of places to look online but certainly if you google: 'asp.net wcf wsdl webservice' you should get plenty of hits to help you along.
jim
I have been approached to create a website using Sabre Web Services to power the reservations system. All documentation I have seen refers to .NET or Java solutions, and I was in doubt as to whether PHP can be used, as access is performed using SOAP.
I have found no further information about this, and I assume the answer is yes, but I wonder why there is not a single reference to this being possible. All solutions seem to be .NET!
SOAP is language independent, which means that any language can communicate with the web service if it can generate SOAP requests and handle responses.
PHP's SOAP documentation can be found in the php manual
PHP can be used to call SOAP pretty effectively.
There's a very good tutorial on devzone on how you can use SOAP well.
I've just done a little digging around and it looks like you can use stream_context_create() to create a custom HTTP stream context. This would include the HTTP content type header you need. The resource returned from this function call can then be passed to the SoapClient constructor to be used in SOAP calls. Have a look at http://ca.php.net/stream_context_create and the PHP manual page for the SoapClient constructor (sorry, I can only post one link as a new user) for more information.
Yes, PHP can be be used to connect to SOAP web services - take a look at NuSOAP. It allows a nice & easy object oriented way to consume web services.