consuming a php web service with asp.net - php

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

Related

How to integrate python/django project with a webservice that provides api only for php?

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!

Consuming SOAP via sending objects from php client to dotnet SOAP server

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.

Converting PHP web service from JAX-RPC to JAX-WS

Is there any way to convert JAX-RPC to JAX-WS web service. The issue is we need to generate a client of this PHP based web service in java. The web service is written in PHP in RPC style, and when java team try to generate the client it get error "Selected wsdl is rpc encoded. You must select JAX-RPC Client" so we are requested to change the encoding style from RPC to WS can any one help in this regard
EDIT
Here is a plugin for netbeans that allow user to generate java based jax-rcp client. but as pre client requirement we need to change the web service. That is why need that.
Thanks in advance.

Consume WCF Service in json format

i have created WCF Service, i want to consume WCF Service in PHP with json format. i don't have any idea how to call WCF Service in PHP.
As prescott said - if it's a restful service then you are calling a url.
If the service is using soap and wsdl (not JSON as stated) Using WCF Services with PHP has a simple example.
If your service is actually returning SOAP and you /want/ it to return JSON, either re-jig the service to use Content Negotiation via the WcfWebApi or setup multiple endpoints
Hopefully one of these options will help you.

PHP site to post data to ASP.net Webservice

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

Categories