It's all about the answers!

Ask a question

Perl POST to workitem factory URI returns 404 - why?


Cliff Gardiner (921033) | asked Apr 21 '16, 5:05 a.m.
Hi all, this is for CLM 4.0.7 iFix007 using WAS 8.5.5.3 on Windows Server 2008 R2.

I'm trying to create a workitem using Perl and a combination of REST and OSLC calls.  I think my RDF structure looks OK but the POST call to the creation factory URI returns 404 no matter how I tweak the code.  I rigure that if my RDF structure is wrong, I'll an error returned but it won't be 404. 

The endpoint URI matches the format in https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Creating_Work_Items (URL="https://localhost:9443/jazz/oslc/contexts/_9BHm0EqVEd6HXO10niqZpg/workitems"): https://<server>:9443/jazz/oslc/contexts/_xohRkQKWEeS1oId-vRdUPQ/workitems

$request = HTTP::Request->new(POST => $endpoint);
$request->header('Content-Type' => 'application/rdf+xml');
$request->header('Accept' => 'application/rdf+xml');
$request->header('OSLC-Core-Version' => '2.0');
$request->content($requestData);

$response = $userAgent->request($request);

However using that URI in a browser returns 'SRVE0255E: A WebGroup/Virtual Host to handle devccm.nbsnet.co.uk:9443 has not been defined.'

According to all the docs I can find the URI should be good, so I'm wondering what I've missed.  Is there something in the WAS config, for example?

If someone can offer some advice or a working example I'd be grateful.  I'm happy to share the code I have if that would help.

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Apr 21 '16, 9:14 a.m.
isn't the context ccm, not jazz?  https://server:port/ccm/oslc/... jazz was an old generic context name
Cliff Gardiner selected this answer as the correct answer

One other answer



permanent link
Cliff Gardiner (921033) | answered Apr 21 '16, 11:30 a.m.
Thanks Sam, you're absolutely right.  I now get a different error but that's another matter and I'll chase that down.

This is a result of using out of date documentation but sadly that's the only stuff available!  I had a feeling this would be one of those kick-myself-when-I-get-the-answer things so at least I was right about one thing :o)

Regards,
Cliff

Comments
sam detweiler commented Apr 21 '16, 11:37 a.m.

Yeh, we all cut & paste..  and the doc hasn't been updated in years.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.