cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ma, Erqiang \(Jim\)" <>
Subject Question about WSDLServiceBuilder
Date Wed, 31 Jan 2007 06:48:43 GMT
Hi all, 

WSDLServiceBuilder will fail to build service when given the following wsdl contains two ports
which reference the different portType :

	<wsdl:service name="SOAPService">
		<wsdl:port binding="prw:Printer_SOAPBinding"
				location="http://localhost:9000/PrinterService/PrinterSOAPPort" />
				xmlns:wswa="" />
		<wsdl:port binding="prw:Job_SOAPBinding" name="JobSOAPPort">
				location="http://localhost:9000/PrinterService/JobSOAPPort" />
				xmlns:wswa="" />

WSDLServiceBuilder will complain all endpoints must share the same portType.  I noticed these
codes in WSDLServiceBuilder will be used to check if same portType is referenced by multiple
port . 

        PortType portType = null;
        for (Port port : cast(serv.getPorts().values(), Port.class)) {
            if (portType == null) {
                portType = port.getBinding().getPortType();
            } else if (port.getBinding().getPortType() != portType) {
                throw new IllegalStateException("All endpoints must share the same portType");

Why does it need to check this?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message