Hi, some time ago I needed MIME attachments support (http://www.w3.org/TR/SOAP-attachments) for SOAP to interact with an amazon web service. Sadly the PHP SOAP extension only supports the most basic SOAP features.
Luckily it was possible to extend the SoapClient class with MIME support in userspace using CURL and by manipulating the XML in- and output messages to/from the SOAP extension. I refactored my quick and dirty solution and think I could build a nice SOAP component based on my existing implementation. If there is interest from the ezc team and/or other people I would proceed with the effort of building a SOAP component by writing a requirements and design document for further discussion (but don't expect sth. before next week). I have to add that I'm mainly interested in the MIME support and therefore won't address other standards at the moment. But I already thought about a plugin mechanism to be able to support e.g. WS-Security by manipulating the DOM of the SOAP message. More about it in the requirements doc later. For SOAP MIME handling you need MIME de-/encoding. Of course I was lazy and didn't want to implement this on my own. So I ended up using the Mail component's implementation. Before I get to some problems I had with the MIME code in ezcMail I want to raise an important question: How do we solve the problem that we don't rely on other components and don't want to duplicate code either? By not adding a SOAP component with MIME support? ;) Any comments? Generally speaking it was quite easy to (ab)use the MIME handling for my purpose, but I had some troubles with the MIME classes: a) ezcMailMultipart::$noMIMEMessage has some text to inform mail clients without MIME support about this problem. It is not possible to disable this and therefore I also had these messages in my SOAP messages. In my case it didn't cause any problems with the server (connecting to amazon), but it definitely shouldn't be there. Can we add an option to disable this? b) ezcMailVirtualFile (all ezcMailFile classes I think) has a fixed encoding (base64) and it is not possible to change it. Why is the encoding fixed? In other parts of the MIME code one can configure that (e.g. ezcMailText)? Therefore I had to extend the class to get the required 8-bit for my XML attachments. c) When parsing a MIME message the detected files are saved to a temporary file on disk. Why? For the SOAP component this is unnecessary overhead as I want to inject the data into the result XML of the SOAP request afterwards. An option to use ezcMailVirtualFile (instead of ezcMailFile) as target would be cool. Ok, that's it for now. If you finally don't remember what this confusingly written mail is all about: - possible new ezcSoap component - the question: How to deal with MIME de-/encoding? - Some drawbacks when using the ezcMail MIME code for sth. else as it's written for. Any comments appreciated. Regards, Andi -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
