1 2 Previous Next 20 Replies Latest reply on May 10, 2010 12:52 AM by anil.kolhe

    How to create a WSRP remote portlet on GateIn

      Greetings to all

       

          At this point I am making an attempt to create a portal that will consist of local portlets and remote to the server.

       

          I come to testing the consummation of remote portlets and it works great, now I want to develop or produce a portlet that will be exposed to the outside, this means that this portlet will be consumed by another portal, I have reviewed documentation and just says how to define the Remote Portlet example:
          In the file jboss-portlet.xml
          <portlet>
               <portlet-name> BasicPortlet </ portlet-name>
               <remotable> true </ remote>
          </ portlet>

       

          What are the steps to build a remote portlet to be consumed, there is some simple example?, GateIn has an interface to make remote portlets but not very explanatory, from my point of view.

       

          Appreciate a response

       

      dmaldonado

        • 1. Re: How to create a WSRP remote portlet on GateIn
          claprun

          Hi Darlys,

           

          I do need to update the documentation for WSRP in GateIn.

           

          That said, we have changed the way a portlet is made remote on GateIn. jboss-portlet.xml files are not used anymore in GateIn, so I had to find another way. Making a portlet available for remote consumption is now done via the portlet.xml directly, using a GateIn specific container-runtime-option for that portlet (it can also be defined at the portlet-app level as well if you want all portlets in the portlet application to be marked as remote).

           

          Here's an example of how to do it:

           

          <?xml version="1.0" standalone="yes"?>
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       version="2.0">
          <portlet-app>
             <portlet>
                <portlet-name>BasicPortlet</portlet-name>
                ...
              
                <container-runtime-option>
                   <name>org.gatein.pc.remotable</name>
                   <value>true</value>
                </container-runtime-option>
             </portlet>
          </portlet-app>

           

          Basically, just add a container-runtime-option which name is org.gatein.pc.remotable and which value is set at true.

          • 2. Re: How to create a WSRP remote portlet on GateIn

            The way to define a remote portlet is much simpler than
            I thought, that is, simply modifying the configuration file
            portlet.xml and add the tag for each portlet <container-runtime-option>
            that I want to define remote

             

            <container-runtime-option>
                <name> org.gatein.pc.remotable </ name>
                <value> true </ value>
            </ container-runtime-option>

             

            What do I consume a remote portlet (like you I've explained) GateIn from another server?
            I have consumed a remote portlet through the URL of the file
            WSDL that defines the remote portlet service, are some examples of
            as to the consummation of the remote portlet that comes with GateIn?

             

            Thanks in advance for your response.

             

            Darlys

            • 3. Re: How to create a WSRP remote portlet on GateIn
              claprun

              I'm not sure I understand your question. Are you trying to consume portlets that are deployed in GateIn via WSRP on a remote server? Or trying to consume remote portlets deployed in a remote server in GateIn?

              • 4. Re: How to create a WSRP remote portlet on GateIn

                Greetings Chris,

                 

                You can help me with another problem far more urgent, I have created
                dans gateIn a portlet, against I could not import them files
                . css et. js of this portlet. In my application I add a file
                resources.xml gatein-WEB-INF to define another skin for my portlet
                Here I show you a bit the contents of this configuration file.

                 

                <portlet-skin>
                   <application-name>IdeoGenFormPortletExemple</ application-name>
                   <portlet-name>IdeoGenFormPortletExemple</ portlet-name>
                   <skin-name>OtherSkin</ skin-name>
                   <css-path>/skin/DefaultStylesheetExemple.css</ css-path>
                   <overwrite>false</ overwrite>
                </ Portlet-skin>

                 

                The file contains DefaultStylesheetExemple.css imports of
                corresponding files with the syntax:

                 

                @ Import url (01.css-file-name);
                @ Import url (02.css-file-name);

                 

                When I do click on to show my portlet portail and see the
                source code of the pages .css files are not imported.

                 

                You have an idea of what happens or you have an example please.

                 

                Thanks in advance

                • 5. Re: How to create a WSRP remote portlet on GateIn
                  gateinuser

                  Hi Darlys,

                   

                  I suppose you too worked on WSRP portlets. Need your help. I configured in my local GateIn to access a remote portlet using the WSRP Configuration portlet and it was successful. To add this remote portlet to one of my pages, i am unable to locate the portlet which i configured. Could you let know where should i look out for this portlet?I am following the WSRP Configuration guide at http://docs.jboss.com/gatein/portal/3.0.0-FINAL/reference-guide/en-US/html_single/index.html#consumer_configuration. Unable to do what is mentioned in the section 8.6.2.3 of thi guide.

                   

                  Thanks in advance!

                  • 6. Re: How to create a WSRP remote portlet on GateIn
                    claprun

                    Unfortunately, the available documentation is not up to date for WSRP. Please find attached a PDF of the current version (still being worked on). I'd appreciate if you could tell me if you spot any errors or find things that you think might be improved.

                    • 7. Re: How to create a WSRP remote portlet on GateIn
                      gateinuser

                      Hi Chris,

                      Thanks a ton!!...my wsrp issue got resolved and its wrking jus fantastically. The only thing i was goin wrong was i was using <remotable> true<remotble>, as mentioned in gatein online documentation. But from ur shared pdf, i changed it to

                      <container-runtime-option>

                      <name>org.gatein.pc.remotable</name>

                      <value>true</value>

                      </container-runtime-option>  and it started wrking...Many thanks to u, i was stuck vth this issue since last friday & nw its woow

                      The pdf looks fine now, when i go thro in detail, if any issues, i wil let know...

                      Thanks again!!

                      • 8. Re: How to create a WSRP remote portlet on GateIn
                        anil.kolhe

                        Is there any documentation which describes the WSRP producer in details? Attached PDF has details for WSRP consumer.

                        • 9. Re: How to create a WSRP remote portlet on GateIn
                          claprun

                          There's a section on the producer at the end of the PDF. What else do you need to know? There isn't that much to learn about the WSRP producer.

                          • 10. Re: How to create a WSRP remote portlet on GateIn
                            anil.kolhe

                            I wanted to share the local portlet on GateIn to other portal server like Liferay or Glassfish web space.

                            • 11. Re: How to create a WSRP remote portlet on GateIn
                              claprun

                              Everything you need is in the attached PDF, then. You just need to mark the portlet as remotable using a container-runtime-option as explained and you're good to go.

                              • 12. Re: How to create a WSRP remote portlet on GateIn
                                anil.kolhe

                                I am little confuse. Does every portlet has the separate portal.xml file associated with it.

                                I can see four portal.xml files in the GateIn JBoss directory. Do I need to make this change to specific war file?

                                • 13. Re: How to create a WSRP remote portlet on GateIn
                                  claprun

                                  The file you need to edit is the portlet.xml file found in your portlet WAR file to make it remote.

                                  • 14. Re: How to create a WSRP remote portlet on GateIn
                                    anil.kolhe

                                    I am able to see the JBoss in-build portlet "Tabbed Portlet" in the remote portlet category after modifying the portlet.xml.

                                    Where do I get the url which will be needed by the producer of the different portal server.

                                    http://{hostname}:{port}/portal-wsrp/MarkupService?wsdl after passing correct hostname and port giving 404 resource not available error.How to get the WSDL url?

                                    1 2 Previous Next