You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by Oshani Seneviratne <os...@gmail.com> on 2006/05/09 11:16:49 UTC
How to parse a WSDL with woden
Hi all,
I am using the M4 jars and was simply trying to read a WSDL using woden. I
read the wsdl into a string called 'wsdlString' and did this:
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
DescriptionElement description = reader.readWSDL(wsdlString);
When I run that piece of code I get the following:
_________________________________________________________________________________
Exception in thread "main" WSDLException: faultCode=PARSER_ERROR: Could not
create a URL from context URI "null" and location URI " [ wsdl document ]"
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at org.apache.woden.internal.util.StringUtils.getURL(Unknown Source)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(Unknown Source)
at woden.SimpleApp.main(SimpleApp.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(Unknown Source)
at woden.SimpleApp.main(SimpleApp.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
_________________________________________________________________________________
I have attached the wsdl I used for this.
Could somebody please point out what I'm doing wrong here?
Thanx in advance,
Oshani
Re: How to parse a WSDL with woden
Posted by Arthur Ryman <ry...@ca.ibm.com>.
Oshani,
You need to use a URI. You're probably just using a filename.
Try something like:
String wsdlLoc =
"file:///D:/workspaces/Woden/woden-java/ant-test/test.wsdl";
DescriptionElement desc = reader.readWSDL(wsdlLoc);
Arthur Ryman,
IBM Software Group, Rational Division
blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca
"Oshani Seneviratne" <os...@gmail.com>
05/09/2006 05:16 AM
Please respond to
woden-dev@ws.apache.org
To
woden-dev@ws.apache.org
cc
Subject
How to parse a WSDL with woden
Hi all,
I am using the M4 jars and was simply trying to read a WSDL using woden. I
read the wsdl into a string called 'wsdlString' and did this:
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
DescriptionElement description = reader.readWSDL(wsdlString);
When I run that piece of code I get the following:
_________________________________________________________________________________
Exception in thread "main" WSDLException: faultCode=PARSER_ERROR: Could
not create a URL from context URI "null" and location URI " [ wsdl
document ]"
at java.net.URL.<init>( URL.java:567)
at java.net.URL.<init>(URL.java:464)
at org.apache.woden.internal.util.StringUtils.getURL(Unknown Source)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(Unknown Source)
at woden.SimpleApp.main(SimpleApp.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
at org.apache.woden.internal.DOMWSDLReader.readWSDL (Unknown Source)
at woden.SimpleApp.main(SimpleApp.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java
:90)
_________________________________________________________________________________
I have attached the wsdl I used for this.
Could somebody please point out what I'm doing wrong here?
Thanx in advance,
Oshani
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org