axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tevoi Andrea" <te...@cad.it>
Subject R: wsdl:import URL
Date Tue, 15 Apr 2003 14:56:43 GMT
As far as i know, you can bypass the automatic generation of wsdl simply storing your own wsdl
file in the axis classpath (in the classes directory) and specifying its location in wsdd
under <service> element.

for example: 
<service name="MyService" provider="java:MyProvider">
<wsdlFile>1.wsdl</wsdlFile>
...

So, storing 1.wsdl in classpath, Axis (with ?wsdl syntax) can successfully retrieve 1.wsdl
by the URL http://localhost:8080/axis/services/MyService?wsdl.

Now 1.wsdl actually imports another wsdl. Its filename is 2.wsdl.

But my question is: Where I have to store 2.wsdl under Axis?
If i store it under axis classpath (in the same directory of 1.wsdl) which URL i have to specify
in wsdl:import location?

I mean:
(portion of 1.wsdl file)

<definitions name="MyServiceBinding" targetNamespace="http://MyService/SOAPBinding" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://MyService/SOAPBinding" xmlns:abs="http://MyService/Abstract">
<import namespace="http://MyService/Abstract" location="??????????????????"/>

A.T.

> -----Messaggio originale-----
> Da: Anne Thomas Manes [mailto:anne@manes.net]
> Inviato: martedì 15 aprile 2003 16.30
> A: axis-user@ws.apache.org
> Oggetto: RE: wsdl:import URL
> 
> 
> The wsdl files that are addressed by ?wsdl are only the wsdl 
> files that are
> autogenerated by Axis when you deploy a service -- Axis generates the
> appropriate information for the <service> element at that 
> time. Since this
> wsdl file defines just a portion of the wsdl definition, you 
> have to store
> it in its own file. So give it a file name and store it somewhere.
> 
> > -----Original Message-----
> > From: Tevoi Andrea [mailto:tevoi@cad.it]
> > Sent: Tuesday, April 15, 2003 9:31 AM
> > To: axis-user@ws.apache.org
> > Subject: R: wsdl:import URL
> >
> >
> > Thanks again Anne, but I mean that I want to put the imported
> > wsdl under Axis.
> > Now, looking at Axis servlet source you can see that the doGet
> > method is implemented to respond to ...?wsdl query (to get 
> wsdl files).
> > Looking at web.xml you can see that url patterns are:
> >
> > /servlet/AxisServlet
> > *.jws
> > /services/*
> > /SOAPMonitor
> >
> > So, if I put the imported wsdl under axis deployment directory,
> > the URL becomes http://localhost:8080/axis/2.wsdl
> >
> > With this URL axis servlet doesn't responde (because of servlet
> > patterns in web.xml).
> > If the servlet container make it possible, with a browser you can
> > see file list and so the wsdl file too, but wsdl2java tool throws
> > an exception because the content-type isn't set.
> >
> > So... I think that the problem is that Axis servlet doesn't
> > manage Get request that doesn't end with ?wsdl.
> >
> > What do you think about?
> >
> > thanks again,
> >
> > 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.
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
> 
> 

Mime
View raw message