Skip to Content
avatar image
Former Member

How to validate URL trought WD Services ?

Hi All,

The following exception is raised by the WebDynpro Runtime:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: <b>Invalid URL=[123]7654dgvbjhdfgh</b>

at com.sap.tc.webdynpro.serverimpl.core.url.AbstractURLGenerator.checkURL(AbstractURLGenerator.java:600)

at com.sap.tc.webdynpro.services.sal.url.core.URLGeneratorInternal.checkURL(URLGeneratorInternal.java:303)

at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.LinkToURL.getReference(LinkToURL.java:206)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.LinkToURLAdapter.getReference(LinkToURLAdapter.java:235)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.LinkRenderer.render(LinkRenderer.java:45)

when passing <i>'invalid'</i> URL to <i>LinkToURL</i> UI Element.

So my question is: How to validate URL before binding it to <i>LinkToURL</i> UI Element ? Is there some build-in WD Service for URL validation ?

I found <i>com.sap.tc.webdynpro.services.sal.url.core.URLGeneratorInternal.checkURL(String url)</i> method, but I don't think it's part of WD Services Public API.

Thanks in advance.

-Alex

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 22, 2006 at 12:33 PM

    Hello Alex

    I'm not sure about WD services but you can just create java.net.Url(String) object and handle Exception in case of invalid Url. The class provides the basic validation.

    Best Regards

    Sergei

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 22, 2006 at 12:56 PM

    Unfortunately, the checkUrl() method is not included in the API IWDURLGenerator (only in an internal interface).

    Thus you cannot use it from within your application.

    You could open an OSS message and ask if there are plans to bring it into the API.

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2006 at 03:08 PM

    Hello Everyone. I've been trying to find a solution for this same problem, but havent found any. Does anyone have any idea on how to validate a URL in a WebDynpro Java application to be deployed in Sap Portal?

    In my case in particular, i'm trying to validate a "mailto:" kind of url. And have been getting exceptions with malformed e-mail addresses.

    Thanks a lot for your help.

    Francisco

    Add comment
    10|10000 characters needed characters exceeded