7 Replies Latest reply on Feb 12, 2009 5:58 AM by claprun

    error while doing performBlockingInteraction between sharepo

    jan.hoeve

      Currently we have a jboss portal 2.7.1 which produces a portlet. That portlet is to be consumed by a sharepoint portal.

      The portlet correctly shows up in sharepoint, and also navigation is working correctly.
      But when I try to do some action which triggers a performBlockingInteraction, the jboss portal complains with a

      ERROR [STDERR] Bad Base64 input character at 92: 38(decimal)
      javax.xml.rpc.soap.SOAPFaultException: Could not perform action on portlet '/x.y'. javax.servlet.ServletException
      .

      After doing some debugging, it seems i'm getting a strange , and jboss portal is trying to base64 decode the value in it (after JBPNS_).
      <interactionState>JBPNS_rO0ABXc_AAliaS1hY3Rpb24AAAABACVwb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyAAdfX0VPRl9f&[2]=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**</interactionState>


      When i look into the soap messages which is coming back from sharepoint, it looks the navigationalState is the [2] in the interactionState... Somehow sharepoint seems to be messing up the states.

      How can this happen? Do I have to configure something in sharepoint?

      The form action looks like: action=&quot;wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=JBPNS_rO0ABXdFAAliaS1hY3Rpb24AAAABACtwb3J0bGV0L3BvcnRsZXQvQ2xpZW50ZG9zc2llci9zaW1wbGUtc2VhcmNoAAdfX0VPRl9f&amp;wsrp-navigationalState=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**&amp;/wsrp_rewrite&quot;

      I do not understand the *'s in the navigationalState, my own base64 decoder complains on this one.

      When I look at the templates I see the following (in soap msg to sharepoint):
      <templates>
       <defaultTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}&wsrp-url={wsrp-url}&wsrp-requiresRewrite={wsrp-requiresRewrite}&wsrp-navigationalState={wsrp-navigationalState}&wsrp-interactionState={wsrp-interactionState}&wsrp-mode={wsrp-mode}&wsrp-windowState={wsrp-windowState}&wsrp-fragmentID={wsrp-fragmentID}&wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</defaultTemplate>
       <blockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}&wsrp-url={wsrp-url}&wsrp-requiresRewrite={wsrp-requiresRewrite}&wsrp-navigationalState={wsrp-navigationalState}&wsrp-interactionState={wsrp-interactionState}&wsrp-mode={wsrp-mode}&wsrp-windowState={wsrp-windowState}&wsrp-fragmentID={wsrp-fragmentID}&wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</blockingActionTemplate>
       <renderTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}&wsrp-url={wsrp-url}&wsrp-requiresRewrite={wsrp-requiresRewrite}&wsrp-navigationalState={wsrp-navigationalState}&wsrp-interactionState={wsrp-interactionState}&wsrp-mode={wsrp-mode}&wsrp-windowState={wsrp-windowState}&wsrp-fragmentID={wsrp-fragmentID}&wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</renderTemplate>
       ...
      </templates>
      


      Question on these templates:
      should i change the & to &'s ?

      should i add wsrp-ampEntity to the template?



        • 1. Re: error while doing performBlockingInteraction between sha
          claprun

          Can you attach the SOAP request-response sequence for the action that is failing, please?

          • 2. Re: error while doing performBlockingInteraction between sha
            jan.hoeve

            ok, i'll post them asap.

            In my topicstart, there are a couple of mistakes, due to the rendering i think.
            Read the &'s in the templates as &

            so e.g. wsrp_rewrite?wsrp-urlType={wsrp-urlType}&wsrp-url={wsrp-url}&ws...........

            Should i change those &'s to &'s? If so, how can i change those?

            • 3. Re: error while doing performBlockingInteraction between sha
              jan.hoeve

              another try as there seems to be no edit modus. (keeps unescaping my escaped ampersands)

              "jan.hoeve" wrote:
              ok, i'll post them asap.

              In my topicstart, there are a couple of mistakes, due to the rendering i think.
              Read the &'s in the templates as & amp ;

              so e.g. <blockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType} & amp ;wsrp-url={wsrp-url} & amp ;ws...........

              Should i change those & amp ;'s to &'s? If so, how can i change those?


              • 4. Re: error while doing performBlockingInteraction between sha
                jan.hoeve

                This is the soap going from the jboss portal towards sharepoint: (of course the unusefull information stripped out here).

                beware: i put spaces between the ampersand sign and 'amp' and 'quot' etc.
                This soap looks exact like the one which i intercept (no fiddling by this bb forum)

                <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                 <env:Header/>
                 <env:Body>
                 <ns1:getMarkupResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 <ns1:markupContext>
                 <ns1:useCachedMarkup xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">false</ns1:useCachedMarkup>
                 <ns1:mimeType xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">text/html</ns1:mimeType>
                 <ns1:markupString xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">& lt;!DOCTYPE div PUBLIC & quot;-//W3C//DTD XHTML 1.0 Strict//EN& quot; & quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd& quot;& gt;& lt;div xmlns=& quot;http://www.w3.org/1999/xhtml& quot; class=& quot;bi& quot;& gt;.................CUT.............
                 & lt;form enctype=& quot;multipart/form-data& quot; id=& quot;cmfform& quot; method=& quot;POST& quot; action=& quot;wsrp_rewrite?wsrp-urlType=blockingAction& amp;wsrp-interactionState=JBPNS_rO0ABXc_AAliaS1hY3Rpb24AAAABACVwb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyAAdfX0VPRl9f& amp;wsrp-navigationalState=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**& amp;/wsrp_rewrite& quot;& gt;& lt;div& gt;& lt;input value=& quot;& quot; name=& quot;focusfield& quot; id=& quot;f...................CUT......................</ns1:markupString>
                 <ns1:locale xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">en-us</ns1:locale>
                 <ns1:requiresUrlRewriting xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">true</ns1:requiresUrlRewriting>
                 <ns1:preferredTitle xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">xx Web Appplication Portlet</ns1:preferredTitle>
                 </ns1:markupContext>
                 </ns1:getMarkupResponse>
                 </env:Body>
                </env:Envelope>
                


                When the user fills in data in sharepoint and post it back towards jboss portal, the soap looks like:
                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 <soap:Body>
                 <performBlockingInteraction xmlns="urn:oasis:names:tc:wsrp:v1:types">
                 <registrationContext>
                 <registrationHandle>10</registrationHandle>
                 </registrationContext>
                 <portletContext>
                 <portletHandle>/xxx.yy</portletHandle>
                 </portletContext>
                 <runtimeContext>
                 <userAuthentication>wsrp:password</userAuthentication>
                 <templates>
                 <defaultTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</defaultTemplate>
                 <blockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</blockingActionTemplate>
                 <renderTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</renderTemplate>
                 <resourceTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</resourceTemplate>
                 <secureDefaultTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureDefaultTemplate>
                 <secureBlockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureBlockingActionTemplate>
                 <secureRenderTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureRenderTemplate>
                 <secureResourceTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureResourceTemplate>
                 </templates>
                 </runtimeContext>
                 <userContext>
                 <userContextKey>xx\Administrator</userContextKey>
                 </userContext>
                 <markupParams>
                 <secureClientCommunication>false</secureClientCommunication>
                 <locales>en-us</locales>
                 <mimeTypes>text/html</mimeTypes>
                 <mimeTypes>text/xml</mimeTypes>
                 <mode>wsrp:view</mode>
                 <windowState>wsrp:normal</windowState>
                 <navigationalState>JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**</navigationalState>
                 </markupParams>
                 <interactionParams>
                 <portletStateChange>cloneBeforeWrite</portletStateChange>
                 <interactionState>JBPNS_rO0ABXc_AAliaS1hY3Rpb24AAAABACVwb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyAAdfX0VPRl9f& amp;[2]=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**</interactionState>
                 <formParameters name="focusfield">
                 <value/>
                 </formParameters>
                 </interactionParams>
                 </performBlockingInteraction>
                 </soap:Body>
                </soap:Envelope>
                


                then there is an error:
                2009-02-11 15:56:27,268 ERROR [STDERR] Bad Base64 input character at 92: 38(decimal)

                2009-02-11 15:56:31,873 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@19e1e9
                2009-02-11 15:56:33,253 DEBUG [org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC] Begin response processing
                2009-02-11 15:56:33,253 ERROR [org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC] SOAP request exception
                2009-02-11 15:56:33,253 ERROR [org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC] SOAP request exception
                javax.xml.rpc.soap.SOAPFaultException: Could not perform action on portlet '/xx.yyPortlet'. javax.servlet.ServletException
                at org.jboss.portal.wsrp.WSRPExceptionFactory.createSOAPFaultException(WSRPExceptionFactory.java:126)
                at org.jboss.portal.wsrp.WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.java:88)
                at org.jboss.portal.wsrp.producer.MarkupHandler.performBlockingInteraction(MarkupHandler.java:136)
                at org.jboss.portal.wsrp.producer.WSRPProducerImpl.performBlockingInteraction(WSRPProducerImpl.java:189)


                Have a look at that strange interactionState string... [2]....that's not valid base64, is that why the error is there?

                • 5. Re: error while doing performBlockingInteraction between sha
                  claprun

                  It seems indeed like SharePoint is mangling the interaction state by appending the navigational state to it. This seems like something you might want to see with Microsoft as no WSRP producer can deal with modified interaction state (which is supposed to be treated opaquely by the consumer).

                  Another point, it seems as if your portlet is sending complete markup (i.e. a complete xhtml document) as opposed to a fragment as mandated by the specification. This might cause issues with portals as portlets are only expected to generate markup fragments to be aggregated in a complete page.

                  • 6. Re: error while doing performBlockingInteraction between sha
                    jan.hoeve

                     

                    "chris.laprun@jboss.com" wrote:
                    It seems indeed like SharePoint is mangling the interaction state by appending the navigational state to it. This seems like something you might want to see with Microsoft as no WSRP producer can deal with modified interaction state (which is supposed to be treated opaquely by the consumer).

                    hmm if this is true, we do have a serious problem here...
                    I posted this question on msdn: http://code.msdn.microsoft.com/WSRPToolkit/Thread/View.aspx?ThreadId=1314
                    Any more clues where I can ask?

                    "chris.laprun@jboss.com" wrote:

                    Another point, it seems as if your portlet is sending complete markup (i.e. a complete xhtml document) as opposed to a fragment as mandated by the specification. This might cause issues with portals as portlets are only expected to generate markup fragments to be aggregated in a complete page.

                    we will have to look into that issue, but i cannot imagine that it causes the mangled interactionState. :S

                    • 7. Re: error while doing performBlockingInteraction between sha
                      claprun

                      The portlet issue shouldn't cause the mangled interaction state. As far as WSRP support with Microsoft, I don't know where you could ask. The WSRP implementation in Sharepoint seems to have several issues...