ClassCastException using wsdl validator [message #212168] |
Wed, 09 April 2008 04:48  |
Eclipse User |
|
|
|
Originally posted by: adalbertwysocki.gmail.com
Hi Folks,
I am trying to use the WSDL validator API outside eclipse but I am facing
an issue during the inline schema validation: The exception raised is:
java.lang.ClassCastException: com.ibm.wsdl.extensions.schema.SchemaImpl
and the code is failing in
org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.InlineSc hemaValidator.
The cast to javax.wsdl.extensions.UnknownExtensibilityElement fails
because the schema element is a com.ibm.wsdl.extensions.schema.SchemaImpl
implementing (indirectly) javax.wsdl.extensions.ExtensibilityElement and
not javax.wsdl.extensions.UnknownExtensibilityElement...
public void validate(Object element, List parents, IWSDL11ValidationInfo
valInfo) {
List elements = new ArrayList();
UnknownExtensibilityElement elem = (UnknownExtensibilityElement)
element;
Definition wsdlDefinition = (Definition) parents.get(parents.size() -
1);
...
I didnt find any posts related to this issue except some compatibility
problems (WSDL4j version). I verified the version I am using and it is the
right one which is delivered with WTP (WST) 2.2: 1.5.1. I also tried with
some other versions but no luck.
I am wondering if this has something to do with the URIResolver... (I also
tried not configuring any resolver but same issue)
The way I am using the API is quite simple:
WSDLValidator validator = new WSDLValidator();
validator.addURIResolver(new URIResolver());
IValidationReport report =
validator.validate("http://mydummyuri.org ", wsdlInputStream,
null);
wsdlInputStream: is s steam on a valid WSDL document
URIResolver: is a simple resolver:
public class URIResolver implements IExtensibleURIResolver{
public void resolve (String baseLocation, String publicId, String
systemId,
IURIResolutionResult result) {
result.setPhysicalLocation(systemId);
result.setLogicalLocation(publicId);
}
}
Would anyone know what could be the issue?
Thanks,
Adalbert
|
|
|
|
|
|
|
Re: ClassCastException using wsdl validator [message #212238 is a reply to message #212214] |
Thu, 10 April 2008 09:00  |
Eclipse User |
|
|
|
Originally posted by: valentinbaciu.hotmail.com
There have been a few requests already to upgrade WSDL4J to newer versions.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=197197 and the other bugs
referrenced in there.
Due to the large number of components that are affected the upgrade could
not be contained for WTP 3.0. We will try for the next release.
Regards, Valentin
"Adalbert Wysocki" <adalbertwysocki@gmail.com> wrote in message
news:0821f5aaca392011caf190bf626ab065$1@www.eclipse.org...
> Laurence,
> I agree this is the best solution as wsdl4j is already at the version
> 1.6.1. It is definitely necessary to upgrade.
> For our own immediate use I will downgrade our lib to 1.4 because we need
> something working but I will definitely work on the fix. I think this is
> an easy fix as the interface changed but the logic behind remains the same
> as well the logic in term of validation.
>
> What is the schedule for the next milestone of the WTP package that could
> integrate my fix?
>
> Adalbert
>
|
|
|
Powered by
FUDForum. Page generated in 0.03833 seconds