aspose file tools*
The moose likes XML and Related Technologies and the fly likes WSDL name and namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "WSDL name and namespace" Watch "WSDL name and namespace" New topic
Author

WSDL name and namespace

Harsha Hegde
Greenhorn

Joined: Jan 12, 2009
Posts: 17

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
Sheriff

Joined: Sep 28, 2004
Posts: 18116
    
  39


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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Harsha Hegde
Greenhorn

Joined: Jan 12, 2009
Posts: 17

I tried it with DOM parser and failed
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18125
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WSDL name and namespace
 
Similar Threads
@XmlElement namespace
Significance of wsdl:
WSDL generation in Axis - item is referenced but not defined
reading soap-envelop messages
Significance of default Namespace