Re: WS::Client package fails to load wsdl



yahalom wrote:
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:
::WS::Client::GetAndParseWsdl
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
the wsdl:
<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?.
The import command in a WSDL states to go to that site and load the scheme
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.

.



Relevant Pages

  • Re: [PHP] nuSoap client SOAP Call problem
    ... Then serialize the envelope so it looks like a SOAP request. ... The action variable is that the URL of the WSDL? ... I guess you didn't provide a namespace in the serializeEnvelope method. ... I assume that it was send it as an array element therefore the 0 appeared causing the XML page to be invalid. ...
    (php.general)
  • Re: WSDL help
    ... import binding 'pngwsdlBinding' from namespace 'urn:pngwsdl'. ... Any idea on how to fix the wsdl so that it will import properly and ... still interface with the Web service. ... If that doesn't work for you, then you need to change the 'targetNameSpace' and 'urn' to a namespace that .NET likes, look up what the targetNameSpace means in XML and how to change it. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WSDL help
    ... import binding 'pngwsdlBinding' from namespace 'urn:pngwsdl'. ... Any idea on how to fix the wsdl so that it will import properly and ... still interface with the Web service. ... If that doesn't work for you, then you need to change the 'targetNameSpace' and 'urn' to a namespace that .NET likes, look up what the targetNameSpace means in XML and how to change it. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Problem generating code with wsdl
    ... I generated both server implementation of the wsdl, and a client proxy. ... The operation binding 'getAvaluos' from namespace ...
    (microsoft.public.dotnet.framework.webservices)
  • SOAP From WSDL - Namespaces
    ... I am composing a SOAP request message from a WSDL definition, ... namespace (as this was pointed to by the "part" section of the WSDL ... target namespace of the "updateStatusNotification" element in the WSDL. ...
    (comp.text.xml)