WSRP Consumer Process
From OpenQuote
When consuming OpenQuote WSRP portlets for the quote process, the basic steps required are:
- Register with WSRP Server (this step is only required once per server).
- Request quote questions (once per user session).
- Submit answers.
- Request next form – if the submitted question answers are OK, the process will move on to the next question page if further question pages are available (proceed to step 2), or will progress to the quote or referral pages if the final question page has been completed (step 5). Where invalid answers are given the process will take you back to step 3.
- Submit from quote screen, either re-quote (back to step 2), or quit (end) depending upon user selection.
- De-register consumer with WSRP Server (opposite to step 1 - only required when the consumer is being shut down).
Notes
- JBoss Portal server used by default for OpenQuote.
- Step 1 is only required once to initialize connection with server.
- Steps 2 – 5 are all user/session specific.
- Step 6 is designed to tidy up after the consumer finished with it.(i.e. server being stopped)
In this document blue highlighted element values are fixed by the server. Pink highlighted elements are values that you can define.
The example requests and responses shown for each of the steps are for a purely fictional product, designed to give a simple overview of the process and message format.
[edit] STEP 1 - RegistrationService (register with WSRP portal server)
http://localhost:8080/portal-wsrp/RegistrationService
Request Object Required Fields
- consumerName: Name you are to give your WSRP consumer.
- consumerAgent: The agent your consumer is running on, must be of the format <agent name>.<major version number>.<minor version number> .
Response Object Returned Fields
- registrationHandle: The handle used in future calls for this consumer.
[edit] Request
OST /portal-wsrp/RegistrationService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:register" Content-Type: text/xml; charset=UTF-8 JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 415 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:register xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:consumerName>AILConsumer</ns1:consumerName> <ns1:consumerAgent>AILAgent.1.0</ns1:consumerAgent> <ns1:methodGetSupported>false</ns1:methodGetSupported> </ns1:register> </env:Body> </env:Envelope>
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 12:50:22 GMT <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:registerResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:registerResponse> </env:Body> </env:Envelope>
[edit] STEP 2 & 4 Request - Markup (for request quote questions and request next form)
http://localhost:8080/portal-wsrp/MarkupService
Request Object Required Parameters
- JSESSIONID: This is the individual user session ID.
- openquote.product: The name of the product in OpenQuote to use.
Request Object Required Fields
- registrationHandle: Your WSRP consumer's registration handle given to you by the registration service in step 1.
- portletHandle: This is a handle that represents the OpenQuote product you are using. This value is defined by the Server. If you don't know the handle you require it can be provided by the WSRP ServiceDescription service (not described in these instructions).
- portletInstanceKey: This key is used to create an instance of the OpenQuote product to be used by your WSRP consumer. You do not require a separate instance for each user. You can use any value you want here.
- namespacePrefix: Name space prefix – a single portlet can be shown many times simultaneously on a single screen, although typically it will only be shown once. Use a unique value for each view being shown.
- mimeTypes: Mime Type response required – text/html or text/xml resonse content required.
Notes
- On the first call to the Markup Service (this call) for a user, the session ID (JSESSIONID) is not required, however a unique session id will be returned to you in the response object of that first call, this id should then be passed in the request for any future calls to the Markup service for the user.
- The request parameter 'openquote.product' only needs to be passed on the first request for markup, the service returns the markup for that originally requested product until a different product is passed in the parameter.
[edit] Request
POST /portal-wsrp/MarkupService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:getMarkup" Cookie: JSESSIONID=8B38B5A866EB5413A816A70AC7D4AA01 Content-Type: text/xml; charset=UTF-8 openquote.product: AIL.Demo.InsuranceProductName JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 1714 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:getMarkup xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:registrationContext> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:registrationContext> <ns1:portletContext> <ns1:portletHandle>quotation.WSRPQuotationPortlet</ns1:portletHandle> </ns1:portletContext> <ns1:runtimeContext> <ns1:userAuthentication>wsrp:none</ns1:userAuthentication> <ns1:portletInstanceKey>insureinstance</ns1:portletInstanceKey> <ns1:namespacePrefix>insureplus_namespace</ns1:namespacePrefix> </ns1:runtimeContext> <ns1:userContext xsi:nil="1"/> <ns1:markupParams> <ns1:secureClientCommunication>false</ns1:secureClientCommunication> <ns1:locales>en-GB</ns1:locales> <ns1:mimeTypes>text/html</ns1:mimeTypes> <ns1:mode>wsrp:view</ns1:mode> <ns1:windowState>wsrp:normal</ns1:windowState> <ns1:clientData> <ns1:userAgent>Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3</ns1:userAgent> </ns1:clientData> </ns1:markupParams> </ns1:getMarkup> </env:Body> </env:Envelope>
[edit] STEP 2 Response – Markup (from request quote questions)
Response Object Returned Parameters
- JSESSIONID: This is the individual user session ID.
Response Object Returned Fields
- markupString: HTML or XHTML for the form (XML safe string).
Notes
- On the first call to the Markup Service (this call) for each user, this session ID (JSESSIONID) is generated by the server, this id should then be passed in the request for any future calls to the Markup service for the user.
- The markupString response obejct field returns HTML or XHTML for the form as a XML safe string and needs to be reverted back to its original form before use. Most XML object handlers do this automatically.
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Set-Cookie: JSESSIONID=8B38B5A866EB5413A816A70AC7D4AA01; Path=/ Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 13:23:29 GMT <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>false</ns1:useCachedMarkup> <ns1:mimeType>text/html</ns1:mimeType> <ns1:markupString><script type='text/javascript' src='/quotation/jscript/tiny_mce/tiny_mce.js'></script><script type='text/javascript' src='/quotation/jscript/openquote.js'></script><script type='text/javascript'>Countries=new Array();Countries[1]=new Array('?');Countries[2]=new Array('UK');Countries[3]=new Array('European Union');Countries[4]=new Array('Norway');Countries[5]=new Array('Switzerland');Countries[6]=new Array('Australia ');Countries[7]=new Array('New Zealand');Countries[8]=new Array('USA');Countries[9]=new Array('Canada');Countries[10]=new Array('South Africa');Countries[11]=new Array('Hong Kong');Countries[12]=new Array('Singapore');Countries[13]=new Array('Japan');Countries[14]=new Array('Abkhazia');Countries[15]=new Array('Afghanistan');Countries[16]=new Array('Angola');Countries[17]=new Array('Armenia');Countries[18]=new Array('Azerbaijan');Countries[19]=new Array('Burundi');Countries[20]=new Array('Eritrea');Countries[21]=new Array('Ethiopia');Countries[22]=new Array('Haiti');Countries[23]=new Array('Indonesia');Countries[24]=new Array('Iran');Countries[25]=new Array('Iraq');Countries[26]=new Array('Nigeria');Countries[27]=new Array('Pakistan');Countries[28]=new Array('The Palestinian Authority');Countries[29]=new Array('Rwanda');Countries[30]=new Array('Sierra Leone');Countries[31]=new Array('Somalia Sri Lanka');Countries[32]=new Array('Sudan');Countries[33]=new Array('Syria');Countries[34]=new Array('Uganda');Countries[35]=new Array('Yemen');Countries[36]=new Array('Zimbabwe');Countries[37]=new Array('Other');</script><form name='Welcome' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite' method='post'> <table width='100%' border='0' cols='1'> <tr class='portlet-section-header'><td>Shipping Quotation</td></tr><tr><td><table><tr><td class='portlet-font' width='100%'></td></tr></table></td></tr><tr><td> <table width='100%' border='0' cols='4' cellpadding='4'> <tr class='portlet-section-subheader'><td colspan='4'>About the shipping:</td></tr><tr><td>What is the total value of the goods being shipped?</td><td colspan='3' align='left'><table><tr><td><input name="/asset/attribute[id=#valueOfGoods#]" class='portlet-form-input-field' style='text-align:right' size='7' type='text' value='0'/>GBP</td><td class='portlet-msg-error'> </td></tr></table></td></tr><tr><td>Where are the goods being shipped to?</td><td colspan='3' align='left'><table><tr><td><select name="/asset/attribute[id=#destination#]" class='pn-normal'/></td><td class='portlet-msg-error'> </td></tr></table><script type='text/javascript'>loadChoiceOptions(findElementsByName("/asset/attribute[id=#destination#]")[0],'?',Countries)</script></td></tr><tr><td>By what means are the good to be transported?</td><td colspan='3' align='left'><table><tr><td><select name="/asset/attribute[id=#modeOfTransport#]" class='pn-normal' ><option selected='yes'>?</option><option>Road</option><option>Air</option><option>Sea</option></select></td><td class='portlet-msg-error'> </td></tr></table></td></tr></table></td></tr><tr><td><table width='100%' border='0' align='center'><tr><td width='15%'> </td><td width='70%' align='center'><input type='submit' name='op=Quote:immediate=false' value='Quote' class='portlet-form-input-field'/></td><td width='15%' align='right'> </td></tr></table></td></tr><tr><td></td></tr> </table></form></ns1:markupString> <ns1:locale>en</ns1:locale> <ns1:requiresUrlRewriting>true</ns1:requiresUrlRewriting> <ns1:preferredTitle>Insure Plus Quotation Portlet</ns1:preferredTitle> </ns1:markupContext> </ns1:getMarkupResponse> </env:Body> </env:Envelope>
[edit] STEP 4 Response – Markup (from request next form when errors in submitted form/answers found)
Response Object Returned Fields
- markupString: HTML or XHTML for the form (XML safe string).
Notes
- The markupString response obejct field returns HTML or XHTML for the form as a XML safe string and needs to be reverted back to its original form before use. Most XML object handlers do this automatically.
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Thu, 16 Oct 2008 08:07:30 GMT <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>false</ns1:useCachedMarkup> <ns1:mimeType>text/html</ns1:mimeType> <ns1:markupString><script type='text/javascript' src='/quotation/jscript/tiny_mce/tiny_mce.js'></script><script type='text/javascript' src='/quotation/jscript/openquote.js'></script><script type='text/javascript'>Countries=new Array();Countries[1]=new Array('?');Countries[2]=new Array('UK');Countries[3]=new Array('European Union');Countries[4]=new Array('Norway');Countries[5]=new Array('Switzerland');Countries[6]=new Array('Australia ');Countries[7]=new Array('New Zealand');Countries[8]=new Array('USA');Countries[9]=new Array('Canada');Countries[10]=new Array('South Africa');Countries[11]=new Array('Hong Kong');Countries[12]=new Array('Singapore');Countries[13]=new Array('Japan');Countries[14]=new Array('Abkhazia');Countries[15]=new Array('Afghanistan');Countries[16]=new Array('Angola');Countries[17]=new Array('Armenia');Countries[18]=new Array('Azerbaijan');Countries[19]=new Array('Burundi');Countries[20]=new Array('Eritrea');Countries[21]=new Array('Ethiopia');Countries[22]=new Array('Haiti');Countries[23]=new Array('Indonesia');Countries[24]=new Array('Iran');Countries[25]=new Array('Iraq');Countries[26]=new Array('Nigeria');Countries[27]=new Array('Pakistan');Countries[28]=new Array('The Palestinian Authority');Countries[29]=new Array('Rwanda');Countries[30]=new Array('Sierra Leone');Countries[31]=new Array('Somalia Sri Lanka');Countries[32]=new Array('Sudan');Countries[33]=new Array('Syria');Countries[34]=new Array('Uganda');Countries[35]=new Array('Yemen');Countries[36]=new Array('Zimbabwe');Countries[37]=new Array('Other');</script><form name='Welcome' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite' method='post'> <table width='100%' border='0' cols='1'> <tr class='portlet-section-header'><td>Shipping Quotation</td></tr><tr><td><table><tr><td class='portlet-font' width='100%'></td></tr></table></td></tr><tr><td> <table width='100%' border='0' cols='4' cellpadding='4'> <tr class='portlet-section-subheader'><td colspan='4'>About the shipping:</td></tr><tr><td>What is the total value of the goods being shipped?</td><td colspan='3' align='left'><table><tr><td><input name="/asset/attribute[id=#valueOfGoods#]" class='portlet-form-input-field' style='text-align:right' size='7' type='text' value='0'/>GBP</td><td class='portlet-msg-error'> </td></tr></table></td></tr><tr><td>Where are the goods being shipped to?</td><td colspan='3' align='left'><table><tr><td><select name="/asset/attribute[id=#destination#]" class='pn-normal'/></td><td class='portlet-msg-error'>required</td></tr></table><script type='text/javascript'>loadChoiceOptions(findElementsByName("/asset/attribute[id=#destination#]")[0],'?',Countries)</script></td></tr><tr><td>By what means are the good to be transported?</td><td colspan='3' align='left'><table><tr><td><select name="/asset/attribute[id=#modeOfTransport#]" class='pn-normal' ><option selected='yes'>?</option><option>Road</option><option>Air</option><option>Sea</option></select></td><td class='portlet-msg-error'>required</td></tr></table></td></tr></table></td></tr><tr><td><table width='100%' border='0' align='center'><tr><td width='15%'> </td><td width='70%' align='center'><input type='submit' name='op=Quote:immediate=false' value='Quote' class='portlet-form-input-field'/></td><td width='15%' align='right'> </td></tr></table></td></tr><tr><td></td></tr> </table></form></ns1:markupString> <ns1:locale>en</ns1:locale> <ns1:requiresUrlRewriting>true</ns1:requiresUrlRewriting> <ns1:preferredTitle>Insured Plus Quotation Portlet</ns1:preferredTitle> </ns1:markupContext> </ns1:getMarkupResponse> </env:Body> </env:Envelope>
[edit] STEP 4 Response – Markup (from request next form - quote page)
Response Object Returned Fields
- markupString: HTML or XHTML for the form (XML safe string).
Notes
- The markupString response obejct field returns HTML or XHTML for the form as a XML safe string and needs to be reverted back to its original form before use. Most XML object handlers do this automatically.
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 14:09:39 GMT <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>false</ns1:useCachedMarkup> <ns1:mimeType>text/html</ns1:mimeType> <ns1:markupString><script type='text/javascript' src='/quotation/jscript/tiny_mce/tiny_mce.js'></script><script type='text/javascript' src='/quotation/jscript/openquote.js'></script> <table width='100%' border='0' cols='1'><tr><td><form name='#2f5f' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite' method='post'><table width='100%' cellpadding='15'> <tr> <td><table width='100%'> <tr valign='middle' class='portlet-table-subheader'><td>Your Quotation: 675.00 GBP</td></tr> <tr> <td height='15'></td> </tr> <tr> <td class='portlet-font'> <ul> <li>Your quote number: <b>QF0013</b></li> <li>This quote is valid for 30 days, until 14 November, 2008.</li> </ul> </td> </tr><tr><td class='portlet-font'><table width='100%' border='0' align='center'><tr><td width='15%'> </td><td width='70%' align='center'><input type='submit' name='op=Save' value='Save' class='portlet-form-input-field'/><input type='submit' name='op=Requote' value='Requote' class='portlet-form-input-field'/><input type='submit' name='op=Confirm and Pay:immediate=false' value='Confirm and Pay' class='portlet-form-input-field'/><input type='submit' name='op=View:id=QF0013' value='View' class='portlet-form-input-field'/></td><td width='15%' align='right'><input type='submit' name='op=Quit:immediate=true' value='Quit' class='portlet-form-input-field'/></td></tr></table></td></tr><tr><td><table><tr><td align='center'><div class='portlet-font' id='Proposer Login'>If you have an existing account, please login here. If not, please <a onClick='hideDivDisplay("Proposer Login");showDivDisplay("Create Login");'>create one</a>.<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite' name='loginform' id='loginForm'><table><tr class='portlet-font'><td>Email address:</td><td><input class='portlet-form-input-field' type='text' name='username' id='username' value=/></td><td class='portlet-msg-error'> </td></tr><tr class='portlet-font'><td valign='center'>Password:</td><td><input class='portlet-form-input-field' type='password' name='password' id='password' value=/></td><td><a onClick='hideDivDisplay("Proposer Login");showDivDisplay("Forgotten Password");'>Forgotten password?</a></td></tr><tr class='portlet-font'></ns1:markupString> <ns1:locale>en</ns1:locale> <ns1:requiresUrlRewriting>true</ns1:requiresUrlRewriting> <ns1:preferredTitle>Insured Plus Quotation Portlet</ns1:preferredTitle> </ns1:markupContext> </ns1:getMarkupResponse> </env:Body> </env:Envelope>
[edit] STEP 4 Response – Markup (from request next form - referral page)
Response Object Returned Fields
- markupString: HTML or XHTML for the form (XML safe string).
Notes
- The markupString response obejct field returns HTML or XHTML for the form as a XML safe string and needs to be reverted back to its original form before use. Most XML object handlers do this automatically.
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 13:29:54 GMT <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>false</ns1:useCachedMarkup> <ns1:mimeType>text/html</ns1:mimeType> <ns1:markupString><script type='text/javascript' src='/quotation/jscript/tiny_mce/tiny_mce.js'></script><script type='text/javascript' src='/quotation/jscript/openquote.js'></script><form name='Referral' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite' method='post'> <table width='100%' border='0' cols='1'> <tr class='portlet-section-header'><td>Referral</td></tr><tr><td><table columns='2' width='100%' cellpadding='15'> <tr> <td><table> <tr> <td class='portlet-font'><table><tr><td class='portlet-font' width='100%'>Unfortunately, our online system is unable to offer you an automated quotation.<br/><br/>If you would like to discuss your quotation and your specific requirements with one of our underwriters, please contact us on 05432 367456 and quote the reference number <b>QF0010</b> and we will be happy to help.<br/><br/></td></tr></table> </td> </tr> <tr> <td class='portlet-font'><table width='100%' border='0' align='center'><tr><td width='15%'> </td><td width='70%' align='center'><input type='submit' name='op=Requote' value='Requote' class='portlet-form-input-field'/></td><td width='15%' align='right'><input type='submit' name='op=Quit:immediate=true' value='Quit' class='portlet-form-input-field'/></td></tr></table> </td> </tr></table> </td> <td rowspan='2' valign='top' align='center'><table class='portlet-font'><tr><td> <table width='100%' border='0' cols='2'> <tr class='portlet-section-subheader'><td colspan='2'><u>Summary of your cover</u></td></tr><tr><td>Start date</td><td>15 October, 2008</td></tr><tr><td>End date</td><td>14 October, 2009</td></tr></table></td></tr><tr><td height='15' colspan='2'></td></tr><tr><td> <table width='100%' border='0' cols='2'> <tr class='portlet-section-subheader'><td colspan='2'><u>Asset(s)</u></td></tr><tr><tr><td>Value of goods</td><td>10,000.00 GBP</td></tr></tr><tr><tr><td>Destination</td><td>USA</td></tr></tr><tr><tr><td>Mode of transport</td><td>Sea</td></tr></tr><tr><td height='4' colspan='2'></td></tr></table></td></tr><tr><td height='15' colspan='2'></td></tr><tr><td height='15' colspan='2'></td></tr></table> </td> </tr> <tr> <td align='center' width='50%'> </td> </tr></table></td></tr> </table></form></ns1:markupString> <ns1:locale>en</ns1:locale> <ns1:requiresUrlRewriting>true</ns1:requiresUrlRewriting> <ns1:preferredTitle>Insured Plus Quotation Portlet</ns1:preferredTitle> </ns1:markupContext> </ns1:getMarkupResponse> </env:Body> </env:Envelope>
[edit] STEP 3 Request - Markup (submit question form answers)
http://localhost:8080/portal-wsrp/MarkupService
Request Object Required Parameters
- JSESSIONID: This is the individual user session ID.
Request Object Required Fields
- registrationHandle: Your WSRP consumer's registration handle given to you by the registration service in step 1.
- portletHandle: This is a handle that represents the OpenQuote product you are using. This value is defined by the Server. If you don't know the handle you require it can be provided by the WSRP ServiceDescription service (not described in these instructions).
- portletInstanceKey: This key is used to create an instance of the OpenQuote product to be used by your WSRP consumer. You do not require a separate instance for each user. You can use any value you want here.
- namespacePrefix: Name space prefix – a single portlet can be shown many times simultaneously on a single screen, although typically it will only be shown once. Use a unique value for each view being shown.
- mimeTypes: Mime Type response required – text/html or text/xml resonse content required.
- formParameters: A collection of submitted key value pairs representing the questions and answers from the question page in step 2.
Notes
- On the first call to the Markup Service (this call) for a user, the session ID (JSESSIONID) is not required, however a unique session id will be returned to you in the response object of that first call, this id should then be passed in the request for any future calls to the Markup service for the user.
[edit] Request
POST /portal-wsrp/MarkupService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:performBlockingInteraction" Cookie: JSESSIONID=8B38B5A866EB5413A816A70AC7D4AA01 Content-Type: text/xml; charset=UTF-8 JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 4193 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteraction xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:registrationContext> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:registrationContext> <ns1:portletContext> <ns1:portletHandle>quotation.WSRPQuotationPortlet</ns1:portletHandle> </ns1:portletContext> <ns1:runtimeContext> <ns1:userAuthentication>wsrp:none</ns1:userAuthentication> <ns1:portletInstanceKey>insureplusinstance</ns1:portletInstanceKey> <ns1:namespacePrefix>insureplus_namespace/ns1:namespacePrefix> </ns1:runtimeContext> <ns1:userContext xsi:nil="1"/> <ns1:markupParams> <ns1:secureClientCommunication>false</ns1:secureClientCommunication> <ns1:locales>en-GB</ns1:locales> <ns1:mimeTypes>text/html</ns1:mimeTypes> <ns1:mode>wsrp:view</ns1:mode> <ns1:windowState>wsrp:normal</ns1:windowState> <ns1:clientData> <ns1:userAgent>Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3</ns1:userAgent> </ns1:clientData> </ns1:markupParams> <ns1:interactionParams> <ns1:portletStateChange>cloneBeforeWrite</ns1:portletStateChange> <ns1:formParameters name="/asset/attribute[id=#question1#]"> <ns1:value>Sea</ns1:value> </ns1:formParameters> <ns1:formParameters name="op=Quote:immediate=false"> <ns1:value>Quote</ns1:value> </ns1:formParameters> <ns1:formParameters name="/asset/attribute[id=#question2#]"> <ns1:value>USA</ns1:value> </ns1:formParameters> <ns1:formParameters name="/asset/attribute[id=#question3#]"> <ns1:value>10000</ns1:value> </ns1:formParameters> </ns1:interactionParams> </ns1:performBlockingInteraction> </env:Body> </env:Envelope>
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 13:24:45 GMT <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteractionResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:updateResponse> <ns1:navigationalState>JBPNS_</ns1:navigationalState> <ns1:newWindowState>wsrp:normal</ns1:newWindowState> <ns1:newMode>wsrp:view</ns1:newMode> </ns1:updateResponse> </ns1:performBlockingInteractionResponse> </env:Body> </env:Envelope>
[edit] STEP 5 Request - Markup (submit from quote screen - requote option)
http://localhost:8080/portal-wsrp/MarkupService
Request Object Required Parameters
- JSESSIONID: This is the individual user session ID.
Request Object Required Fields
- registrationHandle: Your WSRP consumer's registration handle given to you by the registration service in step 1.
- portletHandle: This is a handle that represents the OpenQuote product you are using. This value is defined by the Server. If you don't know the handle you require it can be provided by the WSRP ServiceDescription service (not described in these instructions).
- portletInstanceKey: This key is used to create an instance of the OpenQuote product to be used by your WSRP consumer. You do not require a separate instance for each user. You can use any value you want here.
- namespacePrefix: Name space prefix – a single portlet can be shown many times simultaneously on a single screen, although typically it will only be shown once. Use a unique value for each view being shown.
- mimeTypes: Mime Type response required – text/html or text/xml resonse content required.
- formParameters: A collection of submitted key value pairs representing the questions and answers from the question page in step 2.
Notes
- On the first call to the Markup Service (this call) for a user, the session ID (JSESSIONID) is not required, however a unique session id will be returned to you in the response object of that first call, this id should then be passed in the request for any future calls to the Markup service for the user.
[edit] Request
POST /portal-wsrp/MarkupService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:performBlockingInteraction" Cookie: JSESSIONID=8B38B5A866EB5413A816A70AC7D4AA01 Content-Type: text/xml; charset=UTF-8 JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 3904 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteraction xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:registrationContext> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:registrationContext> <ns1:portletContext> <ns1:portletHandle>quotation.WSRPQuotationPortlet</ns1:portletHandle> </ns1:portletContext> <ns1:runtimeContext> <ns1:userAuthentication>wsrp:none</ns1:userAuthentication> <ns1:portletInstanceKey>insureplusinstance</ns1:portletInstanceKey> <ns1:namespacePrefix>insureplus_namespace/ns1:namespacePrefix> </ns1:runtimeContext> <ns1:userContext xsi:nil="1"/> <ns1:markupParams> <ns1:secureClientCommunication>false</ns1:secureClientCommunication> <ns1:locales>en-GB</ns1:locales> <ns1:mimeTypes>text/html</ns1:mimeTypes> <ns1:mode>wsrp:view</ns1:mode> <ns1:windowState>wsrp:normal</ns1:windowState> <ns1:clientData> <ns1:userAgent>Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3</ns1:userAgent> </ns1:clientData> </ns1:markupParams> <ns1:interactionParams> <ns1:portletStateChange>cloneBeforeWrite</ns1:portletStateChange> <ns1:formParameters name="op=Requote"> <ns1:value>Requote</ns1:value> </ns1:formParameters> </ns1:interactionParams> </ns1:performBlockingInteraction> </env:Body> </env:Envelope>
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 14:18:47 GMT <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteractionResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:updateResponse> <ns1:navigationalState>JBPNS_</ns1:navigationalState> <ns1:newWindowState>wsrp:normal</ns1:newWindowState> <ns1:newMode>wsrp:view</ns1:newMode> </ns1:updateResponse> </ns1:performBlockingInteractionResponse> </env:Body> </env:Envelope>
[edit] STEP 5 Request - Markup (submit from quote or referral screen - quit option)
http://localhost:8080/portal-wsrp/MarkupService
Request Object Required Parameters
- JSESSIONID: This is the individual user session ID.
Request Object Required Fields
- registrationHandle: Your WSRP consumer's registration handle given to you by the registration service in step 1.
- portletHandle: This is a handle that represents the OpenQuote product you are using. This value is defined by the Server. If you don't know the handle you require it can be provided by the WSRP ServiceDescription service (not described in these instructions).
- portletInstanceKey: This key is used to create an instance of the OpenQuote product to be used by your WSRP consumer. You do not require a separate instance for each user. You can use any value you want here.
- namespacePrefix: Name space prefix – a single portlet can be shown many times simultaneously on a single screen, although typically it will only be shown once. Use a unique value for each view being shown.
- mimeTypes: Mime Type response required – text/html or text/xml resonse content required.
- formParameters: A collection of submitted key value pairs representing the questions and answers from the question page in step 2.
Notes
- On the first call to the Markup Service (this call) for a user, the session ID (JSESSIONID) is not required, however a unique session id will be returned to you in the response object of that first call, this id should then be passed in the request for any future calls to the Markup service for the user.
[edit] Request
POST /portal-wsrp/MarkupService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:performBlockingInteraction" Cookie: JSESSIONID=8B38B5A866EB5413A816A70AC7D4AA01 Content-Type: text/xml; charset=UTF-8 JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 3904 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteraction xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:registrationContext> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:registrationContext> <ns1:portletContext> <ns1:portletHandle>quotation.WSRPQuotationPortlet</ns1:portletHandle> </ns1:portletContext> <ns1:runtimeContext> <ns1:userAuthentication>wsrp:none</ns1:userAuthentication> <ns1:portletInstanceKey>insureplusinstance</ns1:portletInstanceKey> <ns1:namespacePrefix>insureplus_namespace/ns1:namespacePrefix> </ns1:runtimeContext> <ns1:userContext xsi:nil="1"/> <ns1:markupParams> <ns1:secureClientCommunication>false</ns1:secureClientCommunication> <ns1:locales>en-GB</ns1:locales> <ns1:mimeTypes>text/html</ns1:mimeTypes> <ns1:mode>wsrp:view</ns1:mode> <ns1:windowState>wsrp:normal</ns1:windowState> <ns1:clientData> <ns1:userAgent>Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3</ns1:userAgent> </ns1:clientData> </ns1:markupParams> <ns1:interactionParams> <ns1:portletStateChange>cloneBeforeWrite</ns1:portletStateChange> <ns1:formParameters name="password"> <ns1:value/> </ns1:formParameters> <ns1:formParameters name="op=Quit:immediate=true"> <ns1:value>Quit</ns1:value> </ns1:formParameters> <ns1:formParameters name="username"> <ns1:value/> </ns1:formParameters> </ns1:interactionParams> </ns1:performBlockingInteraction> </env:Body> </env:Envelope>
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 14:18:47 GMT <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns1:performBlockingInteractionResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:updateResponse> <ns1:navigationalState>JBPNS_</ns1:navigationalState> <ns1:newWindowState>wsrp:normal</ns1:newWindowState> <ns1:newMode>wsrp:view</ns1:newMode> </ns1:updateResponse> </ns1:performBlockingInteractionResponse> </env:Body> </env:Envelope>
[edit] STEP 6 - RegistrationService (de-register with WSRP portal server)
http://localhost:8080/portal-wsrp/MarkupService
Request Object Required Fields
- registrationHandle: Your WSRP consumer's registration handle given to you by the registration service in step 1.
[edit] Request
OST /portal-wsrp/RegistrationService HTTP/1.1 SOAPAction: "urn:oasis:names:tc:wsrp:v1:deregister" Content-Type: text/xml; charset=UTF-8 JBoss-Remoting-Version: 22 User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto) Cache-Control: no-cache Pragma: no-cache Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 415 <env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"> <env:Header/> <env:Body> <ns1:deregister xmlns:ns1=\"urn:oasis:names:tc:wsrp:v1:types\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <ns1:registrationHandle>2</ns1:registrationHandle> </ns1:deregister> </env:Body> </env:Envelope>
[edit] Response
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 15 Oct 2008 12:50:22 GMT <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header></env:Header> <env:Body> <ns1:deregisterResponse xmlns:ns1='urn:oasis:names:tc:wsrp:v1:types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'/> </env:Body> </env:Envelope>

