OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp-interop message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [wsrp-interop] Oracle producer expects URL-decoded navigational state?



I think we are in violent agreement. Values are not to be encoded when they are appearing in the protocol's fields, but are to be encoded when inserted into URLs within the markup. I think the question starting this discussion was what should the Consumer do relative to opaque values which were encoded into the URL. What I heard from the discussion of current web servers is that the only truly interoperable approach will be to have the Consumer do a decode on the incoming parameters. This provides a well-defined behavior for Producers/Portlets which happens to mimic the behavior they experience with the web server today. Explicitly, this behavior is:
  - Producer/Portlet always encodes values being written into URLs
  - Consumer always decodes values received when an URL is activated before filling in the fields passed to the Producer

Anyone see problems with this approach?

Rich Thompson



Andre Kramer <andre.kramer@eu.citrix.com>

07/25/2003 09:48 AM

       
        To:        Rich Thompson/Watson/IBM@IBMUS, wsrp-interop@lists.oasis-open.org
        cc:        
        Subject:        RE: [wsrp-interop] Oracle producer expects URL-decoded navigation        al state?



They are no different in that they are encoded when placed in a URL, agree. However, values for mode and window state may be supplied by the consumer (e.g. via a "wsrp:150%WindowSize" decoration) and it seems very strange for consumers to have to encode such consumer generated values before sending them via SOAP (which does its own encoding) just so that the producer can decode all values it receives as input (as if they came in from a URL).
 
Hope the RegistrationData fields are not to be URL encoded too. Either we send all values unencoded in the protocol (except in markup where they are encoded of course) or specify each field that needs to be (redundantly) URL encoded in the protocol (and mode and window state values can be same as nav state and interaction state in this list).
 
regards,
Andre
-----Original Message-----
From:
Rich Thompson [mailto:richt2@us.ibm.com]
Sent:
25 July 2003 14:09
To:
wsrp-interop@lists.oasis-open.org
Subject:
RE: [wsrp-interop] Oracle producer expects URL-decoded navigational state?


Why treat window state and mode values differently? The spec requires that all parameters be encoded when written in an URL ... including these as the URL is otherwise ill-formed. The spec also restricts the values flowing across the protocol to those defined by the spec and the relevant RegistrationData fields. It then requires that any other value be treated as if it were "wsrp:view".


Rich Thompson


Andre Kramer <andre.kramer@eu.citrix.com>

07/25/2003 04:49 AM

       
       To:        "'Richard Jacob'" <richard.jacob@de.ibm.com>, Andre Kramer <andre.kramer@eu.citrix.com>

       cc:        wsrp-interop@lists.oasis-open.org

       Subject:        RE: [wsrp-interop] Oracle producer expects URL-decoded navigation                al state?




I think we do agree that a producer must encode all values it places into URL templates and that it writes in wsrp-rewrite expressions.

The question outstanding is whether the consumer or producer should decode all/some values.

I believe we came down to consumer decodes at the last f2f (in the infamous "/" discussions). It's normal Web practice to encode query string values and have them decoded when they come back into the Web server (automatically). But it's not normal practice to pass URL encoded values as strings which also get XML encoded by SOAP.

Sure, the producer can skip encoding/decoding if it knows that the value is safe, but the consumer would still need to do an encode in forwarding the value, so no free lunch.

Values for wsrp-mode and wsrp-windowsState (placed on URls) are not opaque, so the protocol should say that they are to be encoded (if decoded by the producer) as producers don't know if they happen to be on a url or supplied by the consumer. [Even navigational and interaction state are not totally opaque in that these are xsd:string strings and get XML encoded by the protocol. If we used base64Binary I could see an opaque argument coming in...]

Consumer decodes also seems less sensitive to errors in that producers can choose safe values (e.g. alphanumeric or binHex would be better in any case, making the consumer decode irrelevant) or the producer can check if a decode has been missed by the consumer (e.g. add a % char at end) or, e.g., producers can do complex double encoding.

If we changed to producer decodes then we would need a list of fields at the protocol level that are to be transmitted in URL encoded form. This would need to be be added as an errata on the 1.0 spec. Staying with consumer/Web Server decodes just needs a prepared FAQ.

regards,
Andre

-----Original Message-----
From: Richard Jacob [
mailto:richard.jacob@de.ibm.com]
Sent: 21 July 2003 11:31

To: Andre Kramer

Cc: wsrp-interop@lists.oasis-open.org

Subject: RE: [wsrp-interop] Oracle producer expects URL-decoded

navigation al state?

well right, sometimes the Consumer might receive them still encoded.
But shouldn't they be transparent to the consumer?

If the producer chooses to store values which need to be encoded, it should

also be responsible for decoding them.

A producer might choose to have values in which do not need to be encoded

so everything would work without the extra decoding step.

I think the values should be completly transparent to the Consumer.

In the spec we don't say a word about the Consumer needing to decode, so

this interpretation may break interoperability.

Mit freundlichen Gruessen / best regards,

        Richard Jacob
______________________________________________________

IBM Lab Boeblingen, Germany

Dept.8288, WebSphere Portal Server Development

Phone: ++49 7031 16-3469  -  Fax: ++49 7031 16-4888

Email:
mailto:richard.jacob@de.ibm.com

|---------+---------------------------->
|         |           Andre Kramer     |

|         |           <andre.kramer@eu.|

|         |           citrix.com>      |

|         |                            |

|         |           07/21/2003 12:13 |

|         |           PM               |

|---------+---------------------------->

>--------------------------------------------------------------------------------------------------------------------------------------------------|

  |                                                                                                                                                  |

  |       To:       wsrp-interop@lists.oasis-open.org                                                                                                |

  |       cc:                                                                                                                                        |

  |       Subject:  RE: [wsrp-interop] Oracle producer expects URL-decoded navigation       al state?                                                |

  >--------------------------------------------------------------------------------------------------------------------------------------------------|


We, like Oracle, also decode and for a good reason: the Web server does the
decode for us on the way in.

regards,
Andre

-----Original Message-----
From: Richard Jacob [
mailto:richard.jacob@de.ibm.com]
Sent: 21 July 2003 10:10

To: wsrp-interop@lists.oasis-open.org

Subject: [wsrp-interop] Oracle producer expects URL-decoded navigational

state?



Hi,

I noticed that it seems the Oracle producer expects URL-decoded parameter
values like the navigationalState to be passed back.

For example when clicking on the render URL "State1|State2" link in portlet

E:4:default the navigationalState is navState%3D1 which is "navState=1" URL

decoded.
When we pass the still encoded value back, the portlet throws an

OperationFaled fault. It works with the decoded value.

My understanding is that the consumer should not be required to decode the
parameter values before passing them to the producer, but to pass them

"as-is", i.e. they should be transparent for the Consumer.

The following are massage traces of getMarkup() when clicking on the above
mentioned renderURL, one with encoded and one with decoded navState values:

1. decoded:
POST /wsrp/jaxrpc/WSRPBaseService HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.1

Host: localhost:8082

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: "urn:oasis:names:tc:wsrp:v1:getMarkup"

Content-Length: 1667

Cookie:

JSESSIONID=82b5bea16ff84f6ba1c9f3c8986b8c51.rQjwaxqK-AXMmkbGngTxpQOUaN0KahD3lN4Oc2SSbMSLax8IahyL-x8Kn6bycgTAbhmRakbvbh4L-wOSa30K8Oz1iN8Ka2TRnk8MbN0IrlaIpR9vmQLz-AbJpgaMbx8LchyxhOaOgzXepR9OmkKxhOaOgzXepR9OmkKxn6jAmljGr5XDqQLvpAe_

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi
="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>

<getMarkup xmlns="urn:oasis:names:tc:wsrp:v1:types">

 <registrationContext>

  <registrationHandle>C:148.87.122.191:3c9557:f66626afe5:

-7f24</registrationHandle>

 </registrationContext>

 <portletContext>

  <portletHandle>E:4:default</portletHandle>

 </portletContext>

 <runtimeContext>

  <userAuthentication>wsrp:none</userAuthentication>

  <portletInstanceKey>Oracle2_row_col1_p4</portletInstanceKey>

  <namespacePrefix>Pluto_Oracle2_row_col1_p4_</namespacePrefix>

 </runtimeContext>

 <userContext>

  <userContextKey>dummyUserContextKey</userContextKey>

 </userContext>

 <markupParams>

  <secureClientCommunication>false</secureClientCommunication>

  <locales>en</locales>

  <locales>de</locales>

  <mimeTypes>text/html</mimeTypes>

  <mode>wsrp:view</mode>

  <windowState>wsrp:normal</windowState>

  <clientData>

   <userAgent>IBM WSRP4J ProxyPortlet.0.042</userAgent>

  </clientData>

  <navigationalState>nav_state=1</navigationalState>

  <markupCharacterSets>UTF-8</markupCharacterSets>

  <validNewModes>wsrp:view</validNewModes>

  <validNewModes>wsrp:help</validNewModes>

  <validNewModes>wsrp:edit</validNewModes>

  <validNewWindowStates>wsrp:normal</validNewWindowStates>

  <validNewWindowStates>wsrp:maximized</validNewWindowStates>

  <validNewWindowStates>wsrp:minimized</validNewWindowStates>

 </markupParams>

</getMarkup>

</soapenv:Body>

</soapenv:Envelope>

Response:
HTTP/1.1 200 OK

Date: Mon, 21 Jul 2003 08:52:10 GMT

Server: Oracle9iAS/9.0.2 Oracle HTTP Server Oracle9iAS-Web-Cache/Oracl

Via: HTTP/1.1 ips-ehni-c.ehningen.de.ibm.com (IBM-PROXY-WTE), 1.1 JACOBTP

Cache-Control: private

SOAPAction: ""

Content-Length: 2010

Content-Type: text/xml; charset="utf-8"

Set-Cookie:

JSESSIONID=82b5bea16ff84f6ba1c9f3c8986b8c51.rQjwaxqK-AXMmkbGngTxpQOUaN0KahD3lN4Oc2SSbMSLax8IahyL-x8Kn6bycgTAbhmRakbvbh4L-wOSa30K8Oz1iN8Ka2TRnk8MbN0IrlaIpR9vmQLz-AbJpgaMbx8LchyxhOaOgzXepR9OmkKxhOaOgzXepR9OmkKxn6jAmljGr5XDqQLvpAe_;

Path=/wsrp
X-Cache: MISS from JACOBTP

Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi
="
http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0
="urn:oasis:names:tc:wsrp:v1:types"><env:Body><ns0:getMarkupResponse><ns0:markupContext><ns0:useCachedMarkup>false</ns0:useCachedMarkup><ns0:mimeType>text/html</ns0:mimeType><ns0:markupString>

lt;p class="portlet-msg-status"&gt;Current count = 0 - adjust counter:
&lt;a href="

wsrp_rewrite?wsrp-urlType=blockingAction&amp;amp;wsrp-mode=wsrp%3Aview&amp;amp;wsrp-windowState=wsrp%3Anormal&amp;amp;wsrp-secureURL=false&amp;amp;wsrp-navigationalState=nav_state%3D1&amp;amp;wsrp-interactionState=adjust_value%3Dinc/wsrp_rewrite"

gt;+&lt;/a&gt; &lt;a href
="wsrp_rewrite?wsrp-urlType=blockingAction&amp;amp;wsrp-mode=wsrp%3Aview&amp;amp;wsrp-windowState=wsrp%3Anormal&amp;amp;wsrp-secureURL=false&amp;amp;wsrp-navigationalState=nav_state%3D1&amp;amp;wsrp-interactionState=adjust_value%3Ddec/wsrp_rewrite"

gt;-&lt;/a&gt;&lt;/p&gt;
&lt;p class="portlet-msg-status"&gt;In navigational state 1 - change state:

[ &lt;a href="
wsrp_rewrite?wsrp-urlType=render&amp;amp;wsrp-mode=wsrp%3Aview&amp;amp;wsrp-windowState=wsrp%3Anormal&amp;amp;wsrp-secureURL=false&amp;amp;wsrp-navigationalState=nav_state%3D1/wsrp_rewrite"

gt;State 1&lt;/a&gt; | &lt;a href
="wsrp_rewrite?wsrp-urlType=render&amp;amp;wsrp-mode=wsrp%3Aview&amp;amp;wsrp-windowState=wsrp%3Anormal&amp;amp;wsrp-secureURL=false&amp;amp;wsrp-navigationalState=nav_state%3D2/wsrp_rewrite"

gt;State 2&lt;/a&gt; ]&lt;/p&gt;
&lt;p class="portlet-msg-status"&gt;Last generated: July 21, 2003 2:52:09

AM MDT&lt;/p&gt;

</ns0:markupString><ns0:locale>EN</ns0:locale><ns0:requiresUrlRewriting>true</ns0:requiresUrlRewriting><ns0:cacheControl><ns0:expires>60</ns0:expires><ns0:userScope>wsrp:perUser</ns0:userScope></ns0:cacheControl><ns0:preferredTitle>Cache

Test
Portlet</ns0:preferredTitle></ns0:markupContext></ns0:getMarkupResponse></env:Body></env:Envelope>

2. still encoded:
POST /wsrp/jaxrpc/WSRPBaseService HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.1

Host: localhost:8082

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: "urn:oasis:names:tc:wsrp:v1:getMarkup"

Content-Length: 2040

Cookie:

JSESSIONID=6d33f8cb0b9f46748d8881a90ab3707e.rQjwaxqK-AXMmkbGngTxpQOUaN0KahD3lN4Oc2SSbMSLax8IahyL-x8Kn6bycgTAbhmRakbvbh4L-wOSa30K8Oz1iN8Ka2TRnk8MbN0IrlaIpR9vmQLz-AbJpgaMbx8LchyxhOaOgzXepR9OmkKxhOaOgzXepR9OmkKxn6jAmljGr5XDqQLvpAe_

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi
="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>

<getMarkup xmlns="urn:oasis:names:tc:wsrp:v1:types">

 <registrationContext>

  <registrationHandle>C:148.87.122.191:3c9557:f66626afe5:

-7f1a</registrationHandle>

 </registrationContext>

 <portletContext>

  <portletHandle>E:4:default</portletHandle>

 </portletContext>

 <runtimeContext>

  <userAuthentication>wsrp:none</userAuthentication>

  <portletInstanceKey>9.152.199.249_1058777243647_5</portletInstanceKey>

  <namespacePrefix></namespacePrefix>

 </runtimeContext>

 <userContext>

  <userContextKey>Erebus</userContextKey>

  <profile>

   <name>

    <given>John</given>

    <family>Doe</family>

    <middle>Joe</middle>

    <nickname>Jo</nickname>

   </name>

   <bdate>1970-01-31T23:00:00.000Z</bdate>

   <gender>mmh</gender>

   <employerInfo/>

   <homeInfo/>

   <businessInfo/>

  </profile>

 </userContext>

 <markupParams>

  <secureClientCommunication>false</secureClientCommunication>

  <locales>en</locales>

  <locales>de</locales>

  <mimeTypes>text/html</mimeTypes>

  <mode>wsrp:view</mode>

  <windowState>wsrp:normal</windowState>

  <clientData>

   <userAgent>WSRP4J Swing Consumer V. 0.3</userAgent>

  </clientData>

  <navigationalState>nav_state%3D1</navigationalState>

  <markupCharacterSets>UTF-8</markupCharacterSets>

  <validNewModes>wsrp:view</validNewModes>

  <validNewModes>wsrp:help</validNewModes>

  <validNewModes>wsrp:edit</validNewModes>

  <validNewModes>wsrp:preview</validNewModes>

  <validNewWindowStates>wsrp:normal</validNewWindowStates>

  <validNewWindowStates>wsrp:maximized</validNewWindowStates>

  <validNewWindowStates>wsrp:minimized</validNewWindowStates>

  <validNewWindowStates>wsrp:solo</validNewWindowStates>

 </markupParams>

</getMarkup>

</soapenv:Body>

</soapenv:Envelope>

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2003 08:48:00 GMT

Server: Oracle9iAS/9.0.2 Oracle HTTP Server Oracle9iAS-Web-Cache/Oracl

Via: HTTP/1.1 ips-ehni-c.ehningen.de.ibm.com (IBM-PROXY-WTE), 1.1 JACOBTP

Cache-Control: private

SOAPAction: ""

Content-Length: 464

Content-Type: text/xml; charset="utf-8"

Set-Cookie:

JSESSIONID=6d33f8cb0b9f46748d8881a90ab3707e.rQjwaxqK-AXMmkbGngTxpQOUaN0KahD3lN4Oc2SSbMSLax8IahyL-x8Kn6bycgTAbhmRakbvbh4L-wOSa30K8Oz1iN8Ka2TRnk8MbN0IrlaIpR9vmQLz-AbJpgaMbx8LchyxhOaOgzXepR9OmkKxhOaOgzXepR9OmkKxn6jAmljGr5XDqQLvpAe_;

Path=/wsrp
X-Cache: MISS from JACOBTP

Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi
="
http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0
="urn:oasis:names:tc:wsrp:v1:types"><env:Body><env:Fault xsi:type

="env:Fault"><faultcode>env:Server</faultcode><faultstring>oracle.webdb.wsrp.OperationFailed</faultstring><detail><ns0:OperationFailed/></detail></env:Fault></env:Body></env:Envelope>

Mit freundlichen Gruessen / best regards,

        Richard Jacob
______________________________________________________

IBM Lab Boeblingen, Germany

Dept.8288, WebSphere Portal Server Development

Phone: ++49 7031 16-3469  -  Fax: ++49 7031 16-4888

Email:
mailto:richard.jacob@de.ibm.com



You may leave a Technical Committee at any time by visiting
http://www.oasis-open.org/apps/org/workgroup/wsrp-interop/members/leave_workgroup.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]