Ashish K Agarwal
Ashish K Agarwal

Reputation: 1172

Issue in WSDL2Java

I am trying to use wsdl2java utility to 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.

Upvotes: 1

Views: 916

Answers (1)

Sixto Saez
Sixto Saez

Reputation: 12680

This is just a guess but you may need to replace the & character in the location attributes URL value with &amp; 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&amp;style=document" namespace="urn:OFTCoreLookupDataWsd/OFTCoreLookupDataConfig/document"/>

Upvotes: 3

Related Questions