Re: NoSuchMethodError: javax.wsdl.xml.WSDLLocator.getImportReader
"Pablo Vazquez Blazquez" <[email protected]> Tue, 27 Mar 2007 10:17:37 +0200
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
El mar, 20-03-2007 a las 14:55 -0400, jnedzel escribi=F3:
I'm having a problem with Parser.getAllSchemaTypes(). I'm getting the
> following walkback:
>
> [java] Exception in thread "Thread-4" java.lang.NoSuchMethodError:
> javax.wsdl.xml.WSDLLocator.getImportReader(Ljava/lang/String;Ljava/lang/S=
tring;)Ljava/io/Reader;
> [java] at org.apache.wsif.schema.Parser.getImportedSchemas(Unknown
> Source)
> [java] at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown Sourc=
e)
> [java] at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown Sourc=
e)
> [java] at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown Sourc=
e)
> [java] at org.apache.wsif.schema.Parser.getAllSchemaTypes(Unknown
> Source)
> [java] at
> edu.mit.broad.genepattern.cagrid.modulegenerator.WebServiceInterface.pars=
eSchema(WebServiceInterface.java:584)
>
> My configuration is:
>
> jdk 1.5
> axis 1.2 RC2
> wsif 2.0
> wsdl4j 1.6.2
>
> The appropriate source code fragment is:
>
> ----------------------------
>
> WSIFWSDLLocatorImpl wsdlLocator =3D new WSIFWSDLLocatorImpl(null,
> this.selectedServiceWSDL, ClassLoader.getSystemClassLoader());
>
> Parser.getAllSchemaTypes(this.definition, this.schemaTypes,
> =09=09=09=09=09wsdlLocator);
>
> ----------------------------
>
> Any idea what might be causing this and/or a work-around?
>
> Thanks,
>
Sorry for being so late.
I am not sure my problem is yours but let me tell you. First,
apologize for my English. If sth is not clear, ask me please.
I have had some time ago a similar problem with wsif and wsdl4j.jar
file. The problem was that with version that comes with wsif-2.0 it
does not recognize "javax.wsdl.extensions.schema.Schema" when calling
"getTypesSchemas()". So I found wsif-2.1.0_RC2 (I can't remember
where), that comes with wsdl4j-1.5.1.jar, but it also had a bug: in
class org.apache.wsif.schema.Parser, method "getTypesSchemas" (Ln.
508), it must be as follows:
Element schemaEl;
if(nextEl instanceof javax.wsdl.extensions.schema.Schema) {
javax.wsdl.extensions.schema.Schema typesElement =3D
(javax.wsdl.extensions.schema.Schema)nextEl;
schemaEl =3D typesElement.getElement();
} else if (nextEl instanceof UnknownExtensibilityElement) {
UnknownExtensibilityElement typesElement =3D
(UnknownExtensibilityElement) nextEl;
schemaEl =3D typesElement.getElement();
} else {
continue;
}
So I rebuilded wsif and it was OK.
Sorry if it was not your problem. If it was, goog luck and I hope it
was usefull for you.