SOAP MTOM/XOP Support in PHP - php

I want to create a Web Service in PHP, which can support MTOM/XOP. My Webservice Processing function shpuld be able to extract the attachment. As I googled I could find only WSF(Web Service Framework) as an answer.
Is there any alternatives? I'm new to this MTOM/XOP thing. Currently I use NuSoap but it dont support MTOM/XOP.

There is a patch to support mtom, it might need tweaking for the full mtom spec
http://sourceforge.net/projects/nusoap/forums/forum/193578/topic/3917337

Related

How to add docs to Solr using PHP?

I've got Solr set up on my server, and a test collection loaded.
Without installing anything else, I can search the collection fine using the Solr URL and JSON decoding file_get_contents($url).
In order to add/update/delete documents, do I need to install a PHP Solr client? Or is there a native way that is standard to use? If the former, is this the one to install?: http://www.php.net/manual/en/book.solr.php - or can you recommend another and why?
Check the below links :
Integrate SOLR - wiki
SOLR PHP - Official Client Library
Link to download SOLR php client library
In my company we've been successfully using the native Solr client for PHP that you've mentioned for a while now. I also found Solarium helpful, however it has it's limitations, so it might be worth looking into using HTTP request tools like Guzzle, Httpful and such.

SOAP PHP problem

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.

Zend_Soap with attachments (server)

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

PHP Web Service with SOAP

I realize it's possible to create a PHP Web Service using SOAP, however, are there classes within PHP that make this easier than hand creating the SOAP messages?
I want to use php has a webservice using wsdl
with this link
https://qa-api.ukmail.com/Services/UKMAuthenticationServices/UKMAuthenticationService.svc?wsdl
to integrate uk mail api in to my php web application
but dont now how to do it ?? any help
There are:
The PHP SOAP functions
The PEAR::SOAP module
nusoap
They should all interoperate fine with .NET - it's just XML after all...
You want to try nuSOAP which you can get from here http://sourceforge.net/projects/nusoap/
Very easy as I had to create a PHP SOAP service and I didnt know PHP as I'm a C# .net person!
And just to add to that, as long as you implement the wsdl and SOAP methods correctly you should be fine. I had it working with .net with no trouble at all
Sure...
http://us2.php.net/manual/en/class.soapserver.php
There used to be an example in there somewhere... I couldn't find it though...

Consuming a php webservice in visual studio

Is it possible to consume a php webservice in visual studio? I have a webservice with a wsdl file created by nusoap, when I try to add the web reference in visual studio the name of the service and the methods show up but it complains that the 'wsdl is not a known document type' and the discovery document could not be found.
Any suggestions would be appreciated.
thanks,
Richard
Responses to suggestions:
Well there is no asmx file at the moment, since the .net app is using the functions of the php webservice and not the other way around. Maybe nusoap can create a asmx? I think that is just for the .net side though.
I 'm trying with nusoap because it automatically creates the wsdl for you, however I did try the inbuilt soap handing of php first with my own wsdl file but got the same error as with nusoap.
Seems the problem in the end was really my webserver, my files where encoded in utf8 and it didn't like that. Thanks for the answers though.
I use the pattern of the code found here. It works for me. Also did you check to the wsdl by browsing to the url of the service? It may be that your service is generating an invalid .wsdl file.
Here is what I found to use nuSoap with WCF. http://offroadcoder.com/2008/03/23/CallingYourNusoapPHPWebServiceFromWCF.aspx

Categories