cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid URL for file reference

Former Member
0 Kudos

Hi,

I'm having a problem with a webdynpro application running from Portal 6 SP14. The application contains a link to a file sitting on a client machine. Whenever this file does not actually reside on the server machine, it generates this error:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Invalid URL=S:\SCA_IT\SCM Data\Projects SCM\Plant Maint\Portals Request- Sweden.doc

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

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)

This file actually exists on my client machine, but it generates the error anyway. It does not happen with applications running on Portal 6 SP9. The new one seems to validate if the file exists on the server or not, and if not generates this error. Is there any way for me to validate this URL, or to allow the URL to point to the client machine instead of the server machine? Any help would be appreciated.

Joanna

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Have you tried escaping the URL? I see some spaces in the URL. Have you tried escaping them to "%20"?

Look for URL escaping on the net.

Regards,

Satyajit.

Former Member
0 Kudos

Hi Satyajit,

I don't think that's the problem, because if I take that path and put it directly into the address bar of internet explorer, it opens the file. I think what's happening is that the application is looking for that drive/file on the portal server machine, and because it doesn't exist it generates an error. Do you know if there is any way to access the client machine from within webdynpro, or whether I can catch this error before it generates it?

Joanna

Former Member
0 Kudos

Some additional data I forgot to add:

I have tried to catch an invalid url in the code, but because there isn't an actual syntax error in the URL, it allows it through, and it seems to pass on the validation to the portal and that's where the error is generated.

try

{

File doc = new File(docPath);

URL docURL = doc.toURL();

wdContext.currentContextElement().setValidURL(docURL.toString());

}

catch(Exception e)

{

wdContext.currentContextElement().setValidURL("");

}

I have also tried setting the URL with the original docpath, but with the same result.