Prev: Tiny url
Next: ANNOUNCE: Hugelist 1.5
From: Mark-in-TN on 12 Jan 2010 16:16 I'm using the WS Client 1.1.2 to try to parse a wsdl generated by Visual Studio. The wsdl contains this line: <s:import namespace="http://microsoft.com/wsdl/types/" /> The parse fails when it encounters this import giving this message: HTTP get of import file failed 'http://microsoft.com/wsdl/types/' while executing "processImport $mode $baseUrl $element $serviceName serviceInfo tnsCount" If I go into the processImport method in the WS Client Utilities module and run it line by line, this is the result: % set token [ ::http::geturl http://microsoft.com/wsdl/types/ ] ::http::1 % ::http::wait $token ok % set ncode [ ::http::ncode $token ] 301 % set xml [ ::http::data $token ] redmond\<!--TOOLBAR_EXEMPT--> After this, it generates the error message noted above - HTTP get of import file failed 'http://microsoft.com/wsdl/types/ I'm not 100% sure if the import is really needed. If anyone has any ideas about how to successfully process this import or how to by-pass it, I'd appreciate your help. Thanks in advance.
From: tom.rmadilo on 12 Jan 2010 18:05 On Jan 12, 1:16 pm, Mark-in-TN <mark050...(a)yahoo.com> wrote: > I'm using the WS Client 1.1.2 to try to parse a wsdl generated by > Visual Studio. The wsdl contains this line: > > <s:import namespace="http://microsoft.com/wsdl/types/" /> > > The parse fails when it encounters this import giving this message: > > HTTP get of import file failed 'http://microsoft.com/wsdl/types/' > while executing > "processImport $mode $baseUrl $element $serviceName serviceInfo > tnsCount" > > If I go into the processImport method in the WS Client Utilities > module and run it line by line, this is the result: > > % set token [ ::http::geturlhttp://microsoft.com/wsdl/types/] > ::http::1 > % ::http::wait $token > ok > % set ncode [ ::http::ncode $token ] > 301 > % set xml [ ::http::data $token ] > redmond\<!--TOOLBAR_EXEMPT--> > > After this, it generates the error message noted above - HTTP get of > import file failed 'http://microsoft.com/wsdl/types/ > > I'm not 100% sure if the import is really needed. If anyone has any > ideas about how to successfully process this import or how to by-pass > it, I'd appreciate your help. > > Thanks in advance. Of course the namespace http://microsoft.com/wsdl/types/ is just that: a namespace. It may not correspond to the location of the schema. What you might do is to see if/what types are actually used. I remember a case where the only thing used was something like a serial number, defined via a regular expression. But I think the schema was included in the wsdl file. Good luck!
From: Gerald W. Lester on 13 Jan 2010 15:29 Mark-in-TN wrote: > I'm using the WS Client 1.1.2 to try to parse a wsdl generated by > Visual Studio. The wsdl contains this line: > > <s:import namespace="http://microsoft.com/wsdl/types/" /> > > The parse fails when it encounters this import giving this message: > > HTTP get of import file failed 'http://microsoft.com/wsdl/types/' > while executing > "processImport $mode $baseUrl $element $serviceName serviceInfo > tnsCount" > > If I go into the processImport method in the WS Client Utilities > module and run it line by line, this is the result: > > % set token [ ::http::geturl http://microsoft.com/wsdl/types/ ] > ::http::1 > % ::http::wait $token > ok > % set ncode [ ::http::ncode $token ] > 301 > % set xml [ ::http::data $token ] > redmond\<!--TOOLBAR_EXEMPT--> > > After this, it generates the error message noted above - HTTP get of > import file failed 'http://microsoft.com/wsdl/types/ > > I'm not 100% sure if the import is really needed. If anyone has any > ideas about how to successfully process this import or how to by-pass > it, I'd appreciate your help. I do not know if your WSDL needs the types or not. One way to find out is to edit your copy of the processImport so it does not fail if it can not get the file -- then when you will get an error if you try to use one of those types at run time rather then when it can nto find the scheme to import. That being said, it appears that either I did not deal with a case that I did not understand -- where there is not scheme to import, just a namespace definition. If that is what is going on here, then the correct answer would be to modify processImport to say if the URL ends with a "/" to just enter it into the know namespaces and return without attempting to do a request for the schema. Hope that helps -- send me a private email with any changes you find work and I'll attempt to integrate them in as I find time. -- +------------------------------------------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervantes| +------------------------------------------------------------------------+
From: Neil Madden on 14 Jan 2010 08:30 Mark-in-TN wrote: > I'm using the WS Client 1.1.2 to try to parse a wsdl generated by > Visual Studio. The wsdl contains this line: > > <s:import namespace="http://microsoft.com/wsdl/types/" /> Is this an XSD import or a WSDL import? I believe it is the former, as no location has been specified (this is mandatory in WSDL, but not in XSD). > > The parse fails when it encounters this import giving this message: > > HTTP get of import file failed 'http://microsoft.com/wsdl/types/' > while executing > "processImport $mode $baseUrl $element $serviceName serviceInfo > tnsCount" > > If I go into the processImport method in the WS Client Utilities > module and run it line by line, this is the result: > > % set token [ ::http::geturl http://microsoft.com/wsdl/types/ ] > ::http::1 > % ::http::wait $token > ok > % set ncode [ ::http::ncode $token ] > 301 This is a HTTP redirect code. You can follow these redirects using the code on http://wiki.tcl.tk/11831 . However, in this case it just redirects to http://www.microsoft.com/wsdl/types/ which then returns a 404 code (not found). From a Google search, it appears that VS generates questionable WSDL/XSD. In particular, it generates references to this XSD schema with types like "GUID" but then fails to actually provide a schema defining these. Not terribly surprising, unfortunately. My advice would be to manually edit the WSDL file to remove references to any MS-specific types like this, and try to use standard XSD types instead where possible. If you have any level of tech support from Microsoft, then raise an issue with them to fix their software or provide an actual schema definition for these types. -- Neil
From: tom.rmadilo on 14 Jan 2010 11:39 On Jan 14, 5:30 am, Neil Madden <n...(a)cs.nott.ac.uk> wrote: > Mark-in-TN wrote: > > I'm using the WS Client 1.1.2 to try to parse a wsdl generated by > > Visual Studio. The wsdl contains this line: > > > <s:import namespace="http://microsoft.com/wsdl/types/" /> > > Is this an XSD import or a WSDL import? I believe it is the former, as > no location has been specified (this is mandatory in WSDL, but not in XSD). Although you can't do much about automatically generated schemas, this is one of the worst features of WSDL. Imports make sense when you have a few professionals on hand to deal with long term projects, but makes no sense in WSDL where the goal is interoperability. > From a Google search, it appears that VS generates questionable > WSDL/XSD. In particular, it generates references to this XSD schema with > types like "GUID" but then fails to actually provide a schema defining > these. Not terribly surprising, unfortunately. I think I've seen the schema in the same WSDL document, below the main schema. > My advice would be to > manually edit the WSDL file to remove references to any MS-specific > types like this, and try to use standard XSD types instead where > possible. Good advice. Automatic schema generators are just one step above the old xml-rpc stuff. Usually the generated service isn't very useful outside of the original language. > If you have any level of tech support from Microsoft, then > raise an issue with them to fix their software or provide an actual > schema definition for these types. I actually provided an example of a schema type definition of the MS guid here (using tWSDL to derive the type): http://junom.com/document/tWSDL/api-types.html The definition was: ::wsdl::types::simpleType::restrictionByPattern vs guid xsd::string { [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F] {12}} Then in Tcl, a validation example is: $::wsdb::types::vs::guid::validate 92ab783d-9303-571F- AC32-03bAcD9671F1
|
Pages: 1 Prev: Tiny url Next: ANNOUNCE: Hugelist 1.5 |