问题描述
我想知道我是否可以获得以下问题的帮助。
I was wondering if i could get some help with the following issue.
我试图使用jax运行以下命令来生成Web服务客户端代理: / p>
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
但我收到以下错误:
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>
首先,我做错了什么?最后,如果无法生成代理客户端,那么有没有其他方法可以访问此Web服务&它是java中的方法。
我是java的新手,所以任何帮助都会非常感激。
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.
谢谢
推荐答案
您是如何创建WSDL的?它会引用一些未在WSDL中导出的数据类型。
How did you create that WSDL? It seams that you refer some data types that are not exported in your WSDL.
编辑
wsdl引用一个名为's'的模式,但是找不到它,因为它的URL是
但应该是
.xsd
更改后现在还抱怨也没有指向架构。你需要在你的WSDL副本中修复所有这些,然后用它来执行wsimport。
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.
我也去了www.holidaywebservice.com并发现有一秒钟版本:
I also gone to www.holidaywebservice.com and found there's a second version at:http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl
这篇关于使用Jax生成代理Web服务客户端时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!