403禁止错误工作灯
403 forbidden error worklight
我已经做了一个轻量级移动应用程序。我必须在jazz.net服务器中创建一个工件在我的空间。我在其余客户端中使用了一些链接,然后我能够在项目空间中的jazz服务器中创建工件。
现在我正在使用worklight并发送相同的请求,它给了我禁止误差
{"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错误解析内容。内容必须是有效的rdf + xml。","数据类型":"http://www.w3.org/2001/XMLSchema字符串"}",errorStatus ":{"CDATA":"403","数据类型":"http://www.w3.org/2001/XMLSchema"}},"犯错":"http://jazz.net/xmlns/prod/jazz/foundation/1.0/","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns"},"警告":[],"totalTime":2584年,"responseTime":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);
}
这一行空格不对,
{ 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';
由于缺少空格,看起来您没有发送有效的文档。rdf: rdf xmlns…
{ var Request = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/"
- dhtmlx多个调度器不工作错误”;调度程序未定义”;
- Javascript 确认框工作错误
- 变量中的类工作错误
- 为什么这个jQuery验证工作错误
- Cordova罗盘API(navigator.compass.watchHeading)不工作(错误代码3)
- Javascript不能在Chrome或IE9中工作-错误”;复选框未定义“;显示在FF JS控制台中
- JQuery UI对话框不能正常工作;错误信息“TypeError: undefined不是一个函数”
- Jquery/JS css动画在悬停时工作错误
- AngularJs Ng-Keypress事件工作错误
- Jquery 选择器不工作:错误:语法错误,无法识别的表达式:a[@href]
- 日期选择器范围工作错误
- 为什么我的Jquery Ajax请求不工作错误:未定义的索引:ProID
- 反应不工作.错误提示(index):13 Uncaught SyntaxError: Unexpected token
- 身份工具箱不工作-错误代码:IDP的错误响应
- jquery日期picker beforeShowDay工作错误的月份
- Javascript验证在c#中不工作(错误消息)
- 为什么?每个函数都工作错误
- 路由到api工作错误
- 子元素位置相对工作错误
- 从timeline2.6.1的例子不工作-错误链接是未定义的时间线代码0