Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

rsslib4j problem javajava.net.MalformedURLException

Options
  • 29-07-2006 10:43pm
    #1
    Registered Users 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 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 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