Wikia API Wiki

LyricWiki API/SOAP/Java & Axis

< LyricWiki API | SOAP

25pages on
this wiki

Here's a quick how-to I put together to help those who want to access this beautiful work at via Java & Axis.

Using Axis to build the stubsEdit

  1. Download WSDL from here. For the purpose of this document I named this file lyricwiki.wsdl.
  2. Edit lyricwiki.wsdl according to JAVA && AXIS on this page.
  3. Download Axis from here (to write this document I downloaded axis-bin-1_4.tar.gz).
  4. Uncompress axis-bin_4.tar.gz (tar -zxvf axis-bin-1_4.tar.gz). This creates a directory named axis-1_4.
  5. Copy lyricwiki.wsdl to axis-1_4 directory and cd to that directory.
  6. You may now use a command like the following (all in one line) to build the stubs, skeletons, and data types from lyricwiki.wsdl.
java -cp lib:lib/axis-ant.jar:lib/axis.jar:lib/commons-discovery-0.2.jar:lib/commons-logging-1.0.4.jar:
         lib/ org.apache.axis.wsdl.WSDL2Java lyricwiki.wsdl
  • There should now be a directory named LyricWiki_pkg where the stubs are generated.

Example CodeEdit

  • You may now use the generated code with the following code snippet to pull in song lyrics.
LyricWikiLocator service = new LyricWikiLocator();
LyricWikiPortType port = service.getLyricWikiPort();
LyricsResult lyrics = port.getSong("artist", "song title");
  • Please note that obfuscating Java code which has been generated by Apache Axis 1.4 (It does not matter how) results in various exceptions during the runtime.

I hope you find the above instructions helpful.

Kjavaher 03:56, 10 January 2008 (EST) - Kamran Javaheri

Last edit regarding code obfuscation by --Schokomuesli 22:39, March 10, 2010 (UTC)

Around Wikia's network

Random Wiki