Note that there are some explanatory texts on larger screens.

plurals
  1. PO403 forbidden error worklight
    text
    copied!<p>i have done a worklight mobile application .i have to create an artifact in the jazz.net server in my space . i have used some links in the rest client then i am able to create an artifact in jazz server in my project space.</p> <p>where as now i am using worklight and sending the same request it is giving me the forbidden error</p> <p>{"responseID":"74","statusCode":403,"errors":[],"isSuccessful":true,"statusReason":"Forbidden","responseHeaders":{"Content-Language":"en-US","Date":"Wed, 22 May 2013 11:37:18 GMT","Content-Length":"571","X-jazzweb1":"D=780029 t=1369222638020906","Keep-Alive":"timeout=5, max=100","Connection":"Keep-Alive","Content-Type":"application/rdf+xml; charset=UTF-8","Server":"IBM_HTTP_Server","X-Powered-By":"Servlet/3.0","Proxy-Connection":"Keep-Alive"},"RDF":{"Description":{"errorMessage":{"CDATA":"Forbidden","datatype":"http://www.w3.org/2001/XMLSchema#string"},"detailedMessage":{"CDATA":"CRRRS6401E Error parsing content. Content must be valid rdf+xml.","datatype":"http://www.w3.org/2001/XMLSchema#string"},"errorStatus":{"CDATA":"403","datatype":"http://www.w3.org/2001/XMLSchema#long"}},"err":"http://jazz.net/xmlns/prod/jazz/foundation/1.0/","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#"},"warnings":[],"totalTime":2584,"responseTime":2583,"info":[]}</p> <p>my code is as below</p> <pre><code>function create(folderId) { var Request = '&lt;rdf:RDFxmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:dc="http://purl.org/dc/terms/""xmlns:oslc_rm="http://open-services.net/ns/rm#" &gt;&lt;rdf:Description rdf:about=""&gt;&lt;rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/&gt;&lt;dc:description rdf:parseType="Literal"&gt;OSLC artifact created&lt;/dc:description&gt;&lt;dc:title rdf:parseType="Literal"&gt;OSLC Created Requirement anil&lt;/dc:title&gt;&lt;oslc:instanceShape rdf:resource="https://jazz.net/rm/types/_0kMQplV1EeC7_0yA"/&gt;&lt;nav:parent rdf:resource="https://jazz.net/rm/folders/_cYBT0WSxEe5ZruQ"/&gt;&lt;/rdf:Description&gt;&lt;/rdf:RDF&gt;'; var path ='rm/requirementFactory?projectURL=https://jazz.net/jts/process/project-areas/_xKDFBlV1EeC7_0yA'; var winput = { method : 'post', //returnedContentType : 'none', path : path, headers : { 'accept' : 'application/xml', 'OSLC-Core-Version' : '2.0' }, body:{ content: Request, contentType: 'application/rdf+xml; charset=utf-8' } }; return WL.Server.invokeHttp(winput); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload