I was wondering if i could get some help with the following issue.
I was trying to run the command below using jax to generate web service client proxy:
wsimport http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
but i'm getting the following error:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Asher>wsimport http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
parsing WSDL...
[WARNING] src-resolve.4.2: Error resolving component 's:schema'. It was detected that 's:schema' is in namespace 'http:/
/www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'http://www.h
olidaywebservice.com/Holidays/HolidayService.asmx?WSDL#types?schema1'. If this is the incorrect namespace, perhaps the p
refix of 's:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be ad
ded to 'http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL#types?schema1'.
line 15 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL#types?schema1
[ERROR] undefined element declaration 's:schema'
line 15 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
[ERROR] undefined element declaration 's:schema'
line 36 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
[ERROR] undefined element declaration 's:schema'
line 74 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
[ERROR] undefined element declaration 's:schema'
line 97 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
[ERROR] undefined element declaration 's:schema'
line 120 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
[ERROR] undefined element declaration 's:schema'
line 131 of http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL
C:\Users\Asher>
First of all am i doing something incorrectly? And lastly if there's no way to generate a proxy client then is there any other way to access this webservice & it's methods in java. I'm fairy new to java so any help would be greatly appreciated.
Thanks
How did you create that WSDL? It seams that you refer some data types that are not exported in your WSDL.
EDIT
The wsdl refers to a schema named 's' but this can't be found, because its URL is
http://www.w3.org/2001/XMLSchema but should be
http://www.w3.org/2001/XMLSchema.xsd
after change that now it also complains about http://www.27seconds.com/Holidays/ that isn't pointing to a schema too. You need to fix all of them in your copy of the WSDL and then do the wsimport with it.
I also gone to www.holidaywebservice.com and found there's a second version at: http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl
You can pass XMLschema as parameter on wsimport
There are potential name conflicts in schema for schema. A workaround is to create customization.xjb with following
your ultimate call would be