Re: NoSuchMethodError: javax.wsdl.xml.WSDLLocator.getImportReader

"Pablo Vazquez Blazquez" <[email protected]> Tue, 27 Mar 2007 17:18:01 +0200
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <[email protected]>
Hi,

Actually, it's not the same code:

Line 508. You must comment:

/*
  if(!(nextEl instanceof UnknownExtensibilityElement)) {
                    continue;
   }
*/

Here wsif is discarding Schema Type. I think this is the problem.
Contact me if I'm wrong.

PS: I tried to post this bug several time ago, but I was not able via
Web. I wish not be very late...




2007/3/27, Aleksander Slominski <[email protected]>:
> Pablo Vazquez Blazquez wrote:
> > 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/lan=
g/String;)Ljava/io/Reader;
> >>
> >> [java]     at org.apache.wsif.schema.Parser.getImportedSchemas(Unknown
> >> Source)
> >> [java]     at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown
> >> Source)
> >> [java]     at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown
> >> Source)
> >> [java]     at org.apache.wsif.schema.Parser.getTypesSchemas(Unknown
> >> Source)
> >> [java]     at org.apache.wsif.schema.Parser.getAllSchemaTypes(Unknown
> >> Source)
> >> [java]     at
> >> edu.mit.broad.genepattern.cagrid.modulegenerator.WebServiceInterface.p=
arseSchema(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,
> >>                     wsdlLocator);
> >>
> >> ----------------------------
> >>
> >> 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.
> >
> hi Pablo,
>
> that is interestng and i would definitely would like to have this fixed
> - this is relevant fragment code from RC2 (and currently in SVN):
>
>                 if(!(nextEl instanceof UnknownExtensibilityElement)) {
>                     continue;
>                 }
> //                UnknownExtensibilityElement typesElement =3D
> //                    (UnknownExtensibilityElement) nextEl;
>
>                 //Element schemaEl =3D typesElement.getElement();
>                 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;
>                 }
>
> could you tell me what needs to be fixed or what is the problem? the
> code looks the same as what you have? what am i missing?
>
> thanks,
>
> alek
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>