Issue in WSDL2Java
I am trying to use wsdl2java
utility t开发者_如何学编程o generate POJOs. It's working fine for complete WSDL file. However, if a WSDL has
<wsdl:import>
it fails. What's the way to generate POJOs from such WSDLs?
Sample WSDL is:
<?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 ';' delimiter.
This is on
<wsdl:import>
location in WSDL. Please help.
This is just a guess but you may need to replace the &
character in the location attributes URL value with &
to have a proper WSDL document. The problem is probably due to XML parsing and not the WSDL itself. Here is how it would look:
<wsdl:import location="https://TARGET:443/OFTCoreLookupData/OFTCoreLookupDataConfig/bindings?wsdl&style=document" namespace="urn:OFTCoreLookupDataWsd/OFTCoreLookupDataConfig/document"/>
精彩评论