Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » read a xml file(read a xml file)
read a xml file [message #1691201] Fri, 03 April 2015 10:37 Go to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
I am trying to read a xml file with JDOM.
<?xml version="1.0"  encoding= "UTF-8" ?> 
<definitions name= "Web Service Mediation"
targetNamespace="http://these-info.univ-tun.com/Web Service Mediation " 
xmlns=" http://these-info.univ-tun.comstem online" >
<binding name="ConnTWS" type="wsdlns:SimplePortType">
<soap:binding   style="rpc"  transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="soap">
<soap:operation soapAction="http://tempuri.org/action/binding.ConnTWS"/>
</operation>
</binding>  
</definitions>
 

But when I run the class .java, I would have the following errors:
org.jdom.input.JDOMParseException: Error on line 6 of document file:/C:/Users/samsung/Desktop/copie%20de%20workspace/PluginFinal/plugin/eclipsehelio%20avec%20atl%20-%20Copie/workspace/Jdom2/Grammaire.xml: The prefix "soap" for element "soap:binding" is not bound.
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:465)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
	at JDOM.main(JDOM.java:24)
Caused by: org.xml.sax.SAXParseException: The prefix "soap" for element "soap:binding" is not bound.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
	... 3 more
Caused by: org.xml.sax.SAXParseException: The prefix "soap" for element "soap:binding" is not bound.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
	at JDOM.main(JDOM.java:24)
Caused by: org.xml.sax.SAXParseException: The prefix "soap" for element "soap:binding" is not bound.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
	at JDOM.main(JDOM.java:24)
Exception in thread "main" java.lang.NullPointerException
	at JDOM.main(JDOM.java:33)

Anyone can help me .
Re: read a xml file [message #1691204 is a reply to message #1691201] Fri, 03 April 2015 10:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30354
Registered: July 2009
Senior Member
This isn't a JDOM forum. It's clear however that your XML is not well
formed, in particular there's no xmlns:soap declaration.

On 03/04/2015 12:37 PM, FSM ISFSM wrote:
> I am trying to read a xml file with JDOM.
> <?xml version="1.0" encoding= "UTF-8" ?> <definitions name= "Web
> Service Mediation"
> targetNamespace="http://these-info.univ-tun.com/Web Service Mediation
> " xmlns=" http://these-info.univ-tun.comstem online" >
> <binding name="ConnTWS" type="wsdlns:SimplePortType">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="soap">
> <soap:operation soapAction="http://tempuri.org/action/binding.ConnTWS"/>
> </operation>
> </binding> </definitions>
>
> But when I run the class .java, I would have the following errors:
> org.jdom.input.JDOMParseException: Error on line 6 of document
> file:/C:/Users/samsung/Desktop/copie%20de%20workspace/PluginFinal/plugin/eclipsehelio%20avec%20atl%20-%20Copie/workspace/Jdom2/Grammaire.xml:
> The prefix "soap" for element "soap:binding" is not bound.
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:465)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
> at JDOM.main(JDOM.java:24)
> Caused by: org.xml.sax.SAXParseException: The prefix "soap" for
> element "soap:binding" is not bound.
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
> ... 3 more
> Caused by: org.xml.sax.SAXParseException: The prefix "soap" for
> element "soap:binding" is not bound.
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
> at JDOM.main(JDOM.java:24)
> Caused by: org.xml.sax.SAXParseException: The prefix "soap" for
> element "soap:binding" is not bound.
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
> at JDOM.main(JDOM.java:24)
> Exception in thread "main" java.lang.NullPointerException
> at JDOM.main(JDOM.java:33)
>
> Anyone can help me .
Re: read a xml file [message #1691207 is a reply to message #1691204] Fri, 03 April 2015 11:09 Go to previous message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
Ok!! thank you very much .
Previous Topic:EMF Cross platform:/plugin Resource Persistence
Next Topic:Hibernate annotation ignored in teneo
Goto Forum:
  


Current Time: Wed Aug 21 13:28:33 GMT 2019

Powered by FUDForum. Page generated in 0.02475 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top