Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conversion of xml to java code using php

    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.?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    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.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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 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/r...oc/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
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •