Re: WS::Client package fails to load wsdl
- From: Bruce <doNOTmailMe@xxxxxxxxxxx>
- Date: Thu, 18 Sep 2008 09:13:25 -0500
On Sep 18, 7:20 am, "Gerald W. Lester" <Gerald.Les...@xxxxxxx> wrote:yahalom wrote:I try to work with a web service using WS package. the command:The import command in a WSDL states to go to that site and load the scheme
failed with "couldn't open socket: host is unreachable (Name or
service not known)"
digging into the package I found it tries to get the url that is in
<import namespace="http://containers.logic.common.team.xor.com" />
this url is down. BUT when we work from other languages like C# and
java there is no problem to parse the wsdl. When I remove the url the
parsing works fine.
any insignt about it?.
found there (presumably it contains required data structure definitions --
but since you say it works fine without it, I guess it does not).
You have the following options:
1) Get XOR.com to get their site up
2) Get the WSDL author to remove the unneeded import
3) Copy the WSDL to your disk, remove the import, and use
your edited version as the WSDL to parse.
Now the real question in my mind, is why does C# and Java not fail!
This is also something I wondered about and that is why I posted the
quesion. I know I can remove the unneeded import but I also wondered
why other env did not fail. maybe it is better that this will be the
default behaviour unless a 'strict' option will be stated.
a wsdl import command can associate a namespace with a location. The
item you posted has no location attribute. and even though the namespace
looks like a URL (and many do) they don't have to be. and many tools can
externally defined resource locations for namespaces so when they parse
a WSDL with a namespace they just grab the local copy they have that defines
that namspace. falling back the the namespace as a url when no location
is given is possibly acceptable. I think most tools would just silenty
(or perhaps a warnig in a log) ignore the import and then fail later if
you referred to something that you needed from it. in this case it appears
you aren't needing it at all.