p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

java_webservices thread: Chapter 4: "WSDL4JImportSample... cannot resolve symbol WSDLReader.readWSDL


Message #1 by "Larry Mulcahy" <lmulcahy@q...> on Mon, 5 Aug 2002 22:28:08
Hi Larry
It appears the API was modified as you correctly suggested.  I guess that
this code was fully "ok" at release, but occasionally API change.  If they
had been depreciated, we would see this in the Javadoc, but their signature
has been very slightly (but significantly) modified.

The link below has a change history for the file and right at the bottom it
mentions:
"Changed all javax.wsdl.xml.WSDLReader.readWSDL(...) entry-points to be
  non-static."
http://www-124.ibm.com/developerworks/oss/cvs/wsdl4j/wsdl4j/src/javax/wsdl/x
ml/WSDLReader.java

I have cc'ed this email to Wrox support.  Although not exactly an error, but
an update, perhaps they could add it to the errata page.

(For Wrox: - P130, Chapter 4 - WSDL4JImportSample.java - the readWSDL
methods used in this example have been modified to non-static (they were
static originally) in the current version of the API).

Hope this helps,
Andrew
Professional Java Servlets 2.3
http://www.amazon.com/exec/obidos/ASIN/186100561X
http://www.amazon.co.uk/exec/obidos/ASIN/186100561X

-----Original Message-----
From: Larry Mulcahy [mailto:lmulcahy@q...]
Sent: 06 August 2002 15:48
To: Java Web Services
Subject: [java_webservices] RE: Chapter 4: "WSDL4JImportSample... cannot
resolve symbol WSDLReader.readWSDL

The book (p. 130) says,

"For now, we have to use a concrete class in the com.ibm.wsdl.xml package
that is shipped with the IBM Web Services Toolkit, called WSDLReader [...]
This class contains a number of static readWSDL() methods that all read in
existing WSDL documents from different sources."

The code I downloaded from wrox.com is consistent with the book.  Maybe
the IBM WSTK has changed to no longer include these static methods?

Andrew Harbourne-Thomas wrote:

> The WSDLReader has a method called readWSDL, but it is not static.  You
need
> to create an object of WSDLReader first before you can call the non-static
> method readWSDL on that object.  That's essentially whats causing the
error.
>
> When you call "WSDLReader.readWSDL" you are calling the method statically,
> which is illegal on a non-static method.
>
> Hope this helps,
> Andrew
> Professional Java Servlets 2.3
> http://www.amazon.com/exec/obidos/ASIN/186100561X
> http://www.amazon.co.uk/exec/obidos/ASIN/186100561X
>
>
>

--
Larry Mulcahy           Please use lmulcahy@q... only
PGP public key at:
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x2C4C5A03
AIM id: FleshMonster    Yahoo! Messenger id: JudgeLinuxx




  Return to Index