当我尝试从IBM Connections Openocial小工具调用Portal服务时,我收到内部错误(我们无法处理您的请求)。我已经使用Firefox Rest Client尝试了网址,该网站发布并正常运行
我们在WAS级别设置了SSO,通过LTPA令牌的导出/导入,工作正常。
如果代码从EE通过活动流运行,则下面的部分。
请求帮助以确定问题
var url = "http://portaldomain:20014/wps/myportal"; var params = {}; var headers = {}; params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED; postdata = gadgets.io.encodeValues(postdata); params[gadgets.io.RequestParameters.POST_DATA]= postdata; gadgets.io.makeRequest(url, response, params);
Following are the set of parameters that I see through firebug
authz signed
bypassSpecCache 0
container default
contentType TEXT
gadget https://connectionsdomain/gadgets/EEWCMApproveGadget.xml
getFullHeaders false
getSummaries false
httpMethod POST
numEntries 3
oauthState
postData uuid=d39110f1-dbe7-4731-82e1-fda4654ac366&status=approve&comment=Approved
signOwner true
signViewer true
st default:0zKcYH7ZZK_19x4m3ifbVRCg1E7qUZm54EWcZzjGuiadgfrpM57pgi4fLik56unzOQ0Vq0HfGAwq9-_ZgOBOIGE_x6laCP6yhavqa3yY0EQRvGVLxh0qr6rch3XUyrGwi9ClUb9tFmDO3NdJGRB2QCT2T3ZMwX3lrYaBypirH7b3tJZ8Da_HPxKm4JziWHk4g-WF4I-y1rGYwiDdl24S88iVyMJnX1jao2aBzwlO_yQ
url http://portaldomain:20014/wps/mycontenthandler/wcmrest/item/d39110f1-dbe7-4731-82e1-fda4654ac366/approve
[1/14/15 11:26:10:024 IST] 0000008f servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [WidgetContainer] [/connections/opensocial] [makeRequest]: Initialization successful.
[1/14/15 11:26:10:055 IST] 0000008f servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: An exception was thrown by one of the service methods of the servlet [makeRequest] in application [WidgetContainer]. Exception created : [java.lang.NullPointerException
at org.apache.shindig.gadgets.oauth.OAuthRequest.fetch(OAuthRequest.java:179)
at org.apache.shindig.gadgets.http.DefaultRequestPipeline.fetchResponse(DefaultRequestPipeline.java:168)
at org.apache.shindig.gadgets.http.DefaultRequestPipeline.execute(DefaultRequestPipeline.java:108)
at org.apache.shindig.gadgets.servlet.MakeRequestHandler.fetch(MakeRequestHandler.java:217)
at org.apache.shindig.gadgets.servlet.AsyncMakeRequestServlet.serverMakeRequestFile(AsyncMakeRequestServlet.java:143)
at org.apache.shindig.gadgets.servlet.AsyncMakeRequestServlet.doGet(AsyncMakeRequestServlet.java:135)
at org.apache.shindig.gadgets.servlet.AsyncMakeRequestServlet.doPost(AsyncMakeRequestServlet.java:167)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:562)
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:255)
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at com.ibm.cre.server.auth.AuthenticationServletFilter.doFilter(AuthenticationServletFilter.java:42)
***Trace Logs*****
[1/14/15 11:26:02:677 IST] 0000008f CookieBasedSS 1 cookieNames = LtpaToken,LtpaToken2,PD-H-SESSION-ID,PD-S-SESSION-ID,SMIDENTITY,SMSESSION
[1/14/15 11:26:02:677 IST] 0000008f CookieBasedSS 1 cookieDomain = .poc.com
[1/14/15 11:26:02:677 IST] 0000008f CookieBasedSS 3 adding cookie LtpaToken=ftZFybOO0OjWSwVYdwCbCnVLvYxk5w+jqlrebGIxfAvwL68Ud9rOa/Ogla3YHJKA8W3s0ZgO6r6yBZHf6DKRjToQs2weu9/xSbKi9coM/2chEcbF/vAX6YauO8Er1dnXEFnFLvUKvpEy5KE1+BLPID6RyYgoaQ/sQcpQiMBg6oDYuRDdm01p4CIh/0wjCbICNrWpetNo8PxKxk9yaaemSQ4gInquZ162CWDGyHVpS+LaxF9ohQxPkYUC0wZDK1VExECCMVdhivW9FfE/1TZQjrhSdDRDN1VRj9bvcfWc2h7/H2iwdtrXBQ==;LtpaToken2=xGSl1AuYtM0f2GRbiqtBuK0r5G+VCv8MaWLmsQAMSi6mNMVpUQozaPWYdSdgEd60Sez++e2mXrGnhLK0wMU1glbbx81XaWZzka1fCIo1VsJHSMlphEc/qv1AlhFRvA1ThesjY5JKaxLcQD7mcWif3HugM5iZeP/lKjWoRLUku+6wYTXI7urSgU2aELq+1QtoiFbiAubfk4f2e/zUUXgZ+LcAjiBgae9abEV5yFPoQmKorodGQ4QMif7eYJNQuqzdSoeIJc2flCgFjLMb7uZ/JN48UUG21poROqCjEc21oxmqQmnCZNyCJ1xpyG3p1OPGX2AL/cjnIOhGPaw6itarreB0dBJNPaT6eqVDjscfVwbTQJ/mHR840TG9C52QvDzW9mHwM74jwUBojZwCneew+g1Si2O9j55debqGvvUl0RNHoEUjIWsB2lhiQ/SH9d2XnMKV6H03rLIctip/cQ5hu/nghTctw+iOVe+Aa7+uUAA2elVMFCNetpHNKaPh4KhPBGsXdkK8aDFpqhhIyoeSBPIiz2dXs5Uaf67ZgZJ4eoTdw7JxBPliV6n3UVD2r0JcE4qSW0VxTK8qeszhhqKsflEfcuozJVr7T2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aJcoEZS4cQC+8ghtUXGsPdZLnGLII9rQcVa6LwxrllZCQIW3M=]
[1/14/15 11:26:02:677 IST] 0000008f GadgetRenderi 3 headers extracted, Authorization :null

答案 0 :(得分:0)
您需要配置每个小工具策略规则 http://www-01.ibm.com/support/knowledgecenter/SSYGQH_5.0.0/admin/admin/t_admin_common_cre11_conn_security_proxy.dita
该文件应位于/ opt / IBM / WebSphere / AppServer / profiles / {profile} / config / cells / {cell} / LotusConnections-config / opensocial-proxy-rules
你应该找到proxy-policy.dynamic它是一个记录完好的文件,你可以编辑它
添加诸如的规则
allow(".*", "http:\\/\\/www\\.ibm\\.com\\/gadgets\\/gadget.xml", ""http\\:\\/\\/www\\.ibm\\.com\\/.*");