subterra URI to URL

Description
Tobias Gerg
Posts: 5
Joined: Mon Sep 07, 2009 7:34 am
Location: ASK Industries GmbH, Niederwinkling

subterra URI to URL

Postby Tobias Gerg » Mon Sep 07, 2009 7:54 am

Hello everybody,

currently I'm trying to develop a servlet application for polarion. The Servlet itself is working fine, but I have problems with the API of polarion.

In my servlet I read some workitems and if some conditions are fulfilled, i want to add a attachment (a picture). Therefore I use the IWorkitem method createAttachment. I save the attachment and the item and the attachment is there.

But if I'm calling the IAttachment.toURL() method, I receive always a null object.

Is there any chance to get the URL (not the URI) of the attachment?

Thanks in advance
Tobi

hlacikd
Posts: 3
Joined: Wed Apr 16, 2008 5:42 pm
Location: Prague

Re: subterra URI to URL

Postby hlacikd » Wed Sep 09, 2009 11:56 am

Hello,

it seems the Attachment URL is only filled when the attachment is reloaded after creating it.
Maybe just creating the attachment and then reloading it from the Workitem will be sufficient, but it is possible that it is required to commit the transaction before it is possible to properly reload the attachment.

Best Regards,
support@polarion.com

Tobias Gerg
Posts: 5
Joined: Mon Sep 07, 2009 7:34 am
Location: ASK Industries GmbH, Niederwinkling

Re: subterra URI to URL

Postby Tobias Gerg » Thu Sep 10, 2009 3:14 pm

[quote="hlacikd"]Hello,

it seems the Attachment URL is only filled when the attachment is reloaded after creating it.
Maybe just creating the attachment and then reloading it from the Workitem will be sufficient, but it is possible that it is required to commit the transaction before it is possible to properly reload the attachment.

Best Regards,
support@polarion.com[/quote]

Thanks for that hint, I've tried it a few days ago, but I never commit the transaction before I reload the attachment. I try it and give feedback then...

Greets
Tobi

Tobias Gerg
Posts: 5
Joined: Mon Sep 07, 2009 7:34 am
Location: ASK Industries GmbH, Niederwinkling

Re: subterra URI to URL

Postby Tobias Gerg » Fri Sep 11, 2009 7:40 am

Thanks to lacikd,

the hint to commit the transaction was the winner :-). Now it works fine...

Greets
Tobi


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 16 guests