Reputation: 121
I've made a WSDL file and I intend to create top down web service out of it. Unfortunately, Eclipse throws this error:
"A problem occurred while running the WSDL validator for namespace http://schemas.xmlsoap.org/wsdl/"
I've made some research and it looks like it's happening because of some Eclipse wsdl-validation bug, explained here
Some guy there claims that he fixed this error with patch, and I've applied it, but the error stays and I'm starting to think that there's some problem with my wsdl file itself.
WebService is supposed to take a list(column) of ID's and return a 2-column table data based on those ID's.
Can you help me find out what is wrong with it?
Eclipse Java EE IDE for Web Developers. Version: Mars.2 Release (4.5.2) Build id: 20160218-0600 WTP 1.2.1.20150819-2220
Here's WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="reb.ecm.ws.RebUtilsService"
xmlns="reb.ecm.ws.RebUtilsService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:complexType name='DPList'>
<xsd:element
minOccurs='0'
maxOccurs='unbounded'
name='DP'
type='DP'/>
</xsd:complexType>
<xsd:complexType name='DP'>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='DPID'
type='xsd:int'/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name='WSInfoList'>
<xsd:element
minOccurs='0'
maxOccurs='unbounded'
name='WSInfoItem'
type='WSInfoItem'/>
</xsd:complexType>
<xsd:complexType name='WSInfoItem'>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='DPID'
type='xsd:int'/>
</xsd:all>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='WSID'
type='xsd:int'/>
</xsd:all>
</xsd:complexType>
</wsdl:types>
<wsdl:message name="inMessage">
<wsdl:part name="DPList" type="DPList" />
</wsdl:message>
<wsdl:message name="outMessage">
<wsdl:part name="WSInfoList" type="WSInfoList" />
</wsdl:message>
<wsdl:portType name="RebUtilsServicePortType">
<wsdl:operation name="GetActualWSIDbyDPID" >
<wsdl:input message="inMessage" />
<wsdl:output message="outMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RebUtilsServiceHTTPBinding"
type="RebUtilsServicePortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetActualWSIDbyDPID">
<wsdlsoap:operation soapAction=""/>
<wsdl:input>
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RebUtilsServicePorts">
<wsdl:port binding="RebUtilsServiceHTTPBinding" name="RebUtilsService">
<wsdlsoap:address
location="http://localhost:9084/RebUtilsService/RebUtilsServicePorts"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
UPDATE: There were no problem with Eclipse. At least patch, mentioned earlier fixed something.
Upvotes: 2
Views: 3105
Reputation: 3074
Answer
General Rule
While creating a SOAP Service, Please define your required input/output XSD schemas
Using schema as in input you need to generate the WSDL file using your IDE/Maven/any build tool.
For easier manipulations/Edits, please choose Eclipse WSDL Editor.
Upvotes: 2