Web service PHP -> c# client

SiCo

Newcomer
Joined
Feb 1, 2004
Messages
4
I am trying to read a PHP Wev Service that I have created, the trouble is it worked once then I must of changed something!!

I get the following error:

An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll

Additional information: There is an error in XML document (1, 469).

Which happens in the C# created functions (derived from the WSDL). So I am guessing I have ruined my web service somehow, I really need confirmation that it's my php / SOAP (using nusoap) and not my C# thats causing problems.

Thanks for any help you can give and if anyone has any other ways of getting data from a unix PHP enabled mySQL server then please let me know!
 
why dont you load the data directly from mySQL?
xml tells you the position of the error, just look at this position, do you use linebreaks ( '\n' ) ? because 1,469 looks like a really long line..and wont improve your bug finding..

so it looks that your php generates an xml error, maybe you just forget a char so that xml cant read the information at the current position
 
I can't do it directly because I have no control over the server the site will be on and it is accessed via localhost, so can't be reached externally, or so I believe.

Do you know a way I can see the relayed xml?

The strange thing is it works via the PHP client. At least now I know it is this rather than my c# so thank you.

A quick edit, I assume the long line would be all the xml as you say so it looks like nusoap is giving it as a long line.
 
it is accessed via localhost, so can't be reached externally, or so I believe.

you get the user's ip by this: $_ENV["REMOTE_ADDR"];
just compare it with the server ip..so your client is definitly localhost :)

i dont know what you mean by relayed xml, i thought this is like a normal php script which just echos the xml syntax, like it normally does with html

so i thought you can just insert line breaks \n (maybe \r\n for win) so that you get more lines and can look at the xml syntax in an easier way
 
Well nusoap relays the returned data via its decoding classes so you get variables returned instead of xml, I am still looking into it. The main problem is I can't find a lot of information on creating WSDL compliant PHP Web Services so I am having to guess a bit!

I am not sure how getting the clients IP would work, generally its a security issue stopping people accessing mySQL remotely, I will look into it though.
 
uhm i just would look in a xml and just create own ones with echo command
if you say this is not so a good idea, i dont mind because i dont like xml that much, only at certain situations it is quite good..
 
Back
Top