Community
Participate
Working Groups
For the WSDL file the WSDL validator reports that a port type is not defined, even though it is. The reason of the validation failure is <xsd:annotation> element inserted into the portTypes' operations. Incorrect: <wsdl:portType name="test"> <wsdl:operation name="NewOperation"> <xsd:annotation> </xsd:annotation> <wsdl:input message="tns:NewOperationRequest"/> <wsdl:output message="tns:NewOperationResponse"/> </wsdl:operation> </wsdl:portType> Correct: <wsdl:portType name="test"> <wsdl:operation name="NewOperation"> <wsdl:input message="tns:NewOperationRequest"/> <wsdl:output message="tns:NewOperationResponse"/> </wsdl:operation> </wsdl:portType> It is desirable to provide a more specific error message pointing to the root cause of the problem.
Can you please attach a small sample WSDL document that demonstrates the problem. Thank you.
Created attachment 104081 [details] sample wsdl
I would like to get this bumped up in priority, or at least get some action going on this. These errors occur in all of our wsdls that are generated using JAX-WS from our @WebService classes. They are easily fixed by adding the xmlns="[the default namesapce]" into the port and the binding, but since they are auto generated, this really is not a fix. Has anybody been able to look at this yet? Thanks
I took a quick look at the problem. A few things are happening: - in older WTP versions, the WSDL validator used the original WSDL schema and did a validating XML parsing as the first step in the validation. This old schema would have flagged the xsd:annotation elements as not allowed at that location in the operation element - in WTP 2.0, as part of the fix for bug 173600 the WSDL schema was updated to a more recent version which is more flexible and allows extensibility elements (from namespaces other than WSDL) for many more WSDL elements. - the example WSDL passes the XML validating parsing but when the JWSDL/WSDL4J model is built from the DOM, the code is too strict and does not recognize this extra flexibility. See the while loop in org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDLDocument.parseOperation(Element, PortType, Definition) and note how it throws an exception when elements other then input, output or fault are detected. A fix would have to check the element's namespace and not throw the exception if the element if from a namespace other than the WSDL namespace. A similar fix would have to be made for other parse* methods to ensure the code is aligned with the schema. I will try to provide a fix for 3.0.1 but 3.0.2 is more likely.
The right fix would also attempt to create WSDL extensibility elements from the elements from different namespaces but that will have to wait until bug 197197 is addressed.
And further, the WS-I validator will not like this type of WSDL either, because it is using a WSDL reader based on the one in WSDL4J 1.4 which doesn't tolerate extensibility elements for operations.
The more I look at this, the more it seems to me the right fix will have to wait until WTP 3.1.
Amy, please consider this bug fix along with the effort to upgrade the WSDL and WS-I validators to use WSDL4J 1.5.1.
This problem is quite important for SAP AG too. It causes the validator to show errors on almost each wsdl provided/published by SAP. Regards, Hristo
Forgot to add that the element that the extensibility element that causes most trouble for SAP is the policy element. I.e. putting the element <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">...</Policy> inside the operation leads to the same issue. Regards, Hristo
I've verified that once the patch for bug 252257 is put in, the scenarios described in this bug will be fixed.
What are the chances that this gets fixed for 3.0.4? As explained this is really crucial for us. Regards, Hristo
For sure we cannot backport the right way to fix this (upgrading WSDL4J) into WTP 3.0.4. That would be too much effort/change for a maintenance release. I can look into perhaps just having the WSDL validator ignore the foreign tags between the wsdl:operation tags and not complain about it. But if any WTP/WSDL adopters want to add their own extensions validator, they will not get a chance to validate the "foreign" tags. Valentin's comment from comment #6 is also another complication that may make this bug difficult to fix in 3.0.4.
Hi, This would still work for us. Judging from my point of view is better to skip validation of extensibility elements rather then showing errors on them. Regards, Hristo
i've released the fix to bug 252257, so this bug will should be fixed in the next ibuild. i've also opened bug 261070 to track trying to backport some part of this fix into wtp 3.0.4.
This bug has been in resolved state for a while. Please verify this defect with the latest WTP 3.0.4 or WTP 3.5 build from: http://download.eclipse.org/webtools/downloads/ If this is not verified within 2 weeks, we'll be verifying the bug on your behalf. Thanks!
Closing.