I’ve asked this question on multiple sites (bytes, stackoverflow, even sent a message to Dreamhost support) and it hasn’t been answered anywhere. I’m completely stuck at this point and I really want to move along.
I’m writing a SOAP service to provide an API for my site. Right now what I’m trying to do is return a paginated list of news posts. Each post has 8 elements, all with different types, listed below:
Each page will return 25 results in a nested array called News. There will also be a boolean value called HasMorePages, doing just what it says. The final array should look like this:
[HasMorePages] => 1
[News] => Array
 => Array
[Title] => “some title”
[LinkId] => 100
[Date] => (timestamp)
[Author] => “HaLo2FrEeEk”
[Content] => “Some text”
[Id] => 170
[Icon] => 1
[Edited] => 0
 => Array
And I should be able to get at this in a C# application by running client.GetNews(int page), which should return a NewsResult object, which has two properties: HasMorePages and News. News is an array of NewsItems, each of which has the 8 properties I listed above.
I’ve written the function that returns this array and tested it, it works, but I just get an empty result. I had this working when I was simply returning a string with the 25 news posts’ titles, separated by a newline, but I can’t figure out how to serialize the array in PHP to return it through SOAP. I don’t even know if it’s a PHP problem or a problem with my WSDL file, here is my WSDL file though:
There are a few XSD’s imported, too. If anyone wants it, I’ll post up my function where I’m getting the news information, too.
Please, if anyone can help me out I’ll be super grateful. I’ve been at this for days now and it’s driving me crazy, especially because my posts on other sites are being ignored.