You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2007/03/27 18:01:49 UTC

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

Pablo Vazquez Blazquez wrote:
> 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.
ok that definitely makes sense: when doing "continue" the loop never had
chance to get to test if(nextEl instanceof
javax.wsdl.extensions.schema.Schema) ...
> PS: I tried to post this bug several time ago, but I was not able via
> Web. I wish not be very late...
that fix is now in SVN and will be in next release candidate (RC3)

thanks,

alek
>
>
>
>
> 2007/3/27, Aleksander Slominski <as...@cs.indiana.edu>:
>> Pablo Vazquez Blazquez wrote:
>> > El mar, 20-03-2007 a las 14:55 -0400, jnedzel escribió:
>> > 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/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.parseSchema(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 = 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 =
>> > (javax.wsdl.extensions.schema.Schema)nextEl;
>> >
>> >                    schemaEl = typesElement.getElement();
>> >
>> >                } else if (nextEl instanceof
>> > UnknownExtensibilityElement) {
>> >
>> >                    UnknownExtensibilityElement typesElement =
>> > (UnknownExtensibilityElement) nextEl;
>> >
>> >                    schemaEl = 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 =
>> //                    (UnknownExtensibilityElement) nextEl;
>>
>>                 //Element schemaEl = typesElement.getElement();
>>                 Element schemaEl;
>>
>>                 if(nextEl instanceof
>> javax.wsdl.extensions.schema.Schema) {
>>                     javax.wsdl.extensions.schema.Schema typesElement =
>> (javax.wsdl.extensions.schema.Schema)nextEl;
>>                     schemaEl = typesElement.getElement();
>>                 } else if (nextEl instanceof
>> UnknownExtensibilityElement) {
>>                     UnknownExtensibilityElement typesElement =
>> (UnknownExtensibilityElement) nextEl;
>>                     schemaEl = 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: wsif-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: wsif-user-help@ws.apache.org
>
>


-- 
The best way to predict the future is to invent it - Alan Kay


---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-dev-help@ws.apache.org