Hi, My wsdl path is "http://localhost:8081/axis/services/ZZGWOPR?wsdl". With WSDL2Java I can retrieve this wsdl, but it imports another wsdl: ... <wsdl:import namespace="..." location="./ZZGWOPRAbstract.wsdl"/> ...
As you can see location refers to a relative path, not absolute. I don't know if Axis works fine with absolute path. I think it is a problem of Axis Server rather than WSDL2Java tool. Below is the exception thrown: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at './ZZGWOPRAbstract.wsdl'.: This file was not found: file:./ZZGWOPRAbstract.wsdl: java.net.MalformedURLException: This file was not found: file:./ZZGWOPRAbstract.wsdl at com.ibm.wsdl.util.StringUtils.getURL(Unknown Source) ... ------------ Andrea Tevoi > -----Original Message----- > From: Xia, Ge [mailto:[EMAIL PROTECTED]] > Sent: venerd� 7 febbraio 2003 19.07 > To: [EMAIL PROTECTED] > Subject: RE: import in wsdl > > > Hi, > > For the relative path, what does your location attribute look > like? If you can post that and the path of wsdl and the path > you run WSDL2Java, it will help. > > I work on win2k and my experience is it works with either > relative or absolute path. However, if I have an imported xsd > file in wsdl, it doesn't work with an URL format. But if I > define the schema in the <wsdl:types> section, it works. I > am using Axis beta 1.1. > > Below is an example: (my.wsdl has an imported schema: > location="http://localhost/axis/schema/my.xsd") Both files > can be viewed in the browser by putting the urls in the browser. > > C:\>java org.apache.axis.wsdl.WSDL2Java --server-side > http://localhost/axis/wsdl/my.wsdl > > It gives such error: > > WSDLException: faultCode=OTHER_ERROR: Unable to resolve > imported document at 'http://localhost/axis/schema/my.xsd'.: > java.lang.NullPointerException > > at java.net.URLConnection.stripOffParameters(Unknown Source) > at java.net.URLConnection.getContentHandler(Unknown Source) > at java.net.URLConnection.getContent(Unknown Source) > at java.net.URL.getContent(Unknown Source) > at > com.ibm.wsdl.util.StringUtils.getContentAsReader(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source) > at > com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa > ble.java:380) > at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa > ble.java:367) > at > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:246) > at java.lang.Thread.run(Unknown Source) > > at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source) > at > com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa > ble.java:380) > at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa > ble.java:367) > at > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:246) > at java.lang.Thread.run(Unknown Source) > > Anyone has an idea? > > Thanks. > > > > -----Original Message----- > From: Tevoi Andrea [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 07, 2003 2:30 AM > To: [EMAIL PROTECTED] > Subject: import in wsdl > > > Hi all, > > I have a WSDL that imports other WSDL and Schemas. My > question is: does Axis manage imports with relative path? I > mean: Could location attribute be something like > "./otherWSDL.wsdl" or must be an absolute path? > When I use WSDL2Java to retrieve WSDL information, Axis > doesn't get imports with relative path. > Is there any way to do this? > > thanks, > > Andrea Tevoi > >
