How to use DNG ReqIF API
My use case is that i need to import the reqifz file into the project area. I have referred this link https://jazz.net/wiki/bin/view/Main/DNGReqIF and created the request uri as per the document.
But getting some errors.
Has any one tried it out or any idea on it. Any help is welcomed.
I tried the below request:
Request headers:
1) Accept: application/rdf+xml
2) Content-type : application/rdf+xml
3) vvc.configuration of stream
4) DoorsRP-Request-Type : public 2.0
5) userMimeType: application/zip
6) filename of the reqifz file.
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:types="http://www.ibm.com/xmlns/rdm/types/" xmlns:dng_reqif="http://jazz.net/ns/rm/dng/reqif#ReqIFImport">
<dng_reqif>
<types:package>
<types:content rdf:resource="test.reqifz"/>
</types:package>
</dng_reqif>
</rdf:RDF>
Request URI:
https://localhost:9443/rm/reqif_oslc/import?componentURI=https://localhost:9443/rm/rm-projects/_y45KZTvLEeigONvxHDayiw/components/phgghvn
Response:
dng_reqif:definition resource was not found in RDF.
2 answers
Hi ,
Comments
Hi ,
Thanks for the reply. But few parameter values are unknown. Could you please clarify.
What should be the value to the parameter packageFactoryUrl ?
Where should we mention the module url where the import should happen?
The packageFactoryUrl can be discovered from the project Services document. This API is just to upload the reqif file.
Is the request body what i have posted here is correct?
Request headers:
1) Accept: application/rdf+xml
2) Content-type : application/rdf+xml
3) vvc.configuration of stream
4) DoorsRP-Request-Type : public 2.0
5) userMimeType: application/zip
6) filename of the reqifz file.
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:types="http://www.ibm.com/xmlns/rdm/types/" xmlns:dng_reqif="http://jazz.net/ns/rm/dng/reqif#ReqIFImport">
<dng_reqif:ReqIFImport>
<dng_reqif:package>
<types:content rdf:resource="test.reqifz"/>
</dng_reqif:package>
</dng_reqif:ReqIFImport>
</rdf:RDF>
Request URI:
https://localhost:9443/rm/reqif_oslc/import?componentURI=https://localhost:9443/rm/rm-projects/_y45KZTvLEeigONvxHDayiw/components/phgghvn
AFAIK no, for public API you should use:
AFAIK no, for public API you should use:
Hi,
When i run the method which you have posted , the output is http status code 302 is thrown.
For the parameter packageFactoryURL i have taken the parameter value from the <oslc:creation> tag in services.xml.
<oslc:CreationFactory>
<oslc_config:component rdf:resource="https://localhost:9443/rm/cm/component/_OGxSYDjWEeigONvxHDayiw" />
<oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/reqif#ReqIFPackage" />
<oslc:creation rdf:resource="https://localhost:9443/rm/reqif_oslc/import?componentURI=https://localhost:9443/rm/cm/component/_OGxSYDjWEeigONvxHDayiw" />
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ReqIF Package Factory</dcterms:title>
</oslc:CreationFactory>
Please do reply on the above comments.
Hi Gabriel,
I have the run the method which has been posted by you. But its not working. Response is 404 error code. Please let me know how to solve this.
Regards,
Pavithra S
Hi,
Hi Gabriel,
Now I'm able to fetch the package url / locationURL. Now this we need to give it as request body input to the import request url?
And what all request headers ,request url and request body to be used?
Currently,
REQUEST URL:
https://localhost:9443/rm/reqif_oslc/import?componentURI=https://localhost:9443/rm/rm-projects/_65sYYGPpEeis_bpxP5OClg/components/_7VEs0GPpEeis_bpxP5OClg
REQUEST HEADERS:
OSLC-Core-Version: 2.0
Accept : application/rdf+xml
vvc.configuration : stream url
And location url is : https://localhost:9443/rm/reqif/descriptors/_tZtviGovEeis_bpxP5OClg
Thanks in advance.
Hi,
Could you please send the link for checking docs.
Is the request URL correct?
Hello Gabriel,
We are getting "FATAL ERROR" as taskcompletionstatus with the below request for importing. Please let me know what's missing in the below request after fetching the package url.
Request URL: https://localhost:9443/rm/reqif/import?componentURI=https://localhost/rm/rm-projects/_yjdR4DjWEeigONvxHDayiw/components/_0ap4AGryEeiVzuQmixXetA
Request Body:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rmReqIF="http://www.ibm.com/xmlns/rdm/reqif/">
<rmReqIF:ReqIFImport rdf:about="http://jazz.net/ns/rm/dng/reqif#ReqIFImport">
<rmReqIF:importToProject rdf:resource="https://localhost:9443/rm/rm-projects/_yjdR4DjWEeigONvxHDayiw/components/_0ap4AGryEeiVzuQmixXetA"></rmReqIF:importToProject>
<rmReqIF:reqifPackageURI rdf:resource="https://si-z0rl9.si.de.bosch.com:9443/rm/reqif/_gNbWQm1OEeiVzuQmixXetA"></rmReqIF:reqifPackageURI>
</rmReqIF:ReqIFImport>
</rdf:RDF>
Response is 202 with the location url. TaskCompletionStatus is FATAL_ERROR
In Addition to the above request,
Request Headers:
Configuration-Context: STREAM URL
content-type AND accept: application/rdf+xml
Best Regards
Unable to see the latest comments.