> From: "abhishekhp" <[EMAIL PROTECTED]> > > Hi, > Yes, the path is right. Since it is giving an error relating to > HttpClient. Does that mean only http://someurl can be given in the xsd > path?
I have no idea what is your HttpClient doing. But, my guess is specifying a location as file:///..... should work fine. If you can be more elaborate about the scenario in which you are getting such an exception, maybe somebody on the list can help you. Cheers, Rahul. Sun Microsystems, Inc. > > TIA, > abhishek. > > -----Original Message----- > From: Rahul Srivastava [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 20, 2001 7:37 PM > To: [EMAIL PROTECTED] > Subject: RE: Location of xsd > > > > From: "abhishekhp" <[EMAIL PROTECTED]> > > > > Hi Rahul, > > I am getting the following exception when i give > file:///D:/ABC/ABC.xsd > > Are you specifying the correct path?. Here its file:///D:/ABC/ABC.xsd, > where as > in the earlier mail it was file:///D:/Xsd/ABC.xsd. > > -Rahul. > > > > in the parser. I am using xerces 1.4.3 sax parser. Could you help me > > out? > > > > > > org.apache.xerces.parsers.SAXParser parser = new > > org.apache.xerces.parsers.SAXParser(); > > parser.setEntityResolver( new EntityResolver() > > { > > public InputSource resolveEntity(String > > publicId, String systemId) > > { > > > > InputSource Source = new > > InputSource(); > > Count++; > > if (Count == 1) > > { > > > > Source.setSystemId("file:///D:/SML/PI02MergeDelSysCustId.xsd"); > > } else > > { > > > > Source.setSystemId(systemId); > > } > > return Source; > > } > > } > > ); > > > > > > java.net.ConnectException: Connection refused: connect > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320) > > at > > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133) > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120) > > at java.net.Socket.<init>(Socket.java:273) > > at java.net.Socket.<init>(Socket.java:100) > > at sun.net.NetworkClient.doConnect(NetworkClient.java:50) > > at sun.net.www.http.HttpClient.openServer(HttpClient.java:331) > > at sun.net.www.http.HttpClient.openServer(HttpClient.java:517) > > at sun.net.www.http.HttpClient.<init>(HttpClient.java:267) > > at sun.net.www.http.HttpClient.<init>(HttpClient.java:277) > > at sun.net.www.http.HttpClient.New(HttpClient.java:289) > > at > > > sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.ja > > va:408) > > at > > > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec > > tion.java:50 > > 1) > > at java.net.URL.openStream(URL.java:798) > > at > > > org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReade > > rFactory.jav > > a:149) > > at > > > org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument( > > DefaultEntit > > yHandler.java:491) > > at > > > org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:312) > > at > > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080) > > at > > > org.apache.xerces.validators.schema.TraverseSchema.traverseInclude(Trave > > rseSchema.ja > > va:1118) > > at > > > org.apache.xerces.validators.schema.TraverseSchema.doTraverseSchema(Trav > > erseSchema.j > > ava:718) > > at > > > org.apache.xerces.validators.schema.TraverseSchema.<init>(TraverseSchema > > .java:541) > > at > > > org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar(XM > > LValidator.j > > ava:2783) > > at > > > org.apache.xerces.validators.common.XMLValidator.parseSchemas(XMLValidat > > or.java:2669 > > ) > > at > > > org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElement > > AndAttribute > > s(XMLValidator.java:2610) > > at > > > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal > > idator.java: > > 1152) > > at > > > org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc > > anner.java:1 > > 806) > > at > > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc > > h(XMLDocumen > > tScanner.java:949) > > at > > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan > > ner.java:381 > > ) > > at > > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) > > at sax.main(sax.java:126) > > > > -----Original Message----- > > From: Rahul Srivastava [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 20, 2001 7:04 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Location of xsd > > > > > > > From: "abhishekhp" <[EMAIL PROTECTED]> > > > > > > Hi, > > > Is it possible to specify a relative or an absolute location of an > > xsd, > > > or is it mandatory for the xsd file to be located on a web-server. > The > > > application that i am running is unable to find the xsd file when a > > path > > > (like c:\Xsd\ABC.xsd) is specified, but readily finds the xsd when a > > url > > > like http://localhost:/xsd/ABC.xsd is specified in the xml. > > > > > > Any pointers would be helpful, > > > > Specifying location as - file:///C:/Xsd/ABC.xsd in the instance file > > should work > > perfectly fine. > > > > -Rahul. > > > > Sun Microsystems, Inc. > > > > > > > > TIA, > > > abhishek. > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > Sun Microsystems, Inc. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
