...

View Full Version : conversion of xml to java code using php



swethak
07-23-2008, 07:33 AM
hi.

i want to convert xml to java code using php .Plz tell that is it possible?

If it possible plz give some idea about that.?

Fou-Lu
07-23-2008, 08:36 AM
XML cannot be converted to any other language. The purpose of it is to converse between different languages; to bridge the gap between different applications and languages.

swethak
07-23-2008, 09:11 AM
XML cannot be converted to any other language. The purpose of it is to converse between different languages; to bridge the gap between different applications and languages.

Thank you to reply.And my requirement is to conversion of xml to java using php.you told that that conversion is not possible.plz tell that how can i do for that requirement and how i start for that . i am a beginner to php.so i haven't clear idea about that.plz help me.

Fou-Lu
07-23-2008, 11:34 AM
I don't understand what you're requirements are. Are you asking how to generate the xml data and pass it to java, or are you asking how to actually convert xml into java code? The former is easy xml data can be passed between the two and handled with various xml classes/libraries. SOAP may be required to set it up as a webservice. As for converting data to code - its difficult unless you already have the code embedded within the xml, and even then I doubt it would be very pleasant. Parsers are not a pleasant sight.

I'm thinking that you have created a webservice with java, which has generated an xml (wsdl) page for you. If this is the case, look into soap (http://ca3.php.net/manual/en/book.soap.php) or searching on google for the nuSOAP libraries. If its the other way around, use PHP to write a SOAP server and use java to interface with a desktop client. I just found this link: http://users.skynet.be/pascalbotte/rcx-ws-doc/present.htm and took a quick look through it. Explains a little on wsdl and how to write them, so thats always good - more manual work makes for more understanding.

I hope its the webservice you're looking for, otherwise I'm at a complete loss :P



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum