• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAXException while generating stubs for a WSDL

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends

i am stuck in a problem for which i need your help.
i am using the Axis wsdl2java tool to generate the client side stub classes.
the wsdl which i was using was referring to the port http://localhost/hth/services/Client?wsdl
i was running the wsdl2java tool on this wsdl to generate stubs. it was working fine.

Now i have removed the client.wsdl from the default localhost port and
want to keep it in some location like D:\wsdl\Client.wsdl so that i don't have to depend on the Application server which needs to be up everytime for the wsdl to be used.
when i run the wsdl2java command on this location i get the following error.
org.xml.sax.SAXException: Fatal Error: URI=file:///D:/wsdl/Client.wsdl Line=1: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:218)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:595)

Please let me know what is the problem here and how can i resolve this issue.
here is bit of the sample client.wsdl

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl efinitions targetNamespace="D:\wsdl\Client.wsdl" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="D:\wsdl\Client.wsdl" xmlns:intf="D:\wsdl\Client.wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="D:\wsdl\Client.wsdl" xmlns:tns2="http://client.hth.march.com" xmlns:tns3="http://exception.hth.march.com" xmlns:tns4="http://equipment.hth.march.com" xmlns:tns5="http://equipment.ws.hth.march.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)

-->
- <wsdl:types>
- <schema targetNamespace="D:\wsdl\Client.wsdl" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://equipment.ws.hth.march.com" />
<import namespace="http://xml.apache.org/xml-soap" />
<import namespace="http://exception.hth.march.com" />
<import namespace="http://client.hth.march.com" />
<import namespace="http://equipment.hth.march.com" />
<import namespace="http://localhost/hth/services/Client" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="HTHBaseDTO">
- <sequence>
<element name="md5Sum" nillable="true" type="xsd:string" />
<element name="primaryKey" nillable="true" type="xsd:integer" />
</sequence>
</complexType>
- <complexType name="VitalThresholdEnum">
- <sequence>
<element name="labelKey" nillable="true" type="xsd:string" />
<element name="pk" nillable="true" type="xsd:short" />
</sequence>
</complexType>
- <complexType name="VitalThresholdDTO">
- <complexContent>
- <extension base="tns1:HTHBaseDTO">
- <sequence>
<element name="categoryPk" nillable="true" type="xsd:short" />
<element name="clientCarePlanPk" nillable="true" type="xsd:long" />
<element name="clientPk" nillable="true" type="xsd:integer" />
<element name="clientVitalPrescriptionPk" nillable="true" type="xsd:integer" />
<element name="statusPk" nillable="true" type="xsd:short" />
<element name="syncStatusPk" nillable="true" type="xsd:short" />
<element name="thresholdType" nillable="true" type="tns1:VitalThresholdEnum" />
<element name="thresholdValue" nillable="true" type="xsd ouble" />
<element name="unitTy


hoping for positive replies from your side.

Thanks & regards
Vikram K
 
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic