You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tevoi Andrea <te...@cad.it> on 2003/07/31 10:47:57 UTC
R: wsdl:import URL (old question)
Hi Anne,
sorry fo this old question, but reading the wsdl spec at http://www.w3.org/TR/wsdl#_document-n,
i think that location could be relative instead of namespace that must be full.
what do you think about?
A.T.
> -----Messaggio originale-----
> Da: Anne Thomas Manes [mailto:anne@manes.net]
> Inviato: martedì 15 aprile 2003 14.58
> A: axis-user@ws.apache.org
> Oggetto: RE: wsdl:import URL
>
>
> You can store the WSDL file wherever you like. (I suggest
> putting it under
> Axis, too -- but it can go anywhere, as long as it's accessible.)
> You must specify the full url of the WSDL file (e.g.,
> http://www.tempuri.org/myapps/axis/my.wsdl) in the
> wsdl:import location.
>
> Anne
>
> > -----Original Message-----
> > From: Tevoi Andrea [mailto:tevoi@cad.it]
> > Sent: Tuesday, April 15, 2003 5:01 AM
> > To: axis-user@ws.apache.org
> > Subject: R: wsdl:import URL
> >
> >
> > Thanks very much for your answer.
> > Now, I can put wsdl 1 under Axis specifying its location in the
> > wsdd and Axis can successfully reach it. But, what about wsdl 2?
> > As far as I know Axis servlet manage a Get request with wsdl
> > query string searching in the location specified in the wsdd.
> > But, if wsdl 1 imports wsdl2 which kind of url should I specify
> > in wsdl:import location?
> >
> > thanks again,
> >
> > A.T.
> >
> > > -----Messaggio originale-----
> > > Da: Anne Thomas Manes [mailto:anne@manes.net]
> > > Inviato: lunedì 14 aprile 2003 20.02
> > > A: axis-user@ws.apache.org
> > > Oggetto: RE: wsdl:import URL
> > >
> > >
> > > Location must be a full URL, not a relative URL, per the
> WSDL spec.
> > > See http://www.w3.org/TR/wsdl#_document-n.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Tevoi Andrea [mailto:tevoi@cad.it]
> > > > Sent: Monday, April 14, 2003 12:41 PM
> > > > To: axis-user@ws.apache.org
> > > > Subject: wsdl:import URL
> > > >
> > > >
> > > > Hi all,
> > > >
> > > > I have a wsdl(1) that imports another wsdl(2). They are deployed
> > > > under Axis and wsdd specifies the location of wsdl 1. A browser
> > > > can successfully show it. But wsdl2java cannot resolve import
> > > > location specified in wsdl. It seems that Axis servlet doesn't
> > > > manage servlet context relative URLs.
> > > >
> > > > I mean:
> > > >
> > > > <definitions name="1" targetNamespace="http://1"
> > > > xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://1"
> > > > xmlns:abs="http://2">
> > > > <import namespace="http://2" location="2.wsdl"/>
> > > > ...
> > > >
> > > > This is a portion of wsdl 1. Wsdl 2 is in the same
> > > directory under axis.
> > > >
> > > > Wsdl2java gives this exception:
> > > >
> > > > WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported
> > > > document at '2.wsdl'.: This file was not found: file:2.wsdl:
> > > > java.net.MalformedURLException: This file was not found:
> > > > file:2.wsdl at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(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(SymbolTable.
> > > > java:406) at
> > > >
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.
> > > > java:393) at
> > > >
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
> > > > at java.lang.Thread.!
> > > > run(Thread.java:536) 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(SymbolTable.
> > > > java:406) at
> > > >
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.
> > > > java:393) at
> > > >
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
> > > > at java.lang.Thread.run(Thread.java:536)
> > > >
> > > >
> > > > It seems that I must specify the full path on file system to
> > > > reach the imported wsdl 2.
> > > >
> > > > Any helps?
> > > >
> > > > thanks in advance,
> > > >
> > > > A.T.
> > > >
> > >
> >
>
>
Re: wsdl:import URL (old question)
Posted by Anne Thomas Manes <an...@manes.net>.
According to http://www.w3.org/TR/wsdl#_Toc492291094, any URI can be a
relative URI. Keep in mind, though, that the whole purpose behind the
location attribute is to allow the WSDL processor to retrieve the schema
file if necessary. It's not an uncommon practice to copy WSDL files around
(which tends to break relative URIs), so I consider it a best practice to
supply a fully qualified URI for the location attribute.
See http://www.w3.org/TR/1999/REC-html401-19991224/intro/intro.html#h-2.1.3
for more information on relative URIs.
Anne
----- Original Message -----
From: "Tevoi Andrea" <te...@cad.it>
To: <ax...@ws.apache.org>
Sent: Thursday, July 31, 2003 4:47 AM
Subject: R: wsdl:import URL (old question)
> Hi Anne,
> sorry fo this old question, but reading the wsdl spec at
http://www.w3.org/TR/wsdl#_document-n,
> i think that location could be relative instead of namespace that must be
full.
> what do you think about?
>
> A.T.
>
>
> > -----Messaggio originale-----
> > Da: Anne Thomas Manes [mailto:anne@manes.net]
> > Inviato: martedì 15 aprile 2003 14.58
> > A: axis-user@ws.apache.org
> > Oggetto: RE: wsdl:import URL
> >
> >
> > You can store the WSDL file wherever you like. (I suggest
> > putting it under
> > Axis, too -- but it can go anywhere, as long as it's accessible.)
> > You must specify the full url of the WSDL file (e.g.,
> > http://www.tempuri.org/myapps/axis/my.wsdl) in the
> > wsdl:import location.
> >
> > Anne
> >
> > > -----Original Message-----
> > > From: Tevoi Andrea [mailto:tevoi@cad.it]
> > > Sent: Tuesday, April 15, 2003 5:01 AM
> > > To: axis-user@ws.apache.org
> > > Subject: R: wsdl:import URL
> > >
> > >
> > > Thanks very much for your answer.
> > > Now, I can put wsdl 1 under Axis specifying its location in the
> > > wsdd and Axis can successfully reach it. But, what about wsdl 2?
> > > As far as I know Axis servlet manage a Get request with wsdl
> > > query string searching in the location specified in the wsdd.
> > > But, if wsdl 1 imports wsdl2 which kind of url should I specify
> > > in wsdl:import location?
> > >
> > > thanks again,
> > >
> > > A.T.
> > >
> > > > -----Messaggio originale-----
> > > > Da: Anne Thomas Manes [mailto:anne@manes.net]
> > > > Inviato: lunedì 14 aprile 2003 20.02
> > > > A: axis-user@ws.apache.org
> > > > Oggetto: RE: wsdl:import URL
> > > >
> > > >
> > > > Location must be a full URL, not a relative URL, per the
> > WSDL spec.
> > > > See http://www.w3.org/TR/wsdl#_document-n.
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Tevoi Andrea [mailto:tevoi@cad.it]
> > > > > Sent: Monday, April 14, 2003 12:41 PM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: wsdl:import URL
> > > > >
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I have a wsdl(1) that imports another wsdl(2). They are deployed
> > > > > under Axis and wsdd specifies the location of wsdl 1. A browser
> > > > > can successfully show it. But wsdl2java cannot resolve import
> > > > > location specified in wsdl. It seems that Axis servlet doesn't
> > > > > manage servlet context relative URLs.
> > > > >
> > > > > I mean:
> > > > >
> > > > > <definitions name="1" targetNamespace="http://1"
> > > > > xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://1"
> > > > > xmlns:abs="http://2">
> > > > > <import namespace="http://2" location="2.wsdl"/>
> > > > > ...
> > > > >
> > > > > This is a portion of wsdl 1. Wsdl 2 is in the same
> > > > directory under axis.
> > > > >
> > > > > Wsdl2java gives this exception:
> > > > >
> > > > > WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported
> > > > > document at '2.wsdl'.: This file was not found: file:2.wsdl:
> > > > > java.net.MalformedURLException: This file was not found:
> > > > > file:2.wsdl at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(Unknown
> > > > > Source) at com.ibm.wsdl.util.StringUtils.getURL(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(SymbolTable.
> > > > > java:406) at
> > > > >
> > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.
> > > > > java:393) at
> > > > >
> > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
> > > > > at java.lang.Thread.!
> > > > > run(Thread.java:536) 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(SymbolTable.
> > > > > java:406) at
> > > > >
> > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.
> > > > > java:393) at
> > > > >
> > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
> > > > > at java.lang.Thread.run(Thread.java:536)
> > > > >
> > > > >
> > > > > It seems that I must specify the full path on file system to
> > > > > reach the imported wsdl 2.
> > > > >
> > > > > Any helps?
> > > > >
> > > > > thanks in advance,
> > > > >
> > > > > A.T.
> > > > >
> > > >
> > >
> >
> >
>