[英]Issue in WSDL2Java
I am trying to use wsdl2java
utility to generate POJOs. 我正在尝试使用wsdl2java
实用程序来生成POJO。 It's working fine for complete WSDL file. 它适用于完整的WSDL文件。 However, if a WSDL has 但是,如果WSDL有
<wsdl:import>
it fails. 它失败。 What's the way to generate POJOs from such WSDLs? 从这样的WSDL生成POJO的方法是什么?
Sample WSDL is: 示例WSDL是:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:bns0="urn:OFTCoreLookupDataWsd/OFTCoreLookupDataConfig/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="OFTCoreLookupDataWsd" targetNamespace="urn:OFTCoreLookupDataWsd">
<wsdl:import location="https://TARGET:443/OFTCoreLookupData/OFTCoreLookupDataConfig/bindings?wsdl&style=document" namespace="urn:OFTCoreLookupDataWsd/OFTCoreLookupDataConfig/document"/>
<wsdl:service name="OFTCoreLookupData">
<wsdl:port name="OFTCoreLookupDataConfigPort_Document" binding="bns0:OFTCoreLookupDataConfigBinding">
<soap:address location="https://TARGET:443/OFTCoreLookupData/OFTCoreLookupDataConfig?style=document"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The error I am getting is: 我得到的错误是:
The reference to entity "style" must end with the ';' 对实体“style”的引用必须以';'结尾 delimiter. 分隔符。
This is on 这是开启
<wsdl:import>
location in WSDL. WSDL中的位置。 Please help. 请帮忙。
This is just a guess but you may need to replace the &
character in the location attributes URL value with &
这只是猜测,但您可能需要将位置属性URL值中的&
字符替换为&
to have a proper WSDL document. 拥有一个合适的WSDL文档。 The problem is probably due to XML parsing and not the WSDL itself. 问题可能是由于XML解析而不是WSDL本身。 Here is how it would look: 它的外观如下:
<wsdl:import location="https://TARGET:443/OFTCoreLookupData/OFTCoreLookupDataConfig/bindings?wsdl&style=document" namespace="urn:OFTCoreLookupDataWsd/OFTCoreLookupDataConfig/document"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.