How to populate fault detail with xml string

View: New views
2 Messages — Rating Filter:   Alert me  

How to populate fault detail with xml string

by elite123 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Apologies if this has been covered (I did search - honest!), I've also had a good look at the php docs (a bit thin on the ground on this aspect) and of course a search on google ...

I am running php5 SoapServer and need to return a soap fault with the detail node filled with XML...

So, to throw a fault I can do:

new SoapFault("Validation", "Validation Error", "Actor");

Which is fine, the problem is when I come to fill the detail node, I can pass in an array (which PHP will convert to xml, with it's own formatting), however I would really like to pass in my own XML from a string...

Something like:

new SoapFault("Validation", "Validation Error", "Actor", "<ItemInError>Title</ItemInError><ItemInError>FirstName</ItemInError>");

Which I thought would work, however SoapServer seems to run htmlentites on the string so I get <ItemInError>Title</ItemInError><ItemInError>Title</ItemInError> at the client

Am I missing something obvious or can someone give me a nudge in the right direction??

Any help gratefully received

Nick


Re: How to populate fault detail with xml string

by elite123 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I'm an idiot - Passing an xml string is fine (php isn't messing with the string), It was a bug on the .net client...

Apologies for cluttering up the list
LightInTheBox - Buy quality products at wholesale price