View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Update of /cvsroot/dqsd/dqsd/addons/dictionarypop
In directory usw-pr-cvs1:/tmp/cvs-serv30653

Modified Files:
        dictionarypop.xml 
Log Message:
Improved Error response when DP can't connect to the server, possibly firewall 
preventing it.


Index: dictionarypop.xml
===================================================================
RCS file: /cvsroot/dqsd/dqsd/addons/dictionarypop/dictionarypop.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dictionarypop.xml   27 Aug 2002 20:19:48 -0000      1.3
--- dictionarypop.xml   28 Sep 2002 00:19:23 -0000      1.4
***************
*** 1,139 ****
! <search function="dictionarypop">
!   <name>Bubbles Dictionary Popup</name>
!   <description>Invoke a Dictionary/Thesaurus/Stock Information webservice for handy 
popup information<br/>
!       <div class="helpboxDescLabels">Usage:</div>
!         <table class="helpboxDescTable">
!            <tr><td>dictionarypop &lt;<i>query</i>&gt;[{/synonym | /news | /profile | 
/quote}]</td></tr>
!        </table>
!       <div class="helpboxDescLabels">Switches:</div>
!         <table class="helpboxDescTable">
!            <tr><td>(default)</td><td> - </td><td>Popup Definitions of a 
Word.</td></tr>
!            <tr><td>/synonym</td><td> - </td><td>Popup Synonyms of a Word.</td></tr>
!            <tr><td>/news</td><td> - </td><td>Popup News for a stock.</td></tr>
!            <tr><td>/profile</td><td> - </td><td>Popup Profile for a stock.</td></tr>
!            <tr><td>/quote</td><td> - </td><td>Popup quote information for a 
stock.</td></tr>
!          </table>
!       <div class="helpboxDescLabels">Examples:</div>
!       <table class="helpboxDescTable">
!           <tr><td>dictionarypop goat</td></tr>
!           <tr><td>dictionarypop /syn set</td></tr>
!           <tr><td>dictionarypop /quot YHOO</td></tr>
!         </table>
!   </description>
!   <link>http://www.mybubble.com</link>
! 
!   <category>Reference</category>
!   <contributor>Thad Kerosky</contributor>5:38 AM 8/25/2002
!   <dqsd_version>
!       <majorhi>3</majorhi>
!       <majorlo>0</majorlo>
!       <minorhi>0</minorhi>
!       <minorlo>25</minorlo>
!   </dqsd_version>
!   <form name="dictionarypopf">
!     <div id="dictionaryWebService" name="dictionaryWebService" 
style="behavior:url(addons\\dictionarypop\\webservice.htc)" 
onresult="dictionarypop_onWebServiceResult()" />
!   </form>
!   <script><![CDATA[
! 
! //See: http://www.xmethods.com/ve2/ViewListing.po?serviceid=7328
! //and demo: 
http://soapclient.com/soapclient?fn=soapform&template=/clientform.html&soaptemplate=/soapresult.html&soapwsdl=http://www.mybubble.com:8080/mybubbleEntServer/MBSoapServices.wsdl
! 
!     function dictionarypop(q)
!     {
!       var s = "Meaning";
!     
!       if( nullArgs("dictionarypop", q) )
!         return false;
!       else
!       {
!         var args = parseArgs(q, "synonym, news, profile, quote");
!         
!         if( args.switches.length > 0 )
!         {
!           for( var j=0; j<args.switches.length; j++ )
!           {
!             switch( args.switches[j].name )
!             {
!               case "synonym":
!                 s = "Synonym";
!                 break;
!               case 'news':
!                 s = "StockNews";
!                 break;
!               case "profile":
!                 s = "StockProfile";
!                 break;
!               case "quote":
!                 s = "StockQuote";
!                 break;
!             }
!           }
!         }
!       }
!        
!       dictionarypop_callWebService(args.q, s);
!     }
!     function dictionarypop_initWebService()
!     {
!       try 
!       {
!         
document.all.dictionaryWebService.useService("http://www.mybubble.com:8080/mybubbleEntServer/MBSoapServices.wsdl";,
 "MyBubbleSoapService");
! 
!         return true;
!       } 
!       catch (ex) 
!       {
!         displayPopupMessage("Web service failed to initialize. " + ex.description);
!         return false;
!       }
!     }
! 
!     function dictionarypop_callWebService(sSearch, sServiceName)
!     {
!       if (dictionarypop_initWebService()) {
! 
!         var objCall = new Object();
!         objCall.funcName = "getServiceResponsePublic";
!         objCall.async = true;
! 
!         //sServiceName can be either Meaning, Synonym,  StockNews, StockProfile, or 
StockQuote
!         try 
!         {
!           iCallID = 
document.all.dictionaryWebService.MyBubbleSoapService.callService(objCall, 
sServiceName , sSearch);
!          
!         } 
!         catch (ex) 
!         {
!           displayPopupMessage("Failed: " + ex.description);
!         }
!       }
! 
!       return false;
!     }
! 
!     function dictionarypop_onWebServiceResult()
!     {
!       if(event.result.error) 
!       {
!         displayPopupMessage("Error executing web service. " + 
event.result.errorDetail.code + ", " + event.result.errorDetail.string + " " + 
event.result.errorDetail.raw);
!       } 
!       else 
!       {
!         var oDoc = event.result.raw;
!         var sReturnedHTML = 
oDoc.selectSingleNode("SOAP-ENV:Body/ns1:getServiceResponsePublicResponse/return").text;
!         if ( sReturnedHTML != '' )
!         {
!           sReturnedHTML = sReturnedHTML.replace( /\n/g, '' )                         
                   // get rid of newlines
!                                        .replace( /(.*<table>.+<\/table>).*/i, '$1' ) 
                   // get of everything after the last TABLE tag
!                                        .replace( /<script.*<\/script>/i, '' )        
                   // get rid of SCRIPT tags
!                                        .replace( /(<\/table>.*)<table.*Legal 
Disclaimer.*/i, '$1' )     // save only stuff before the disclaimer
!                                        .replace( /<tr class="[EO]RL1"><td 
><\/td><\/tr>/gi, '' )        // get rid of extra rows at the end of the table
!                                        .replace( /<body.*<div id="main">(.*)/i, '$1' 
)                  // get rid of the BODY tag and its event handlers
!                                        .replace( /(<td>Word:)([^>]+) > (<\/td>)/i, 
'$1  <b>$2</b>$3' )  // get rid of weird angle bracket and make word bold
!                                        .replace( /cellPadding="3"/i, 
'cellPadding="0"' )                // get rid of some of the whitespace
!           displayPopupMessage( sReturnedHTML, "<base 
href=http://www.mybubble.com><link rel=\"stylesheet\" 
href=\"/mybubbleEntServer/css/layout.css\" />" );
!         }
!       }
!     }
!   ]]></script>
! </search>
--- 1,140 ----
! <search function="dictionarypop">
!   <name>Bubbles Dictionary Popup</name>
!   <description>Invoke a Dictionary/Thesaurus/Stock Information webservice for handy 
popup information<br/>
!       <div class="helpboxDescLabels">Usage:</div>
!         <table class="helpboxDescTable">
!            <tr><td>dictionarypop &lt;<i>query</i>&gt;[{/synonym | /news | /profile | 
/quote}]</td></tr>
!        </table>
!       <div class="helpboxDescLabels">Switches:</div>
!         <table class="helpboxDescTable">
!            <tr><td>(default)</td><td> - </td><td>Popup Definitions of a 
Word.</td></tr>
!            <tr><td>/synonym</td><td> - </td><td>Popup Synonyms of a Word.</td></tr>
!            <tr><td>/news</td><td> - </td><td>Popup News for a stock.</td></tr>
!            <tr><td>/profile</td><td> - </td><td>Popup Profile for a stock.</td></tr>
!            <tr><td>/quote</td><td> - </td><td>Popup quote information for a 
stock.</td></tr>
!          </table>
!       <div class="helpboxDescLabels">Examples:</div>
!       <table class="helpboxDescTable">
!           <tr><td>dictionarypop goat</td></tr>
!           <tr><td>dictionarypop /syn set</td></tr>
!           <tr><td>dictionarypop /quot YHOO</td></tr>
!         </table>
!   </description>
!   <link>http://www.mybubble.com</link>
! 
!   <category>Reference</category>
!   <contributor>Thad Kerosky</contributor>5:38 AM 8/25/2002
!   <dqsd_version>
!       <majorhi>3</majorhi>
!       <majorlo>0</majorlo>
!       <minorhi>0</minorhi>
!       <minorlo>25</minorlo>
!   </dqsd_version>
!   <form name="dictionarypopf">
!     <div id="dictionaryWebService" name="dictionaryWebService" 
style="behavior:url(addons\\dictionarypop\\webservice.htc)" 
onresult="dictionarypop_onWebServiceResult()" />
!   </form>
!   <script><![CDATA[
! 
! //See: http://www.xmethods.com/ve2/ViewListing.po?serviceid=7328
! //and demo: 
http://soapclient.com/soapclient?fn=soapform&template=/clientform.html&soaptemplate=/soapresult.html&soapwsdl=http://www.mybubble.com:8080/mybubbleEntServer/MBSoapServices.wsdl
! 
!     function dictionarypop(q)
!     {
!       var s = "Meaning";
!     
!       if( nullArgs("dictionarypop", q) )
!         return false;
!       else
!       {
!         var args = parseArgs(q, "synonym, news, profile, quote");
!         
!         if( args.switches.length > 0 )
!         {
!           for( var j=0; j<args.switches.length; j++ )
!           {
!             switch( args.switches[j].name )
!             {
!               case "synonym":
!                 s = "Synonym";
!                 break;
!               case 'news':
!                 s = "StockNews";
!                 break;
!               case "profile":
!                 s = "StockProfile";
!                 break;
!               case "quote":
!                 s = "StockQuote";
!                 break;
!             }
!           }
!         }
!       }
!        
!       dictionarypop_callWebService(args.q, s);
!     }
!     function dictionarypop_initWebService()
!     {
!       try 
!       {
!         
document.all.dictionaryWebService.useService("http://www.mybubble.com:8080/mybubbleEntServer/MBSoapServices.wsdl";,
 "MyBubbleSoapService");
! 
!         return true;
!       } 
!       catch (ex) 
!       {
!         displayPopupMessage("Web service failed to initialize. " + ex.description);
!         return false;
!       }
!     }
! 
!     function dictionarypop_callWebService(sSearch, sServiceName)
!     {
!       if (dictionarypop_initWebService()) {
! 
!         var objCall = new Object();
!         objCall.funcName = "getServiceResponsePublic";
!         objCall.async = true;
! 
!         //sServiceName can be either Meaning, Synonym,  StockNews, StockProfile, or 
StockQuote
!         try 
!         {
!           iCallID = 
document.all.dictionaryWebService.MyBubbleSoapService.callService(objCall, 
sServiceName , sSearch);
!          
!         } 
!         catch (ex) 
!         {
!           displayPopupMessage("Failed: " + ex.description);
!         }
!       }
! 
!       return false;
!     }
! 
!     function dictionarypop_onWebServiceResult()
!     {
!       if(event.result.error) 
!       {
!        displayPopupMessage("Error contacting web service. Check that your firewall 
is allowing Windows Explorer to access this web service. (www.mybubble.com:8080) (" +
!         event.result.errorDetail.code + ", " + event.result.errorDetail.string + " " 
+ event.result.errorDetail.raw + ")");
!       } 
!       else 
!       {
!         var oDoc = event.result.raw;
!         var sReturnedHTML = 
oDoc.selectSingleNode("SOAP-ENV:Body/ns1:getServiceResponsePublicResponse/return").text;
!         if ( sReturnedHTML != '' )
!         {
!           sReturnedHTML = sReturnedHTML.replace( /\n/g, '' )                         
                   // get rid of newlines
!                                        .replace( /(.*<table>.+<\/table>).*/i, '$1' ) 
                   // get of everything after the last TABLE tag
!                                        .replace( /<script.*<\/script>/i, '' )        
                   // get rid of SCRIPT tags
!                                        .replace( /(<\/table>.*)<table.*Legal 
Disclaimer.*/i, '$1' )     // save only stuff before the disclaimer
!                                        .replace( /<tr class="[EO]RL1"><td 
><\/td><\/tr>/gi, '' )        // get rid of extra rows at the end of the table
!                                        .replace( /<body.*<div id="main">(.*)/i, '$1' 
)                  // get rid of the BODY tag and its event handlers
!                                        .replace( /(<td>Word:)([^>]+) > (<\/td>)/i, 
'$1  <b>$2</b>$3' )  // get rid of weird angle bracket and make word bold
!                                        .replace( /cellPadding="3"/i, 
'cellPadding="0"' )                // get rid of some of the whitespace
!           displayPopupMessage( sReturnedHTML, "<base 
href=http://www.mybubble.com><link rel=\"stylesheet\" 
href=\"/mybubbleEntServer/css/layout.css\" />" );
!         }
!       }
!     }
!   ]]></script>
! </search>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Reply via email to