Showing posts with label wsrp. Show all posts
Showing posts with label wsrp. Show all posts

Monday, February 28, 2011

Axis 403 Forbidden

PROBLEM:
axis thread got an exception: (403)Forbidden


[ERROR] WSRPStarter - --- WSRP1: axis thread got an exception: (403)Forbidden
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (403)Forbidden
faultActor:
faultNode:
faultDetail:
{}:return code: 403
<html><head><title>Apache Tomcat/6.0.26 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 403 - Access to the requested resource has been denied</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Access to the requested resource has been denied</u></p><p><b>description</b> <u>Access to the specified resource (Access to the requested resource has been denied) has been forbidden.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.26</h3></body></html>
{http://xml.apache.org/axis/}HttpErrorCode:403

(403)Forbidden
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:755)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
at org.apache.axis.client.Call.invoke(Call.java:2824)
at org.apache.axis.client.Call.invoke(Call.java:1815)
at org.exoplatform.services.wsrp.AdminClient.process(AdminClient.java:252)
at org.exoplatform.services.wsrp.producer.impl.WSRPStarter$AxisThread.run(WSRPStarter.java:166)




SOLUTION:
Provide correct role-name "admin"




user authentication
/services/*
/services2/*
POST
GET


admin


NONE




BASIC
exo-domain



a simple user role
admin

Wednesday, November 14, 2007

WSRP ABC rhymes

WSRP ABC rhymes

A - is for AxisFilter and for AdminClient ( ... and for me - Alexey)
B - is for BlockingInteractionResponse
C - is for Consumer
D - is for DestroyPortlets
E - is for Event and for Extension
F - is for Fault :(
G - is for GetMarkup and for GetResource
H - is for HandleEvents
I - is for InteractionParams and for ImportPortlets
J - is for JSR286ContainerProxyImpl and for JAXBEventTransformer
K - is for ... [1]
L - is for Lifetime
M - is for Modes and for MarkupContext
N - is for NavigationalContext
O - is for Online and for OperationFailedFault
P - is for Producer and for PortletContext
Q - is for ... [2]
R - is for RegistrationOperationsInterface and for RegistrationContext
S - is for ServiceDescriptionInterface and for SessionContext
T - is for TransientStateManager and for Templates (... and for Tiger as written on my sheet)
U - is for Utils and for UpdateResponse
V - is for ... [3]
W - is for WSRPConsumerPlugin, WSRPStarter and WSRPService
X - is for ... [4]
Y - is for ...
Z - is for ... ( is for Zavizionov)


[1]
No source begins with that letter.
There are only sources containing the letter inside: PortletDescription.getKeywords() and PortletKey
[2]
No source begins with that letter.
The class QName used every where inside wsrp (javax.xml.namespace.QName)
[3]
No source begins with that letter.
ResourceValue
[4]
No source begins with that letter.
eXoPlatform =)

Sunday, September 30, 2007

WSRP

OASIS Web Services for Remote Portlets (WSRP) TC

WSRP mail list
WSRP repository
WIKI
Веб-сервисы


WSRP 2

WSRP 1

Other vendors:
  1. BEA :WSDL URL
  2. Oracle : WSDL URL
  3. Netunity : WSDL URL
  4. Vignette WSDL URL


Mail lists:

1. WSRP in the eXo portlet container
  • Archive
  • eXo mail list subscribe: exo-portlet-container-subscribe@objectweb.org
  • eXo mail list: exo-portlet-container@objectweb.org
2. WSRP comment on the OASIS
  • Archive
  • wsrp-comment-subscribe@lists.oasis-open.org
  • wsrp-comment@lists.oasis-open.org
3. WSRP dev on the OASIS
  • Archive
  • wsrp-dev-subscribe@lists.oasis-open.org
  • wsrp-dev@lists.oasis-open.org


Links:
http://en.wikipedia.org/wiki/WSRP
http://portals.apache.org/wsrp4j/
http://portlets.blogspot.com/
http://dev2dev.bea.com/pub/a/2005/03/inside_wsrp.html
http://xml.coverpages.org/wsrp.html

oracle tutorial - with wsrp2 note
WSRP4J JIRA
WSRP4J JIRA archive
JBOSS JIRA
JBOSS JIRA PORTAL WSRP

Thursday, March 22, 2007

JSON

wiki en and wiki ru

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language.

Sample JSON


{
"data": "The markup of fragment",
"portlets": [
{
"wid": "8759875984237598347",
"title": "заголовок",
"mode": "VIEW",
"state": "NORMAL",
"content": "The markup of portlet",
}
]
}


Sample JavaScript, where is req.responseText - is the JSON response.


var data_object = eval("(" + req.responseText + ")");
alert("data_object.data = " + data_object.data);
var frag = data_object.data;
var portlets = data_object.portlets;
var portletLength = portlets.length;
for (var i = 0; i < portletLength; i++) {
document.getElementById("p" + portlets[i].wid + "title").innerHTML = portlets[i].title;
document.getElementById("p" + portlets[i].wid + "content").innerHTML = portlets[i].content;
}


Links:

JSON official
JSON in JavaScript
JSON in Java
Generate JSON from XML to use with Ajax
Генерирование JSON из XML для использования с Ajax

Monday, March 5, 2007

XMLPortletRequest

"The XMLPortletRequest interface is a script interface to allow portlet supplied scripts to perform HTTP client functionality similar to the functionality provided by XMLHttpRequest. Unless stated otherwise, most of the concepts, behavior (including security constraints and considerations) of the XMLHttpRequest also apply to the XMLPortletRequest." (JSR-286 PLT.E)

interface XMLPortletRequest {
attribute EventListener onreadystatechange;
readonly attribute unsigned short readyState;
void open(in DOMString method, in DOMString url);
void open(in DOMString method, in DOMString url, in boolean async);
void open(in DOMString method, in DOMString url, in boolean async, in DOMString user);
void open(in DOMString method, in DOMString url, in boolean async, in DOMString user, in DOMString password);
void setRequestHeader(in DOMString header, in DOMString value);
void send();
void send(in DOMString data);
void send(in Document data);
void abort();
DOMString getAllResponseHeaders();
DOMString getResponseHeader(in DOMString header);
readonly attribute DOMString responseText;
readonly attribute Document responseXML;
readonly attribute unsigned short status;
readonly attribute DOMString statusText;
};


=\/=\/=\/=====================================================
<script LANGUAGE=JavaScript>

var portletReq;

function asynchGetXMLPortletRequest(){
var requestURL = document.getElementById("fragmentURL").value;
try {
portletReq = new XMLPortletRequest();
} catch(e) {
alert("Exception: I could not find the XMLPortletRequest");
}
alert("portletReq = " + portletReq);
portletReq.onreadystatechange = processReqChange;
portletReq.open('GET', requestURL, true);
portletReq.send(null);
}

function processReqChange() {
if (portletReq.readyState == 4) {
if (portletReq.status == 200) {
displayInvoice();
}
}
}

function displayInvoice() {
var div = document.getElementById("portletcontent");
div.innerHTML = "";
div.innerHTML = portletReq.responseText;
var but = document.getElementById("mainbut");
but.value = "clear";
but.onclick = clearContent;
}

function clearContent() {
var div = document.getElementById("portletcontent");
div.innerHTML = "";
var but = document.getElementById("mainbut");
but.value = "Serve fragment";
but.onclick = asynchGetXMLPortletRequest;
}

</script>

<input type="button" id="mainbut" value="Serve fragment" onclick="asynchGetXMLPortletRequest()">
<input type="hidden" id="fragmentURL" value="<portlet:fragmentURL /> ">
<div id="portletcontent"></div>

=/\=/\=/\=====================================================

XMLPortletRequest Proposal
XMLPortletRequest - Part 1: Background
XMLPortletRequest - Part 2: Wrapping XMLHttpRequest
Web Services for Remote Portlets - HTTP Client API
XMLHttpRequest