0

I have been trying for over a week to display a list in an XPage of blog entries from IBM Connections. The XPages server and the Connections server are in the same domain (for example the XPages are accessed through intranet.mycompany.com and the Connections pages are accessed through connections.mycompany.com). If I log into one in a web browser I am able to access the other without logging in again. The admins tell me this is because they have configured both to use the same ltpa tokens. The XPages server runs Domino 8.5.3 with the Extension Library installed (version 853.20121217-1354) and the Connections server runs version 4 with all the latest patches. Both have certificates for using HTTPS.

I can successfully get an XML list of blog entries in my web browser by using the following URL:

https://connections.mycompany.com/blogs/d33250c2-a80a-401c-b20d-d12d651b749c/feed/entries/atom?lang=en_gb&since=2013-03-02T08:30:00.000Z

My XPage has a Data View with the following code fragment:

<xe:dataView rows="10" id="dataView1"
            value="connectionsAtom1" columnTitles="true" var="entry"
            collapsibleDetail="true" detailsOnClient="true">
                    <xe:this.data>
                        <xe:connectionsData var="connectionsAtom1"
                            maxBlockCount="3" endpoint="connectionsLtpa">
                            <xe:this.serviceUrl>/blogs/d33250c2-a80a-401c-b20d-d12d651b749c/feed/entries/atom</xe:this.serviceUrl>
                            <xe:this.urlParameters>
                                <xe:urlParameter name="lang"
                                    value="en_gb">
                                </xe:urlParameter>
                                <xe:urlParameter name="since"
                                    value="2013-03-02T08:30:00.000Z">
                                </xe:urlParameter>
                            </xe:this.urlParameters>
                        </xe:connectionsData>
                    </xe:this.data>

(Note: I've hard coded serviceUrl and the urlParameters here but they are actually computed in the real version.)

When I open this XPage in a web browser (yes, I am logged in) I get this error:

com.ibm.xsp.FacesExceptionEx: Error while reading the Connections entries

My questions are: am I wasting my time trying to use the connectionsLtpa endpoint? If not then what am I doing wrong?

1 Answers1

0

Don't reinvent the wheel :-) The easiest way to sort this out is to use the free IBM Social Business Toolkit. It comes with all the code and samples you need and has been designed exactly for that purpose. Also: if you are logged in, your browser has the LTPA token, but not the server. To obtain the LTPA token you should be able to use session.getSessionToken and then reuse that in the request

stwissel
  • 20,110
  • 6
  • 54
  • 101
  • Thanks, but I **have** used the SBT. That's where I copied the dataview code from. The problem is that the examples in the SBT use OAUTH (or basic authentication as far as I remember) but because we are all Connections newbies here the admins are reluctant to to perform the steps required to give me the OAUTH credentials I need. That's why I was hoping to use LTPA. As you point out (and I don't know why I didn't realise it) the LTPA token is in the browser and not the server. Oh well, I'll go back to hassling the admins :) – Rob Weddell Apr 18 '13 at 08:11
  • I meant the **XPages SBT** not the SBT in your link. – Rob Weddell Apr 18 '13 at 08:20
  • Hassling the admins is best. LTPA could work if you get it from the notessession, but I haven't tried that – stwissel Apr 18 '13 at 13:15
  • To obtain the LTPA token you should be able to use [session.getSessionToken](http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_GETSESSIONTOKEN_METHOD_SESSION_JAVA.html) and then reuse that in the request – stwissel Apr 18 '13 at 14:24