Googling I've found this article:
http://java.dzone.com/tips/generating-client-java-code
It talk about how to generate a "JAVA" code with SOAP UI client, but what I need is to generate code php with soap UI or other resource.
Is this possible? exist any other resource to make it work that?
thank you for your answers..
Regards.
soapUI will not generate PHP code.
Fortunately, in PHP there often isn't a need to generate proxy classes. Instead, use SoapClient and simply call the SOAP methods you need outright. You can find simple examples at various blogs.
If the service with which you're interacting uses lots of complex types, then you may indeed want to auto-generate some PHP code and make use of SoapClient's classmap option.
Related
I have a bit of a problem understanding how the WSDL local file is working. Normally when I need to consume a WSDL file I simply use SoapClient and pass the URL (Something like https://somesite.com/something?wsdl) to it and I am able to consume it. However, now with a new webservice provider they gave me 6 files. Two of which has .wsdl extensions and the rest has .xsd extensions. I have never consumed a web service like this before and I cannot find any tutorials online or any topics regarding this with PHP. I found one where they explained it in Visual Studio, but we need to get this working on PHP. Can anyone point me in the right direction? I did not even know this method existed as normally we consume them by URL.
Any help would be greatly appreciated.
generally speaking, every wsdl is one web service, so there's 2 different services. Xsd files are just xml schema definition and you don't need it while you're calling web services. Use them to validate your soap xml.
If wsdl-s are v 1.1 you can try NuSoap on php site, if not, in Visual Studio you have wsdl.exe command line tool. Use that tool to simulate those web services localy, so you'll get excellent testing environment.
I also highly recommend you to try SoapUI.
Cheers,
SiniĊĦa
A third party provided a WSDL specification, through which I'm going to transfer data to a remote application using SOAP.
I'd like to convert all declared types, constants and method signatures to corresponding classy PHP source code.
Today, I gave WsdlToPhp a try. As far as I figured out, this converter doesn't convert any detail. Furthermore, the documentation has a few rough edges... Maybe a better converter exists.
Q: Could someone propose a stable WSDL to PHP converter?
Please note, that I need a converter to be run offline on a development machine. The WSDL specification isn't publicly available. Therefore, I'm not able to upload the WSDL to a remote converter service.
I used Wsdl2phpgenerator recently. It was pretty easy to use and the generated code has not let me down yet.
I think i done it once, use the pear wsdl lib
http://pear.php.net/reference/SOAP-0.9.4/SOAP/SOAP_WSDL.html#methodgenerateProxyCode
can any one help me in developing soap client whereas parameters type of soap server's functions is object etc.
$client->__call("functionName",array(/*now how to find parameter type if they are object*/));
thanks ...
Just read the official documentation (http://php.net/manual/en/class.soapclient.php). There are plenty of examples, you only have to copy, paste and adapt them.
If you really don't know how to use SOAP in PHP then try to use a WSDL to PHP generator such as PackageGenerator. With this is you'll have a PHP SDK corresponding to SOAP Web Service using the native PHP SoapClient class. A tutorial file is also generated that can be used as a starting guide.
Recently I have been building a lot of applications that needs to access webservices. I currently use a tool wsdl2php to generate a php Class file from the wsdl file.
I was wondering if there are IDE's available that can do the same thing, or at least make it really easy to access/code against the Methods that are available.
I currently use Nusphere PHPed as IDE, but they only support this with their own NUSOAP client.
When you guys need to access a Webservice from PHP which IDE do you use?
If you only need to create a SOAP Client from WSDL then see this page
More specifically check Example 2.
Kevin have you tried using the wsdl2php tool?
http://www.urdalen.no/wsdl2php/
Then most PHP IDEs will use a wrapper helper type option once you use include() or require_once();
i'm trying to build a SOAP service with Zend_Soap. Everything is working great but the client needs the ability to send attachments to the service (not base64 encoded strings, as this service will be called multiple times a day with various file sizes so processing all that in memory is not possible.
So I'd like to handle a normal SOAP attachment (DIME/MIME) with the SOAP server in Zend Framework however I'm unable to find documentation about it. Can I access it with $_FILES[] or any other way? Is it even possible in Zend_Soap (as there's not that much info available).
SOAP is a must - so thanks for the advice but it has to be SOAP, not REST.
SOAP attachments are not implemented in the standard PHP SoapServer/SoapClient classes and therefore not available in Zend_Soap which is mainly a wrapper for these.
AFAIK only the PEAR::SOAP class supports attachments but honestly, I gave up and convinced everyone to use base64encoded strings...
I found this blog post describing at least a client solution with PEAR: http://www.casarini.org/blog/2009/php-soap-messages-with-attachments/
I wrote class to add Soap with Attachments support to PHP5's native SoapServer. Usage example is in phpdoc, class itself is located at http://juks.alkohol.ee/tools/attic/PHP/MultipartRawPostHelper.php.txt