This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Seen on Windows XP with Gavotte 070125_12 and JDK 1.5.0_10. (This is a regression that I'll bet is related to the fix for issue 91450.) 1. Open the attached WSDL and validate it. This file should be valid. According to the WSDL 1.1 spec, section 2.5 (http://www.w3.org/TR/wsdl#_bindings): An operation element within a binding specifies binding information for the operation with the same name within the binding's portType. Since operation names are not required to be unique (for example, in the case of overloading of method names), the name attribute in the operation binding element might not be enough to uniquely identify an operation. In that case, the correct operation should be identified by providing the name attributes of the corresponding wsdl:input and wsdl:output elements. The port type looks like this: <portType name="goodRRFOperationPortType"> <operation name="goodRRFOperationOperation"> <input name="input1" message="tns:goodRRFOperationOperationRequest"/> <output name="output1" message="tns:goodRRFOperationOperationReply"/> <fault name="fault1" message="tns:goodRRFOperationOperationFault"/> </operation> <operation name="goodRRFOperationOperation"> <input name="input2" message="tns:goodRRFOperationOperationRequest"/> <output name="output2" message="tns:goodRRFOperationOperationReply"/> <fault name="fault2" message="tns:goodRRFOperationOperationFault"/> </operation> </portType> And the binding where the error is flagged looks like this: <binding name="secondBinding" type="tns:goodRRFOperationPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="goodRRFOperationOperation"> <soap:operation/> <input name="input2"> <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/goodRRFOperation"/> </input> <output name="output2"> <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/goodRRFOperation"/> </output> <fault name="fault2"> <soap:fault use="literal" name="fault2" namespace="http://j2ee.netbeans.org/wsdl/goodRRFOperation"/> </fault> </operation> </binding> It appears from the error messages (attached), that the validator is confused about which of the two port operations it is supposed to be looking at for the binding operation, and fails to recognize that it maps to the second port operation.
Created attachment 37683 [details] Validation errors.
Created attachment 37684 [details] WSDL document used in the scenario.
Since I dumped everything else in here, I might as well include the contents of the XML check pane: XML validation started. C:/cokebuilds/projects/WSDLSemantics/src/bindingTests/operations/bindingRRFMultiOpsNonUniqueOpName_valid.wsdl:48,12 Input name attribute in binding operation "goodRRFOperationOperation" in binding "secondBinding" should match input name attribute in the corresponding operation in portType "goodRRFOperationPortType". : Ensure that the input name in portType operation "goodRRFOperationOperation" is the same as the name in the corresponding binding operation. C:/cokebuilds/projects/WSDLSemantics/src/bindingTests/operations/bindingRRFMultiOpsNonUniqueOpName_valid.wsdl:51,12 Output name attribute in binding operation "goodRRFOperationOperation" in binding "secondBinding" should match output name attribute in the corresponding operation in portType "goodRRFOperationPortType". : Ensure that the output name in portType operation "goodRRFOperationOperation" is the same as the name in the corresponding binding operation. C:/cokebuilds/projects/WSDLSemantics/src/bindingTests/operations/bindingRRFMultiOpsNonUniqueOpName_valid.wsdl:46,8 Faults in binding operation "goodRRFOperationOperation" in binding "secondBinding" should match faults in the corresponding operation in portType "goodRRFOperationPortType". : Ensure that the faults in portType operation "goodRRFOperationOperation" has matching counterparts in the corresponding binding operation. 1 Error(s), 2 Warning(s). XML validation finished.
You are correct. The validator should consider the names of the messages in the binding section when matching overloaded operations with those in the porttype section.
This is fixed. get the reference operation from binding operation, not the first operation matching from portType operations. add Junit tests.
I don't see this fix in the EP Gavotte 070207_9 build. With virtually same situation, I get the following messages: XML validation started. C:/Documents and Settings/lautz/BpelModule9/src/newWSDL.wsdl:36,12 Warning: Input name attribute in binding operation "newWSDLOperation" in binding "newWSDLBinding" should match input name attribute in the corresponding operation in portType "newWSDLPortType". : Ensure that the input name in portType operation "newWSDLOperation" is the same as the name in the corresponding binding operation. C:/Documents and Settings/lautz/BpelModule9/src/newWSDL.wsdl:39,12 Warning: Output name attribute in binding operation "newWSDLOperation" in binding "newWSDLBinding" should match output name attribute in the corresponding operation in portType "newWSDLPortType". : Ensure that the output name in portType operation "newWSDLOperation" is the same as the name in the corresponding binding operation. C:/Documents and Settings/lautz/BpelModule9/src/newWSDL.wsdl:34,8 Error: Faults in binding operation "newWSDLOperation" in binding "newWSDLBinding" should match faults in the corresponding operation in portType "newWSDLPortType". : Ensure that the faults in portType operation "newWSDLOperation" has matching counterparts in the corresponding binding operation. 1 Error(s), 2 Warning(s). XML validation finished. WSDL file attached.
Created attachment 38210 [details] WSDL file used for retest.
I reverified this today. The fix works. Did not get any errors.
Verified on Windows XP with EP Gavotte 070214_2 and JDK 1.5.0_10.