[JBoss Portal] - wsrp session propagation problem
by karink
Hi,
using SAP Portal as consumer and JBoss Portal (JBoss 4.0.5GA + JBossPortal 2.6 DR1) as consumer.
I recognized that for each remote invocation a new session is created
on JBoss side.
SAP stated that this depends on the answer from JBoss during
the getServiceDescription method, where JBoss Portal (producers) says,
that the consumer does not need to handle sent cookies from the producer.
Here the answer from SAP:
- JBoss answered that it requires NO cookies initialization
(see <ns1:requiresInitCookie>none
</ns1:requiresInitCookie>)
- SAP does not call initCookie
- no producer cookies are stored on the consumer
- each consumer request is being sent without JSESSIONID and is being handled
by a NEW session on the producer side (no session held state is used across requests).
Here the request/response for getServiceDescription
1. Request from SAP EP (consumer) to JBoss (Producer)
| POST /portal-wsrp/ServiceDescriptionService HTTP/1.1
| Host: Host:8082
| Content-Type: text/xml; charset=UTF-8
| Cookie: MYSAPSSO2=AjExMDAgABRwb3J0YWw6QWRtaW5
|
| Content-Length: 883
| soapaction: urn:oasis:names:tc:wsrp:v1:getServiceDescription
|
| <?xml version="1.0" encoding="utf-8"?>
| <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
| xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema"
| xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="urn:oasis:names:tc:wsrp:v1:wsdl"
| xmlns:tns="urn:oasis:names:tc:wsrp:v1:wsdl"><SOAP-ENV:Body><prt0:getServiceDescription x
| mlns:prt0="urn:oasis:names:tc:wsrp:v1:types"><prt0:registrationContext>
| <prt0:registrationHandle>deregistered:</prt0:registrationHandle>
|
| <prt0:registrationState>ZGVyZWdpc3RlcmVk</prt0:registrationState>
| </prt0:registrationContext>
|
| <prt0:desiredLocales>en_US</prt0:desiredLocales>
|
| <prt0:desiredLocales>fr_FR</prt0:desiredLocales></prt0:getServiceDescription></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
2. Answer from JBoss (Producer) to SAP EP (consumer)
| HTTP/1.1 200 OK
|
| Server: Apache-Coyote/1.1
| Set-Cookie: JSESSIONID=02AB7B830149EAEA023F7F3A87631361.localhost; Path=/portal-wsrp
|
| Content-Type: text/xml;charset=UTF-8
|
| Transfer-Encoding: chunked
|
| Date: Thu, 01 Mar 2007 10:16:32 GMT
|
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
| <env:Header></env:Header><env:Body><ns1:getServiceDescriptionResponse xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'
| xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
| <ns1:requiresRegistration>false
|
| </ns1:requiresRegistration>
|
| <ns1:offeredPortlets><ns1:portletHandle xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>/PortletTest.KarinsErstesTestPortlet
|
| </ns1:portletHandle>
| <ns1:markupTypes xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>
| <ns1:mimeType xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>text/html
| </ns1:mimeType>
| <ns1:modes xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>wsrp:view
| </ns1:modes>
| <ns1:modes xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>wsrp:edit
| </ns1:modes>
| <ns1:windowStates xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>wsrp:normal
| </ns1:windowStates>
| <ns1:windowStates xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>wsrp:minimized
| </ns1:windowStates>
| <ns1:windowStates xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>wsrp:maximized
| </ns1:windowStates>
| <ns1:locales xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>en
| </ns1:locales>
| </ns1:markupTypes>
| <ns1:title xml:lang='en' xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'><ns1:value xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types'>Karins Test Portlet
| </ns1:value>
| </ns1:title>
| </ns1:offeredPortlets>
| <ns1:requiresInitCookie>none
| </ns1:requiresInitCookie>
|
| </ns1:getServiceDescriptionResponse>
|
| </env:Body></env:Envelope>
|
|
Regards Karin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024244#4024244
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024244
17Â years, 10Â months
[EJB/JBoss] - jboss + xdoclet.
by ambika
Hi,
I am trying to build the MedRec application to test on jboss. I am using jboss 4.0.5.GA, xdoclet 1.2.3 and java 1.5.
I am getting following error,
[ejbdoclet] (XDocletMain.start 54 ) <<Generated file [file:/home/ambika/integration/medrec/build/medrecEar/entityEjbs/META-INF/ejb-jar.xml:line 33] Message=[The content of element type "enterprise-beans" is incomplete, it must match "(session|entity|message-driven)+".] is not valid according to its DTD or XML Schema. This might be due to some missing tags in your source.>>
[ejbdoclet] org.xml.sax.SAXParseException: The content of element type "enterprise-beans" is incomplete, it must match "(session|entity|message-driven)+".
[ejbdoclet] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[ejbdoclet] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[ejbdoclet] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
Can anyone help me regarding the same? I saw many users faced the same problem, but i dint get any solution. Please help me, if any one can.
Thanks and Regards,
Ambika
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024238#4024238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024238
17Â years, 10Â months
[JBoss Seam] - File(data) Download problem...
by waheed.murad
i am using seam-gen. i am trying to dowload a file or data from server as file. my code is
FACELETS CODE:
<h:commandButton value="donwload file" actionListener="#{ERegReportHandlerAction.downloadReportFile}"/>
Sessionbean Function:
public void downloadReportFile(){
ExternalContext exContext=FacesContext.getCurrentInstance().getExternalContext();
javax.servlet.http.HttpServletResponse response = ((javax.servlet.http.HttpServletResponse)exContext.getResponse());
//response.setContentType("application/x-download");
response.setContentType("text/plain");
response.setHeader("Content-Disposition", "attachment; filename=" + "test.csv");
try{
OutputStream out = response.getOutputStream( );
byte[] arr=("This is the file data.").getBytes();
response.setContentLength(arr.length);
out.write(arr);
out.close();
}catch(Exception e){
System.out.println("Error: " + e.getMessage() );
}
}
--------------------------------------------------------------------
file is downloaded but when i open it, i have the contents written by me(i.e This is the file data) plus the whole html page source code from where i pressed the download button.
any help regarding this plz.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024221#4024221
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024221
17Â years, 10Â months