Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

rsslib4j problem javajava.net.MalformedURLException

  • 29-07-2006 09:43PM
    #1
    Registered Users, Registered Users 2 Posts: 995 ✭✭✭


    I'm am trying to run a client that uses a RSS feed. I'm using the rsslib4j JAR to connect to the RSS feed.

    When I try to run the client from the command line I get the following error

    Exception in thread "main" java.net.MalformedURLException: no protocol: .\wsdl\hello_world.wsdl

    The following is the line of code that throws the error

    RSSSRegistry testreg = new RSSSRegistry(new URL(args[0]));


Comments

  • Closed Accounts Posts: 2,046 ✭✭✭democrates


    I haven't used java like this before, but 'malformed url' on a line with 'new url(args[0])' suggests junk in args[0] or possibly some required arguments aren't being supplied to the url class (though I'd expect an error message to that effect in that case).

    Prior to that statement print the contents of args[0] to the screen to see what's being thrown at the url instantiator. Then track back to see why it's not getting the value it needs. What's in what variable at what point in the process, that's the essence of debugging. Far quicker to examine the data than rethink code.


  • Registered Users, Registered Users 2 Posts: 4,188 ✭✭✭pH


    it looks like the contents of args[0] is '\wsdl\hello_world.wsdl'

    Which is indeed an invalid URL as there is no prototol

    it should look like
    http://
    of possibly something like file://c:\dir\ (if the file protocol is supported)


  • Closed Accounts Posts: 2,046 ✭✭✭democrates




  • Registered Users, Registered Users 2 Posts: 995 ✭✭✭cousin_borat


    Thanks for the replied. I'll have a look at this later on. The goal is to obtain a WSDL file using the RSS protocol.


Advertisement