私は worklight モバイル・アプリケーションを作成しました。自分のスペースの jazz.net サーバーに成果物を作成する必要があります。残りのクライアントでいくつかのリンクを使用した後、プロジェクト スペースのジャズ サーバーでアーティファクトを作成できます。
今、私はワークライトを使用して同じリクエストを送信していますが、禁止されたエラーが発生しています
{"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", "データ・タイプ":"http://www.w3.org/2001/XMLSchema#string"},"detailedMessage":{"CDATA":"CRRRS6401E コンテンツの解析中にエラーが発生しました。コンテンツは有効な rdf+xml でなければなりません。","datatype":"http ://www.w3.org/2001/XMLSchema#string"},"errorStatus":{"CDATA":"403","データ型":"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":[]}org/2001/XMLSchema#string"},"errorStatus":{"CDATA":"403","データ型":"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#" },"警告":[],"合計時間":2584,"応答時間":2583,"情報":[]}org/2001/XMLSchema#string"},"errorStatus":{"CDATA":"403","データ型":"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#" },"警告":[],"合計時間":2584,"応答時間":2583,"情報":[]}
私のコードは以下の通りです
function create(folderId)
{ var Request = '<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#" ><rdf:Description rdf:about=""><rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/><dc:description rdf:parseType="Literal">OSLC artifact created</dc:description><dc:title rdf:parseType="Literal">OSLC Created Requirement anil</dc:title><oslc:instanceShape rdf:resource="https://jazz.net/rm/types/_0kMQplV1EeC7_0yA"/><nav:parent rdf:resource="https://jazz.net/rm/folders/_cYBT0WSxEe5ZruQ"/></rdf:Description></rdf:RDF>'; 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);
}