Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL name and namespace

 
Harsha Hegde
Greenhorn
Posts: 17
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a WSDL file in a string. How can I get the name and namespace from it? Is there any parser for reading this
Thanks,
Harsha
 
Henry Wong
author
Marshal
Pie
Posts: 21202
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A WSDL file is just an XML file -- it can be parsed by any XML parser. It is also just text, so you can try using regex too (although it may be more difficult).

Regardless, I'll move this to the XML forum for you.

Henry
 
Harsha Hegde
Greenhorn
Posts: 17
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it with DOM parser and failed
 
Paul Clapham
Sheriff
Posts: 21133
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because the DOM parser is by default NOT namespace-aware. You'll need to call the method which makes the parser namespace-aware. I don't remember which one it is, and I don't remember if you apply it to the parser or the parser factory, but you should be able to find it in the API documentation with no problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic