I recently worked on the ACORD P & C web service and ran into some wsimport error issues saying that it cannot parse one of the xsd files. Error message:
[ERROR] Unable to parse "D:\projects\DICACORD\DicAcordQuoteRq.xsd" : Illegal character in opaque part at index 2: D:\projects\DICACORD\DicAcordQuoteRq.xsd
The created scheme is based on the ACORD P & C scheme (more than 23 thousand lines), and I included in it only the necessary elements that the company needs to use. I created the schemas using XMLSpy and according to its validation the schemas are valid, but when I try to create a web service in netbeans 6.8, I get the error message above.
The schemas are on my development machine and in accordance with what I can find on the netbeans forums. netbeans copies wsdl to a directory inside the project, so when you move it from development to production, everything still works as intended.
wsdl is as follows
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="discoveryinsurance.com/schemas" xmlns:ns="discoveryinsurance.com/schemas/acordRq" xmlns:ns1="discoveryinsurance.com/schemas/acordRs" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="discoveryinsurance.com/schemas">
<wsdl:import namespace="discoveryinsurance.com/schemas/acordRq" location="D:\projects\DICACORD\DicAcordQuoteRq.xsd"/>
<wsdl:import namespace="discoveryinsurance.com/schemas/acordRs" location="D:\projects\DICACORD\DicAcordQuoteRs.xsd"/>
<wsdl:types>
<xs:schema targetNamespace="discoveryinsurance.com/schemas" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" element="ns:ACORD"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" element="ns1:ACORD"/>
</wsdl:message>
<wsdl:portType name="QuotePort">
<wsdl:operation name="QuoteRequest">
<wsdl:input name="quoteInput" message="tns:NewMessageRequest"/>
<wsdl:output name="quoteOutput" message="tns:NewMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AgencyQuoteSOAP" type="tns:QuotePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="QuoteRequest">
<soap:operation soapAction="urn:QuoteRequest" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AgencyQuote">
<wsdl:port name="QuotePort" binding="tns:AgencyQuoteSOAP">
<soap:address location="http://localhost:8084/DicQuoteSvc/AgencyQuote"/>
</wsdl:port>
</wsdl:service>
It seems to me that this has something to do with namespaces, but I'm not sure. This is also the first time that I have tried to create a web service this way because I thought I would save development time.
I tried to send an error message and everything I read indicates an invalid URI. I thought that checking XMLSpy would result in an error like this, but if it is a problem, it will not catch it.
Any help would be greatly appreciated and I will be happy to provide any other information I need.
source
share