【问题标题】:Generation javacode from WSDL [duplicate]从 WSDL 生成 javacode [重复]
【发布时间】:2016-02-20 08:09:15
【问题描述】:

我想从这个 wsdl 生成 java 代码: http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL

我使用命令:

wsimport -d C:\test http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL -Xnocompile

由于许多此类错误

[错误] 未定义的元素声明 's:schema' http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL 的第 55 行

更新

我试过undefined element declaration 'xs:schema' 使用命令>>

wsimport -b http://www.w3.org/2001/XMLSchema.xsd -b customize.xjb CreditOrgInfo.wsdl

得到一个错误:

org.xml.sax.SAXParseException;系统ID:w3.org/2001/XMLSchema.xsd;行号:67;列号:11;外部 DTD:无法读取外部 DTD“XMLSchema.dtd”,因为 accessExternalDTD 属性设置的限制不允许“http”访问。

【问题讨论】:

标签: java soap wsdl wsdl2java wsimport


【解决方案1】:

无论如何,我都能用你的命令生成代码。提供了我的输出。文件在文件系统中生成。

> wsimport   -b http://www.w3.org/2001/XMLSchema.xsd -b customization.xjb http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL -Xnocompile
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 compone
nts from this namespace are not referenceable from schema document 'http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL#types?schema1'. If this is the i
ncorrect namespace, perhaps the prefix of 's:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to
'http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL#types?schema1'.
  line 55 of http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL#types?schema1

[WARNING] Ignoring SOAP port "CreditOrgInfoSoap12": it uses non-standard SOAP 1.2 binding.
You must specify the "-extension" option to use this binding.
  line 2449 of http://www.cbr.ru/CreditInfoWebServ/CreditOrgInfo.asmx?WSDL

generating code...

【讨论】:

    猜你喜欢
    • 2023-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-01
    • 1970-01-01
    相关资源
    最近更新 更多