What Works vs. What’s Good

I’ve been struggling with using PHP to connect to a Web Service written in ASP.Net. The basic assignment is to send info from a simple contact form to the web service using SOAP. I have read lots of blog posts that start off promising to show how simple it is to use SOAP in PHP. In theory, that is true enough. In practice, at least in my situation, how to proceed is clear as mud.

Most of the tutorials focus on a simple call to a service that passes one parameter. In my case, I need to pass four parameters, one of which is a full XML file. The schema calls for this to be passed as a string.

So far, the only thing that works is assigning the XML (copied from the sample file) to a variable as a string, then passing it to the web service in a __soapCall();

It ain’t pretty, it ain’t good, but it works. If I figure out how to do it more elegantly, I’m swearing to myself I’ll post a complete tutorial about it.

October 5, 2011 No comments yet

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Fast WordPress Hosting