Fiach's profileNetwork Programming in ....BlogLists Tools Help
    November 22

    Restarting stuff with Putty

    Restart machine:

    /sbin/reboot

    Restart Apache

    /etc/init.d/apache2/restart

    Check IP addresses:

    ifconfig

    This was all trying to add two new IP addresses to Apache, on a Ubuntu box over Putty. I found that I needed to edit /etc/apache2/ports.conf and add
    Listen <IP>:80 for the new IP addresses.

    About 2 days downtime trying to figure it out, but got it eventually.



    October 22

    Microsoft Webspark T&C's

    Microsoft WebsiteSpark Network Partner Agreement These terms are an agreement between the entity (“Network Partner” or “you”) who wishes to enroll in the Microsoft WebsiteSpark Program (“WebsiteSpark” or “Program”) as a Network Partner, and Microsoft (“Microsoft”, “we” or “us”).
     These terms govern your participation in the Program.
     Please read them.
     BY CLICKING THE “I ACCEPT” BUTTON, YOU AGREE TO BE BOUND BY THIS AGREEMENT, AND BY THE PROGRAM GUIDE AND THE PROGRAM WEBSITE (INCLUDING ITS TERMS OF USE AND PRIVACY STATEMENT), AND REPRESENT YOU HAVE READ AND UNDERSTAND THIS AGREEMENT.
     YOU MUST ACCEPT THIS AGREEMENT BEFORE YOU CAN PARTICIPATE IN THE PROGRAM AS A HOSTSPARK NETWORK PARTNER.
     1.
     Scope.
     WebsiteSpark is designed to help accelerate the success and innovation of web professional companies whose primary business is building and designing websites for their clients, by providing them with Microsoft technology resources and connecting them with Network Partners.
     Network Partner’s participation in this Program is voluntary.
     Nothing in this Agreement or the Program restricts either party from working in any way with other companies in businesses similar to the other party’s, or which promote or otherwise support other technologies.
     2.
     Definitions.
     “Agreement” means these Program terms.
     “Microsoft” means Microsoft Corporation, or its affiliates as appropriate (see Section 8.
    4).
     “Network Partner” means a person or organization that has enrolled in WebsiteSpark as a Network Partner and can, for the duration of its participation in the Program, provide Web Pro-oriented business assistance and sponsor Web Pros for membership in the Program.
     “Program Guide” means the guide for the Program, located on the Program Website.
     The Program Guide provides additional guidance about the Program and Program requirements.
     “Program Materials” means the Program Guide and the Program Website (including its Terms of Use and Privacy Statement), together with any other agreements you may choose to enter into with us or our affiliates relating to the Program.
     “Program Website” means the WebsiteSpark section of the website currently located at http://www.
    microsoft.
    com/web or equivalent local site, or a successor site designated by Microsoft.
     The Program Website provides tools and information about the Program, including the Program Guide.
     “Web Pro(s)” means web professional company(ies) whose primary business is building and designing websites for their clients.
     “Web Pro Eligibility Requirements” means the eligibility requirements for Web Pros to participate in the Program, as set forth in the Program Guide.
     “Your Network” means your organization or network that specializes in providing business assistance to Web Pros, and that the Web Pros you sponsor for the Program will associate with or join.
     “Your Site” means the website for Your Network.
     3.
     Areas of Network Partner Cooperation.
     3.
    1.
     Terms and Conditions.
     a.
     You agree to abide by Program terms and conditions as set forth in this Agreement and in the Program Materials.
     b.
     You will use commercially reasonable efforts to: i.
     Promote WebsiteSpark to eligible Web Pros in Your Network, ii.
     Recruit eligible Web Pros to join WebsiteSpark, iii.
     Respond promptly to Web Pro inquiries regarding WebsiteSpark (e.
    g.
     within 3 business days), iv.
     Ensure that the Web Pros you sponsor for WebsiteSpark meet Web Pro Eligibility Requirements, and v.
     For the Web Pros you sponsor for initial enrollment in WebsiteSpark, leverage your relationship with them to encourage them to annually update their membership in WebsiteSpark.
     c.
     You will not charge Web Pros any amount for sponsoring them for WebsiteSpark, or otherwise in connection with WebsiteSpark or any benefits available to them under WebsiteSpark.
     d.
     You will maintain as confidential any information or materials regarding the Program you receive or access regarding the Program, unless and until such information or materials are made public by Microsoft via the Program.
     e.
     We will have no responsibility or liability with regard to any disputes that may arise between you and any Web Pro in connection with that Web Pro’s association with or participation in Your Network.
     f.
     We may change or discontinue the Program or any aspect of it, but will provide at least 60 calendar days notice if we intend to discontinue the Program, on the Program Website and/or by written notice to the email address provided by you in your company profile.
     For these and other changes, you are responsible for checking the Program Website regularly.
     You will be bound by Program Materials changes as of the date the changes are posted, but the changes will not apply retroactively.
     3.
    2.
     Promotion.
     a.
     Links to Microsoft sites.
     Once enrolled in WebsiteSpark as a Network Partner, you can include on Your Site links to the Program Website along with text approved by us, as described in and in accordance with instructions to Network Partners provided by Microsoft.
     b.
     Opportunity to submit content to Microsoft sites.
     As part of the Network Partner enrollment process, you will have the opportunity to submit to the Program Website a description of your organization and a link back to Your Site.
     We may also provide opportunities for you to submit other factual and descriptive materials about your organization to other Microsoft online properties (“Other Online Properties”).
     You are solely responsible for all content you submit to the Program Website or Other Online Properties, and for hosting of and all content on Your Site.
     Your submission of content to and use of the Program Website and Other Online Properties will accord with the Program Materials or the terms of use for those Other Online Properties, which may be amended by us from time to time.
     c.
     Other publicity and promotion.
     Both parties may reference the fact that Network Partner is a participant in Microsoft’s WebsiteSpark program, as long as no stylized logos of the other party are used and any referential use of word marks in plain text form complies with the respective party’s external posted trademark guidelines.
     Microsoft’s trademark usage guidelines are located at http://www.
    microsoft.
    com/about/legal/trademarks/usage/default.
    mspx.
     Any use by a party of any stylized logos of the other party for publicity or promotions will be per the terms of a separate agreement.
     We or our affiliates may also provide you with other opportunities to participate in other promotional activities relating to the Program; for instance, to describe your experience with the Program in case studies, testimonials, or presentations at events or to potential WebsiteSpark Web Pros.
     These activities will be governed solely by separate agreements between you and us or our affiliate.
     4.
     Term and termination.
     4.
    1.
     Term.
     The term of this Agreement will begin on the date accepted by you, and will continue until terminated as provided below.
     4.
    2.
     Automatic termination.
     This Agreement will terminate automatically without necessity of notice if: a.
     you have made any misrepresentations to us or to a Web Pro, b.
     you have not exercised reasonable care to ensure that Web Pros you sponsor for WebsiteSpark meet Web Pro Eligibility Requirements, c.
     the Program is discontinued, d.
     you make an assignment in contravention of Section 8.
    8, or e.
     you become insolvent or cease to do business in the ordinary course.
     4.
    3.
     Other termination.
     Either party may also terminate this Agreement: a.
     immediately upon written notice at any time if the other party is in material breach of any material warranty, term, condition or covenant of this Agreement or the Program Materials and fails to cure that breach within 30 calendar days after written notice thereof, or b.
     upon 60 calendar days written notice to the other party.
     4.
    4.
     Statutory form.
     If we are required to use a statutory form, we reserve the right to either terminate or vary this Agreement without its use and without any liability to you.
     4.
    5.
     Effects of termination.
     Termination of this Agreement alone will not give rise to any liability on the part of either party, but the termination of this Agreement will not prejudice the rights of the parties accrued prior to such termination, or any other rights or remedies to which they may be entitled.
     All such rights and remedies are subject to the express disclaimers and limitations of liability set forth in this Agreement.
     4.
    6.
     Waiver of rights and obligations.
     To the extent necessary to implement the termination of this Agreement, each party waives any right or obligation under any applicable law or regulation to request or obtain intervention of the courts to terminate this agreement.
     4.
    7.
     Survival.
     The provisions of Sections 3.
    1.
    d, 3.
    1.
    e, and 4-8 of this Agreement will survive expiration or termination of this Agreement.
     5.
     Representations and warranties; disclaimer.
     5.
    1.
     Representations and warranties.
     Each party represents and warrants that: a.
     it has the full power and authority to enter into this Agreement and to perform under this Agreement; and b.
     this Agreement forms a binding obligation upon it, and it is not subject to any other agreements or commitments that conflict with its performance under this Agreement.
     5.
    2.
     Disclaimer of all other warranties.
     THE WARRANTIES SET FORTH IN THIS SECTION 5 ARE THE ONLY WARRANTIES MADE BY THE PARTIES HEREUNDER AND ARE IN LIEU OF ALL OTHER WARRANTIES WITH RESPECT TO THE SUBJECT MATTER OF THIS AGREEMENT OR ANY MATERIALS THAT MAY BE EXCHANGED BY THE PARTIES IN CONNECTION WITH THIS AGREEMENT, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT.
     6.
     Indemnification.
     Each party (for purposes of this Section 6, a “defending party”) will defend the other party and its officers, directors and employees (for purposes of this Section 6, a “defended party”) against, and will pay the amount of any adverse final judgment or settlement to which the defending party consents resulting from, any unaffiliated third party claim that (a) would constitute a breach of the defending party’s warranties under Section 5 of this Agreement, or (b) any content posted or otherwise provided by the defending party on or for use within the Program Website or Other Online Properties (excluding, in all cases, any content posted or provided by third parties) infringes any intellectual property rights of such third party; provided that: (i) the defended party promptly notifies the defending party in writing of the claim; (ii) the defending party has sole control of the defense and all related settlement negotiations with respect to the claim, provided, however, that the defended party has the right, but not the obligation, to participate in the defense of any such claim or action through counsel of its own choosing at its own expense; and (iii) the defended party cooperates to the extent reasonably necessary, and executes all documents reasonably necessary for the defense of such claim, at the defending party’s expense.
     In the event the parties agree to settle a claim, neither party will publicize the settlement without first obtaining the other party’s written permission, which permission will not be unreasonably withheld, conditioned or delayed.
     7.
     Exclusion of damages; limitations of liability.
     7.
    1.
     EXCEPT AS PROVIDED IN SECTION 7.
    3, TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL EITHER PARTY BE LIABLE TO THE OTHER FOR ANY LOSS (WHETHER DIRECT OR INDIRECT) OF PROFITS, DATA, BUSINESS, REVENUE OR ANTICIPATED SAVINGS, OR DUE TO BUSINESS INTERRUPTION, OR FOR ANY INDIRECT, CONSEQUENTIAL, PUNITIVE, INCIDENTAL OR SPECIAL DAMAGES ARISING OUT OF OR RELATED TO THIS AGREEMENT (WHETHER FOR TERMINATION OR OTHERWISE), WHETHER OR NOT SUCH PARTY WAS AWARE OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES.
     7.
    2.
     EXCEPT AS PROVIDED IN SECTION 7.
    3, TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE MAXIMUM AGGREGATE LIABILITY OF ONE PARTY TO THE OTHER PARTY ARISING IN ANY WAY OUT OF THIS AGREEMENT OR OTHERWISE IN CONNECTION WITH THIS AGREEMENT OR ANY OF THE ACTIVITIES DESCRIBED HEREIN SHALL NOT EXCEED ONE HUNDRED DOLLARS (US$100).
     7.
    3.
     TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE EXCLUSION OF DAMAGES AND LIMITATION OF LIABILITY CONTAINED IN SECTIONS 7.
    1 AND 7.
    2 WILL NOT APPLY (a) TO THE OBLIGATIONS IN SECTION 6 ABOVE, OR (b) IN THE EVENT OF A BREACH OF THE CONFIDENTIALITY OBLIGATIONS SET FORTH IN SECTION 3.
    1.
    d HEREOF OR THE INFRINGEMENT BY EITHER PARTY OF THE INTELLECTUAL PROPERTY RIGHTS OF THE OTHER PARTY.
     8.
     General.
     8.
    1.
     Costs and expenses.
     Unless mutually agreed by the parties in a separate written agreement or as specifically provided herein, each party is solely responsible for all costs and expenses it may incur in connection with this Agreement and the activities and matters contemplated by this Agreement.
     8.
    2.
     Relationship of parties.
     You and we are and will remain independent entities that are separate legally, organizationally and financially, and nothing in this Agreement will be construed as creating a partnership, franchise, joint venture, employer- employee or agency relationship between you and us.
     Neither party may act on the other’s behalf or bind the other in any way, or represent that it is in any way entitled to act on behalf of or bind the other.
     Without limiting the foregoing, you may not (a) vary or purport to vary any terms, conditions, warranties, or covenants made by us, or (b) create or purport to create in favor of any person any rights from us.
     This Agreement will not entitle you or any third party to claim remuneration of any nature from Microsoft, including any kind of remuneration for having signed this Agreement or enrolled as a Network Partner.
     8.
    3.
     No representations.
     We have not made any representation about Program benefits to you on which you have relied in deciding to participate in the Program or to enter into this Agreement.
     You warrant that you have relied on your own skill and judgment or that of your advisers in relation to these matters.
     8.
    4.
     Microsoft contracting entity.
     The Microsoft contracting entity for this Agreement is determined by the country/region you are located in, as detailed below: a.
     The Microsoft entity for the United States is: Microsoft Corporation b.
     The Microsoft entity for the rest of the Americas and Caribbean is: Microsoft Puerto Rico S.
    A.
     c.
     The Microsoft entity for the Republic of Korea is: Microsoft Korea, Inc.
     d.
     The Microsoft entity for the rest of the Asia/Pacific region is: Microsoft Regional Sales Corporation e.
     The Microsoft entity for the Europe, Middle East and Africa regions is: Microsoft Ireland Operations Limited 8.
    5.
     Jurisdiction and governing law.
     Applicable law, jurisdiction and venue for this Agreement are identified below.
     This choice of jurisdiction and venue does not prevent either party from seeking injunctive relief for a violation of intellectual property rights or enforcement of recognition of any award or order.
     Injunctive relief or enforcement of recognition may be sought in any appropriate jurisdiction.
     The terms of this Agreement will be governed and construed as follows: a.
     If your principal place of business is in Africa, Europe, or the Middle East, this Agreement will be governed by and construed according to the laws of Republic of Ireland with exclusive venue in the Irish court.
     b.
     If your principal place of business is in Japan, this Agreement will be construed and controlled by the laws of Japan, and you consent to exclusive original jurisdiction and venue in the Tokyo District Court.
     The prevailing party in any action related to this Agreement may recover its reasonable attorneys' fees, costs and other expenses.
     c.
     If your principal place of business is in the People’s Republic of China (for the purpose of this Agreement, the People’s Republic of China does not include Hong Kong S.
    A.
    R.
    , Macao S.
    A.
    R.
    , or Taiwan), this Agreement will be construed and controlled by the laws of the People’s Republic of China, and you consent to submit any dispute arising out of or in relation to the Agreement and any addendum to the binding arbitration at the China International Economic and Trade Arbitration Commission in Beijing (CIETAC) according to its then current rules.
     d.
     If your principal place of business is in the Republic of Korea, this Agreement will be construed and controlled by the laws of Republic of Korea, and you consent to the exclusive original jurisdiction and venue in the Seoul District Court.
     The prevailing party in any action to enforce a right or remedy under this Agreement or to interpret a provision of this Agreement will be entitled to recover its reasonable attorneys' fees, costs and other expenses.
     e.
     If your principal place of business is in Taiwan, this Agreement will be governed by and construed in accordance with the laws of Taiwan.
     The parties hereby designate the Taipei District Court as the court of first instance having jurisdiction over any disputes arising out of or in connection with this Agreement.
     f.
     If your principal place of business is elsewhere in Asia, this Agreement will be governed by and construed according to the laws of Singapore.
     Any dispute related to this Agreement will be referred to and finally resolved by arbitration in Singapore according to the Arbitration Rules of the Singapore International Arbitration Centre (SIAC).
     The SIAC Arbitration Rules are incorporated by reference into this Section 8.
    5 (Jurisdiction and governing law).
     The tribunal will consist of one arbitrator to be appointed by the Chairman of SIAC.
     The language of the arbitration will be English.
     The decision of the arbitrator will be final, binding and incontestable.
     g.
     If your principal place of business is in Colombia or Uruguay, all disputes, claims or proceedings between the parties relating to the validity, construction or performance of this Agreement will be settled by arbitration in accordance with UNCITRAL Arbitration Rules as presently in force.
     The appointing authority will be the International Chamber of Commerce (“ICC”) acting in accordance with the rules adopted by the ICC for this purpose and the place of arbitration will be Seattle, Washington, U.
    S.
    A.
     There will only be one arbitrator.
     The award will be in law and not in equity and shall be final and binding on the parties.
     The parties hereto irrevocably agree to submit all matters and disputes arising in connection with this agreement to arbitration in Seattle, Washington, U.
    S.
    A.
     h.
     If your principal place of business is elsewhere (that is, other than specified above in this Section 8.
    5), this Agreement will be governed by and construed according to the laws of the State of Washington, U.
    S.
    A.
     If federal jurisdiction exists, the parties consent to exclusive jurisdiction and venue in the federal courts in King County, Washington.
     If not, the parties consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington.
     8.
    6.
     Notices.
     All notices and requests to you in connection with this Agreement will be sent to the named contact person and the address you provide on the Program Website.
     For notices and requests to Microsoft, see the Program Guide.
     Notices will be considered delivered on the date shown on the confirmation of delivery, including the date of publication to the Program Website.
     You will give Microsoft prompt notice if you become insolvent or cease to conduct business in the ordinary course.
     8.
    7.
     Complete agreement; agreement changes; no waiver.
     This Agreement and the Program Materials form the entire agreement between the parties concerning the Program.
     They replace all prior agreements and communications between you and us or our affiliates relating to the Program.
     This Agreement can only be changed by an amendment signed by both parties, except that we may change the Program Materials with respect to program administration, policies, procedures, guidelines, benefits and similar changes.
     Any delay or failure to exercise a right or remedy will not result in a waiver of that right or remedy.
     Any waiver of any breach of this Agreement must be in writing and signed by an authorized representative of the waiving party, and no such waiver will be a waiver of any other breach.
     8.
    8.
     Assignment.
     This Agreement is personal to you, and neither this Agreement nor any or your rights or obligations under it may be assigned or otherwise transferred by you without our prior written consent, and any purported assignment or transfer contrary to the foregoing is void.
     8.
    9.
     Tax.
     The parties are not liable for any of the taxes of the other party that the other party is legally obligated to pay and which are incurred or arise in connection with or related to the transactions contemplated under this Agreement, and all such taxes shall be the financial responsibility of the party who is obligated by operation of law to pay such tax.
     8.
    10 No rule of strict construction; severability.
     No rule of strict construction will be applied against any party.
     If a court holds any provision of this Agreement to be illegal, invalid or unenforceable, the parties will deem the provision to be modified to the extent necessary to allow it to be enforced to the extent permitted by law, or if it cannot be modified, the illegal, invalid or unenforceable clause will be stricken and the remaining provisions will remain in full force and effect and be construed to give effect to the stricken clause to the maximum extent possible.
     8.
    10.
     Non-disparagement.
     During the term of this Agreement, each party agrees not to make any derogatory statements regarding, or disparage in any way, the business or reputation of the other relating to any of the activities contemplated by this Agreement.
     8.
    11.
     Language.
     We offer this Agreement in several languages.
     The language version in which you accept this Agreement will control.
     If you are located in Canada, the parties agree that this Agreement, and any associated Program documentation, be written and signed in English.
     C’est la volonté expresse des parties que la présente convention ainsi que les documents qui s’y rattachent soient rédigés en anglais.
     8.
    12.
     Order of precedence.
     If there is any direct conflict between this Agreement and the Program Materials, this Agreement will prevail.
     If a particular subject is addressed in the Program Materials and not in this Agreement, the terms of the Program Materials regarding that subject will prevail.
     
    September 27

    Handwriting recognition



    Just got a Wacom tablet at the weekend, and then started looking for some practical application....
    Not quite practical, but I was presently surprised with some Handwriting recognition by
    ritePen.

    I tried getting Microsoft INK to work, but I think it requires a tablet PC.
    September 21

    Using Webservices with Flex

    I was working on a larger Flex example this morning: Sending SMS via a webservice in Flex
    But due to the Flash sandbox, there is a hurdle you have to jump, security wise, to access a webservice from Flash,
    and it first shows it's ugly head with this exception:

    [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://www.freebiesms.co.uk/sendSMS.asmx?wsdl)"]
        at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:225]
        at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]
        at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
        at DirectHTTPMessageResponder/securityErrorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:389]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/redirectEvent()

    Which, after hunting on the Net, showed me that I needed a crossdomain.xml file thus:

    <cross-domain-policy>
        <allow-access-from domain="*"/>
        <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
    </cross-domain-policy>

    - Oh, and I also found out that Webservice method names are case-sensitive, when I got this error:

    [RPC Fault faultString="Couldn't find method 'sendSms' in service." faultCode="Client.NoSuchMethod" faultDetail="null"]
        at mx.rpc.soap::Operation/createFaultEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\soap\Operation.as:978]
        at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\soap\Operation.as:763]
        at mx.rpc.soap::Operation/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\soap\Operation.as:693]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.rpc.soap.mxml::Operation/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\soap\mxml\Operation.as:170]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:290]
        at FreebieSMS/click()[C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\FreebieSMSFlex\FreebieSMSFlex\src\FreebieSMS.as:31]
        at FreebieSMSFlex/___FreebieSMSFlex_Button1_click()[C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\FreebieSMSFlex\FreebieSMSFlex\src\FreebieSMSFlex.mxml:4]






    September 20

    Using Code-behind with Flex

    This is a few steps on how to use Code-behind with Flex & Visual Studio 2008.

    Installed Ensemble Tofino  (With SDK)

    This was my MXML file:

    <?xml version="1.0" encoding="utf-8" ?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute">   
        <mx:Button x="45" y="33" label="Say Hello!" click="HelloWorld.click(event)"/>   
    </mx:Application>

    And the .AS file was:

    package
    {
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Alert;
       
        public class HelloWorld
        {
            public static function click(event:MouseEvent)
            {
                Alert.show("This responded to an event from code-behind");
            }
        }
    }

    Ideally, The Application Class should inherit from HelloWorld, so that the click event could be protected rather than
    static; so it should be modified as follows:

    <?xml version="1.0" encoding="utf-8" ?>
    <my:HelloWorld xmlns:my="*"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute">   
        <mx:Button x="45" y="33" label="Say Hello!" click="click(event)"/>   
    </my:HelloWorld>

    and the AS file thus:

    package
    {
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Alert;
        import mx.core.Application;
       
        public class HelloWorld extends Application
        {
            protected function click(event:MouseEvent)
            {
                Alert.show("This responded to an event from code-behind");
            }
        }
    }






    Facebook App development

    Freebie SMS Facebook App

    Download link: Download Facebook App with source code in C#
    Facebook link: Free SMS Facebook App

    This is a Facebook App for sending free SMS messages to UK mobile phones,
    It was created with the asp.net starter kit for C# 3.5. and can be downloaded from the links above
    with full source code.

    The only real departure from a standard asp.net page, is that it gets the 'from name' from the Facebook profile, like this:
          
           protected string GetUserName()
            {
                try
                {
                    facebook.Schema.user userinfo = Master.API.users.getInfo(Master.API.uid);
                    return userinfo.first_name;
                }
                catch
                {
                    return "Someone";
                }
            }

    Note, that the exception can be thrown on first load, before the user has accepted access to their own profile, hense
    the try/catch
    September 06

    Setting up SQL server Azure

    This is my experience with setting up SQL server Azure (2008), pretty difficult, and very buggy, to be honest,
    my feeling is to stay away from the CTP, but here's my 'walkthrough'

    I got this email a few days ago:

    Welcome to the SQL Azure CTP!  We are excited to have you join us.  Below are some steps to get you started, as well as links to helpful resources. 

     

     Getting Started

    1)     Visit https://sql.azure.com

    2)     Sign in with a valid Windows LiveID

    3)     Enter your invitation code

     Your invitation code is: d329171f-c1fd-4060-862e-1a7f613ea8ce

     4)     Create your SQL Azure Server (and databases)

     So I stepped through the process, and set up an Azure database, then I found that I needed SQL server 2008 to connect to it,

    I downloaded  SQLManagementStudio_x86_ENU.exe from
    http://www.microsoft.com/DownLoads/details.aspx?familyid=08E52AC2-1D62-45F6-9A4A-4B76A8564A2B&displaylang=en

    During Install, said that I needed to reboot... when I had, so a work around was:

    # Open Regedit
    # Find the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager"
    # Rename the "PendingFileRenameOperations" value to "PendingFileRenameOperations2"
    # Re-Run the checks

    Downloaded powershell:

    http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=6ccb7e0d-8f1d-4b97-a397-47bcc8ba3806&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f7%2f3%2f4%2f7345bb7d-0b07-40e8-9480-5b8c55b9c8b7%2fWindowsXP-KB926139-v2-x86-ENU.exe

    Uninstalled SQL server management studio express

    Uninstalled Visual studio 2008

    It then crashed with this error:

    TITLE: SQL Server Setup failure.
    ------------------------------

    SQL Server Setup has encountered the following error:

    Unable to generate a temporary class (result=1).
    error CS0006: Metadata file 'C:\WINDOWS\assembly\GAC_MSIL\MSClusterLib\1.0.0.0__89845dcd8080cc91\MSClusterLib.dll' could not be found


    Error code 0x84B10001.

    ------------------------------
    BUTTONS:

    OK
    ------------------------------


    Rebooted...

    Deleted the PendingFileOperations Registry Key

    Installed!

    Tried to Connect:

    ADO.NET:
    Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;User ID=fiach;Password=myPassword;Trusted_Connection=False; Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=;User ID=fiach;Password=myPassword;Trusted_Connection=False; Copy to clipboard
    ODBC:
    Driver={SQL Server};Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;Uid=fiach;Pwd=myPassword; Driver={SQL Server};Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=;Uid=fiach;Pwd=myPassword; Copy to clipboard
    OLE DB:
    Provider=SQLNCLI10;Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;Uid=fiach;Pwd=myPasswor

    TITLE: Connect to Server
    ------------------------------

    Cannot connect to yitwxb6n0v.ctp.database.windows.net.

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    Invalid object name 'sys.configurations'. (Microsoft SQL Server, Error: 208)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.9006&EvtSrc=MSSQLServer&EvtID=208&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    Fixed using this post:

    http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/9e5b6854-9e5a-4e7d-b771-313aa5683b72

    1. cancel out of the first connection dialog that pops up.
    2. click on the New Query button from the toolbar (upper left)
    3. entered
           Server name: full servername
           Login: just the username (no @...)
    4. Under Options, Connect to Database, (type your database here)
    5. Hit connect.

    And I got in... after an hour.

    Now to figure out how to copy the databases!


    July 16

    Changing the TTL value of a DNS record in Windows

     
    I noticed that going to who.is/dns/<website>, the DNS TTL records for a domain were all set to 0, which meant that
    every DNS request would require a new DNS lookup.
     
    In the DnsMgmt MSC snap in it was impossible to change the TTL for individual records, until I saw you can press View>Advanced, to access the TTLs
     
    June 29

    Creating a virtual directory on Apache for Windows

    I wanted to allow database downloads from my D: drive, but I got this 403 error, this is how I solved it in my Httpd.conf

    Alias /db "D:\sqldata\backups"


    <Directory "D:\sqldata\backups">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Deny from localhost
    Allow from all
    </Directory>

    Hope this helps

     
    June 27

    Migrating a classic ASP site from Windows to Linux

    I recently moved javatiger.com from a Windows server to a Linux server, basically, to move some smaller sites off the main Windows server, and
    I had spare VPS server that I could use for the purpose.

    First step to set up Apache on the Linux server,

    Use WinSCP to create files in /etc/apache2/sites-enabled/omadataobjects.com.conf
     
    <VirtualHost *>
    ServerAdmin webmaster@localhost
    ServerAlias www.omadataobjects.com
    DocumentRoot /var/www/omadataobjects.com
    </VirtualHost>
     
    Use Putty to restart Apache /etc/init.d/apache2 reload

    The site was in ASP, was indexed in Google, with Page Rank, so I didn't want to change the URLs, so I wanted to use mod_rewrite,
    which I installed using Putty:

    root@vps ~ # a2enmod rewrite
    Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.
    root@vps ~ # /etc/init.d/apache2 force-reload
    Forcing reload of web server (apache2)... waiting .

    I then created a .htaccess file in the website root

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*).asp$ /$1.php [L,NC,R=301]
    </IfModule>

    Which rewrites all .asp requests to .php

    I then changed the extension of all .asp files to .php,
    and changed
    <!--#include file="header.asp"--> to <?php include("header.php"); ?>

    Oh, and I had a few glitches with case-sensitivity, which Windows is less strict about.






    May 21

    List of Software developers, Mashup.

    RS Software GmbH   WORKSLINE BV SOFTWARE VOOR WERKTUIGBOUW   A M S ADVANCED MANUFACTURING SOFTWARE S R L   IMATIC SOFTWARE Y SISTEMAS INFORMÁTICA S L   KONEL SOFTWARE HOUSE S R L   SOFTWARE DEVELOPMENTS INTERNATIONAL LTD   NATRON SOFTWARE MAINTENANCE LTD   B K Service og Software   Sage KHK Software   Fischer Hans Josef Software Design   PRO MEDISOFT Software Systeme für das Gesundheitswesen GmbH Hotline   DHS Media Unterhaltungs Hard und Software GmbH Co   f s Computer und Software Vertriebs GmbH   SOMENTEC Software GmbH   ZWEITWERK software engineering GmbH   SEDIS SOFTWARE BV   Blyth Software Germany GmbH   Software exclusiv GmbH   Innovative Software Design GmbH Beratung Design Entwicklung   Software Partner GmbH   T T Software Consulting GmbH   S I G SOFTWARE Ingenieur GmbH Automatisierungstechnik   Doors GmbH Software Consulting   COMPUTER SOFTWARE ENGINERING SRL   st Software GmbH Co KG i G   Gutbrod Willi Software GmbH   Erste CRG Computer u Software Vertriebs GmbH   PANORAMA SOFTWARE INTERNATIONAL LTD   NAVISION SOFTWARE U K LTD   CB Software Christa Bildstein   OPEN MARKET INTERNET SOFTWARE BV   Carano Software Entwicklungs GmbH   S R Software GmbH   Integrierte Software Technologie Roggenhof GmbH   HL Computer Hard u Software   Innovative Software AG   SOC Software Outsourcing Consulting GmbH   JARITZ SOFTWARE GmbH   SEMA SOFTWARE GMBH   Hügen Katzmann Software GmbH   Voigt Software und Unternehmensberatung GmbH   VSS GmbH Vertrieb von Systemen und Software   MARINE SOFTWARE LTD   Intertrend Software GmbH   hagosoft Industrie Software GmbH   PALMA SOFTWARE AND COMPUTING SAS   Akten James Software GmbH Petersen Firmengruppe Interclearing Petersensoftware   SOCON Software Consulting GmbH   ASPIA Automatisierte Software Produktion und Informatik Architektur GmbH Groeneveld   SCI Software GmbH   Wannemacher Software Service GmbH Wannemacher Software Servic GmbH   Softdesign Hard u Software   IVAMEC SOFTWARE E SERVIZI SRL   AUGEO SOFTWARE BV   Transcom Computer Hard Software   DATALINE Gesellschaft für Hard u Software Systeme mbH   Software Engineering Klaus Thiehoff   TARGET Software Vertriebs GmbH   Software AG Stiftung   MK tec GmbH Software und Elektronik i G   L S ADVANCED SOFTWARE DI GIUGNO E VALENTI SNC   CAPRI SOFTWARE S A   PATIDOK Clinical Software GmbH Patidok   STACKS CONSULTING E INGENIERIA EN SOFTWARE S L   TOTOPROJECT SOFTWARE HOUSE   intermedix Gesellschaft für medizinische Software mbH   SCHELHAAS SOFTWARE BV   Sternberg Software und Computersysteme GmbH   BCIS Hard Softwaren Leipzig GmbH BCIS Hard und Software Leipzig GmbH   Kraus Software GmbH   TECTONIC SOFTWARE LTD   TRANSLINK SOFTWARE LTD   THE SOFTWARE TRAINING CO   SET IN POINT HARD SOFTWARE   Plus Data Hard u Software GmbH   CSCS Computer u Software Schnäkel   Opus Software Betreuungs GmbH   SF Software   TESCOM Software Systems Testing GmbH   FERNBACH Software AG   DEECODE SOFTWARE LTD   SCOPS SOFTWARE LTD   A S SOFTWARE S R L   DETEC Decision Technology Software GmbH   Attica Software Computersystems bvba   COSYCO SOFTWARE   SOFTWARE TRAINING ASSOCIATES   METROPOLIS SOFTWARE   Exact Software GmbH Exact Software GmbH Software Software   Software Service R Welz GmbH   Greenlab Systems GmbH Gesellschaft für med Software   BYTE SOFTWARE HOUSE S P A   TBG Software GmbH   Rehm Software GmbH   SOFTWARE MIGRATIONS LTD   MEDEA SOFTWARE Inh Dr Sühling   CAM Service Gesellschaft für Software und Automationstechnik mbH CAM Service mbH   SACO Software and Consulting GmbH   UNISON SOFTWARE U K LTD   BOSS Branchen Organisation u Software Systeme GmbH   PC USING Software GmbH   DIALOG SOFTWARE TELECOMMUNICATIONS SRL   S O T Gesellschaft für Software u Organisationstechniken mbH S O T Ges f Software u Organisationstechnik GmbH   HELPING HAND SOFTWARE LTD   C3 Hard und Software Service   4D Concepts Prototyping Software und Consulting GmbH   Blue Communications Software GmbH Blue Communications Software GmbH   HL Software EDV   BIOLOGIE SOFTWARE ET SYSTEMES   Software 7 GmbH   ORTEC NV Computer printers en software   CUMMINGS SOFTWARE S L   Interactive Software Federation of Europe   BRITTANIC SOFTWARE SERVICES LTD   ReNoFlex Computer Software GmbH Vertriebsbüro   Pi M software Allgäuer   VMARK SOFTWARE LTD   ZINC SOFTWARE U K LTD   Neon Software GmbH   SOFTWARE VISUAL DE SANTA CLARA S L   CANDESCENT SOFTWARE LTD   AF Software GmbH   KEOS SOFTWARE SERVICE BV   Seneca Software Services GmbH   Y2K SOFTWARE LTD   COMSULT COMPUTER SOFTWARE CONSULTANTS   mbv Software GmbH   TSE Thürnau Software Entwicklung GmbH   PRODIXIA SOFTWARE   ESYS Gesellschaft für Elektronische Systemtechnik Hard u Software mbH   SOFTWARE MACHINES AND SYSTEM DI CICCONE LUCIO C S A S   ELCOTEC Gesellschaft für Software und Systemlösungen m b H   itCampus Software und Systemhaus   S A D Software Vertriebs und Produktions GmbH   TEGIS Software GmbH Softwaretechnik   ANT SOFTWARE BV   Integrated Application Software   Ulybin Gesellschaft für Business und Software GmbH   SPEA SOFTWARE AKTIENGESELLSCHAFT   OPEN SOFTWARE SERVICES VOF   FIVE STAR SOFTWARE LTD   Laser Soft Hard und Software Vertriebs GmbH   PC PARTNER PLUS PPP Hard u Software GmbH   MIPROTEK Gesellschaft für Hard und Software Entwicklung GmbH   Bauer Partner Consulting und Software GmbH Region Deutschland Südost   G TEC Software GmbH Eduard   multicom Software Entwicklung Dr Ruchert Co GmbH   Related Designs Software GmbH Related Design Software GmbH   SIDIN SOFTWARE S R L   MJ Software GmbH Co KG   MCS SOFTWARE S R L   BeO Gesellschaft für standard software support mbH   LSE Software OHG Software   HAB Software GmbH Co KG   P C Software GmbH   Heinsohn Andreas Heinsohn Computer Zubehör Software Werkstatt   SDS Software Mußhoff und Spohr GbR   Becker Pöttgen Software GmbH   VISUAL POINT SOFTWARE DI QUARANTA TIZIANO   LANDEN SOFTWARE   CBMS Software GbR   SSW Software Support Winter GmbH   DESARROLLO E IMPLANTACION DE SOFTWARE S L   SHS GmbH Spezial Hardware Software   Zaremba Software Engineering GmbH Z S E   Software Sidoun GmbH   Weiß Elektronik u Software GmbH   Bob Software bvba   SOFTWARE OF EXCELLENCE UNITED KINGDOM LTD   TRANS NATIONS SOFTWARE DI FRANCESCO PERNIOLA   SOFTWARE COMPARTS   SCION SOFTWARE   betzemeier automotive software GmbH betzmeier   ARS SOFTWARE BV   SYSTEM 3 ARCADE SOFTWARE LTD   Bäurer Unternehmensberatung u Software GmbH   AWIDA SOFTWARE GmbH Softwareentwicklung   Saturn Electro Handelsgesellschaft mbH Software   SysTeam Handelssysteme Software GmbH   Elite Software Aps og Verner Kristensen   INTRANET SOFTWARE SOLUTIONS   Objective Software GmbH Uwe Meyer   STEP UP SOFTWARE S L   ISIS GmbH Ingenieurbüro für Software und integrierte Systemlösungen ISIS GmbH   ASS Software Odenwald   Arsdata Software GmbH   Unicom Computerservice und Software GmbH   Körtner Muth GmbH Software Entwicklung   BLUE SOFTWARE S R L   V ZES SOFTWARE   CS Software Computer und Software Beratungs GmbH   Sollist Individual Software GmbH Kock   B B SOFTWARE LTD   Specken Detlef Win Service Hard u Software GmbH   C M Software GmbH   FS SOFTWARE Schmid   EPLAN Software Service GmbH Co KG   Candid Software   Virtual X citement Software GmbH   Phönix Computer Software Service Schulung   Impule Software Systeme GmbH   Bob Software sprl   SOFTWARE AUTOMATIC   Ixos Software Ixos Software Internation   CASH SOFTWARE BV   tp net Hard Software GmbH   PRODEWA SOFTWARE GmbH   ACC SYS SOFTWARE LTD   TOTO BIT INFORMATICA SOFTWARE E SISTEMI SPA   SOFTLINE SOFTWARE   4D SOFTWARE SERVICES LTD   BAAR SOFTWARE H   ADM2000 SOFTWARE NV   QUOEN SOFTWARE   FLEMING SOFTWARE LTD   Heineck Heineck Ulrich Thüringer Software Service   LASER VISUAL SOFTWARE   CUSH Gruppe Dresden Computer und Software Haus GmbH   ELITE SOFTWARE LTD   Kraus Thorsten Kraus Hard u Software Verkauf   SSR Software Entwicklung Beratung GmbH   Prosoft Software Entwicklung mbH   BARTELDS TECHNICAL SOFTWARE   DOMUS SOFTWARE AG   CRIL TELECOM SOFTWARE   InstallShield Software GmbH   DESKTOP MAPPING SOFTWARE S L   RiskTrak Financial Software GmbH   COMPUTER APPARATUUR PLAN 5 SOFTWARE   SILK ROAD SOFTWARE ENTERPRISE BV   Hard Software Ris   SOFTWARE TEAM SRL TECNOLOGIE INFORMATICHE AVANZATE   BOMICO BOMICO ENTERTAINMENT SOFTWARE BNL   Dahm Software Systeme GmbH   Dataline 
    May 16

    Http Traces Wiki started.

    Http Traces are something I deal with every day in my day to day development, , and I thought that it might be useful for other
    developers to publish them on-line, so, voilá, a new wiki: http://httpheaders.wikidot.com/
     
     
    May 11

    English-Indian Locale

    enIN.ldml

    This is the English-Indian Locale File:
    (Exported using PowerShell, see http://iformattable.blogspot.com/2008/11/dealing-with-globalization-differences.html)

    <?xml version="1.0" encoding="utf-8"?>
    <ldml>
      <identity>
        <version number="1.1">ldml version 1.1</version>
        <generation date="2009-05-11" />
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:cultureInfoVersion type="1.0" />
          <msLocale:cultureAndRegionInfoName type="en-IN" />
          <msLocale:geoId>113</msLocale:geoId>
          <msLocale:countryCode>91</msLocale:countryCode>
          <msLocale:parentName type="en" />
          <msLocale:languageNameAbbr type="ENN" />
          <msLocale:languageIsoName type="threeLetters">eng</msLocale:languageIsoName>
          <msLocale:languageIsoName type="twoLetters">en</msLocale:languageIsoName>
          <msLocale:nativeName type="English (India)" />
          <msLocale:regionEnglishName type="India" />
          <msLocale:regionNativeName type="भारत" />
          <msLocale:regionIsoName type="threeLetters">IND</msLocale:regionIsoName>
          <msLocale:regionIsoName type="twoLetters">IN</msLocale:regionIsoName>
          <msLocale:regionWindowsName type="threeLetters">IND</msLocale:regionWindowsName>
          <msLocale:englishName type="English (India)" />
          <msLocale:textInfoName type="en-IN" />
          <msLocale:sortName type="en-IN" />
          <msLocale:englishLanguage type="English" />
          <msLocale:nativeLanguage type="English" />
          <msLocale:keyboardsToInstall type="0409:00000409;" />
        </special>
      </identity>
      <layout>
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:direction type="left-to-right" />
        </special>
      </layout>
      <characters>
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:keyboardLayout>16393</msLocale:keyboardLayout>
          <msLocale:consoleFallbackName type="en-IN" />
          <msLocale:fontSignature>
            <msLocale:unicodeRanges>
              <msLocale:range type="0" />
              <msLocale:range type="1" />
            </msLocale:unicodeRanges>
            <msLocale:defaultCodePages>
              <msLocale:ansiCodePage>
                <msLocale:codePage type="1252" />
              </msLocale:ansiCodePage>
              <msLocale:ansiOemCodePage />
              <msLocale:oemCodePage>
                <msLocale:codePage type="437" />
              </msLocale:oemCodePage>
            </msLocale:defaultCodePages>
            <msLocale:codePages>
              <msLocale:ansiCodePage>
                <msLocale:codePage type="1252" />
                <msLocale:codePage type="1250" />
                <msLocale:codePage type="1251" />
                <msLocale:codePage type="1253" />
                <msLocale:codePage type="1254" />
                <msLocale:codePage type="1255" />
                <msLocale:codePage type="1256" />
                <msLocale:codePage type="1257" />
                <msLocale:codePage type="1258" />
              </msLocale:ansiCodePage>
              <msLocale:ansiOemCodePage>
                <msLocale:codePage type="874" />
                <msLocale:codePage type="932" />
                <msLocale:codePage type="936" />
                <msLocale:codePage type="949" />
                <msLocale:codePage type="950" />
                <msLocale:codePage type="1361" />
              </msLocale:ansiOemCodePage>
              <msLocale:oemCodePage>
                <msLocale:codePage type="1258" />
                <msLocale:codePage type="869" />
                <msLocale:codePage type="866" />
                <msLocale:codePage type="865" />
                <msLocale:codePage type="864" />
                <msLocale:codePage type="863" />
                <msLocale:codePage type="862" />
                <msLocale:codePage type="861" />
                <msLocale:codePage type="860" />
                <msLocale:codePage type="857" />
                <msLocale:codePage type="855" />
                <msLocale:codePage type="852" />
                <msLocale:codePage type="775" />
                <msLocale:codePage type="737" />
                <msLocale:codePage type="708" />
                <msLocale:codePage type="850" />
                <msLocale:codePage type="437" />
              </msLocale:oemCodePage>
            </msLocale:codePages>
          </msLocale:fontSignature>
          <msLocale:scripts>
            <msLocale:script type="Latn" />
          </msLocale:scripts>
        </special>
      </characters>
      <measurement>
        <measurementSystem type="metric" />
        <paperSize>
          <height>297</height>
          <width>210</width>
        </paperSize>
      </measurement>
      <dates>
        <calendars>
          <default type="Gregorian" />
          <calendar type="Gregorian">
            <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
              <msLocale:calendarNativeName type="Gregorian Calendar" />
            </special>
            <months>
              <monthContext type="format">
                <monthWidth type="wide">
                  <month type="1">January</month>
                  <month type="2">February</month>
                  <month type="3">March</month>
                  <month type="4">April</month>
                  <month type="5">May</month>
                  <month type="6">June</month>
                  <month type="7">July</month>
                  <month type="8">August</month>
                  <month type="9">September</month>
                  <month type="10">October</month>
                  <month type="11">November</month>
                  <month type="12">December</month>
                  <month type="13" />
                </monthWidth>
                <monthWidth type="abbreviated">
                  <month type="1">Jan</month>
                  <month type="2">Feb</month>
                  <month type="3">Mar</month>
                  <month type="4">Apr</month>
                  <month type="5">May</month>
                  <month type="6">Jun</month>
                  <month type="7">Jul</month>
                  <month type="8">Aug</month>
                  <month type="9">Sep</month>
                  <month type="10">Oct</month>
                  <month type="11">Nov</month>
                  <month type="12">Dec</month>
                  <month type="13" />
                </monthWidth>
                <monthWidth type="genitive">
                  <month type="1">January</month>
                  <month type="2">February</month>
                  <month type="3">March</month>
                  <month type="4">April</month>
                  <month type="5">May</month>
                  <month type="6">June</month>
                  <month type="7">July</month>
                  <month type="8">August</month>
                  <month type="9">September</month>
                  <month type="10">October</month>
                  <month type="11">November</month>
                  <month type="12">December</month>
                  <month type="13" />
                </monthWidth>
                <monthWidth type="genitiveAbbreviated">
                  <month type="1">Jan</month>
                  <month type="2">Feb</month>
                  <month type="3">Mar</month>
                  <month type="4">Apr</month>
                  <month type="5">May</month>
                  <month type="6">Jun</month>
                  <month type="7">Jul</month>
                  <month type="8">Aug</month>
                  <month type="9">Sep</month>
                  <month type="10">Oct</month>
                  <month type="11">Nov</month>
                  <month type="12">Dec</month>
                  <month type="13" />
                </monthWidth>
              </monthContext>
            </months>
            <days>
              <dayContext type="format">
                <dayWidth type="wide">
                  <day type="sun">Sunday</day>
                  <day type="mon">Monday</day>
                  <day type="tue">Tuesday</day>
                  <day type="wed">Wednesday</day>
                  <day type="thu">Thursday</day>
                  <day type="fri">Friday</day>
                  <day type="sat">Saturday</day>
                </dayWidth>
                <dayWidth type="abbreviated">
                  <day type="sun">Sun</day>
                  <day type="mon">Mon</day>
                  <day type="tue">Tue</day>
                  <day type="wed">Wed</day>
                  <day type="thu">Thu</day>
                  <day type="fri">Fri</day>
                  <day type="sat">Sat</day>
                </dayWidth>
                <dayWidth type="shortest">
                  <day type="sun">Su</day>
                  <day type="mon">Mo</day>
                  <day type="tue">Tu</day>
                  <day type="wed">We</day>
                  <day type="thu">Th</day>
                  <day type="fri">Fr</day>
                  <day type="sat">Sa</day>
                </dayWidth>
              </dayContext>
            </days>
            <week>
              <firstDay day="mon" />
              <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
                <msLocale:weekRule type="firstDay" />
              </special>
            </week>
            <am>AM</am>
            <pm>PM</pm>
            <dateFormats>
              <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
                <msLocale:dateFormatLength type="long">
                  <msLocale:default type="0" />
                  <msLocale:dateFormat type="0">
                    <msLocale:pattern>dd MMMM yyyy</msLocale:pattern>
                  </msLocale:dateFormat>
                  <msLocale:dateFormat type="1">
                    <msLocale:pattern>d MMMM yyyy</msLocale:pattern>
                  </msLocale:dateFormat>
                </msLocale:dateFormatLength>
                <msLocale:dateFormatLength type="short">
                  <msLocale:default type="0" />
                  <msLocale:dateFormat type="0">
                    <msLocale:pattern>dd-MM-yyyy</msLocale:pattern>
                  </msLocale:dateFormat>
                  <msLocale:dateFormat type="1">
                    <msLocale:pattern>dd-MM-yy</msLocale:pattern>
                  </msLocale:dateFormat>
                  <msLocale:dateFormat type="2">
                    <msLocale:pattern>d-M-yy</msLocale:pattern>
                  </msLocale:dateFormat>
                  <msLocale:dateFormat type="3">
                    <msLocale:pattern>d.M.yy</msLocale:pattern>
                  </msLocale:dateFormat>
                  <msLocale:dateFormat type="4">
                    <msLocale:pattern>yyyy-MM-dd</msLocale:pattern>
                  </msLocale:dateFormat>
                </msLocale:dateFormatLength>
                <msLocale:yearMonthFormat>
                  <msLocale:default type="0" />
                  <msLocale:yearMonth type="0">
                    <msLocale:pattern>MMMM, yyyy</msLocale:pattern>
                  </msLocale:yearMonth>
                </msLocale:yearMonthFormat>
                <msLocale:monthDay>
                  <msLocale:pattern>MMMM dd</msLocale:pattern>
                </msLocale:monthDay>
              </special>
            </dateFormats>
            <timeFormats>
              <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
                <msLocale:timeFormatLength type="long">
                  <msLocale:default type="0" />
                  <msLocale:timeFormat type="0">
                    <msLocale:pattern>HH:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="1">
                    <msLocale:pattern>H:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="2">
                    <msLocale:pattern>tt hh:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="3">
                    <msLocale:pattern>tt h:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                </msLocale:timeFormatLength>
                <msLocale:timeFormatLength type="short">
                  <msLocale:default type="0" />
                  <msLocale:timeFormat type="0">
                    <msLocale:pattern>HH:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="1">
                    <msLocale:pattern>H:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="2">
                    <msLocale:pattern>tt hh:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                  <msLocale:timeFormat type="3">
                    <msLocale:pattern>tt h:mm:ss</msLocale:pattern>
                  </msLocale:timeFormat>
                </msLocale:timeFormatLength>
                <msLocale:durationFormats>
                  <msLocale:default type="0" />
                  <msLocale:durationFormat type="0">
                    <msLocale:pattern>HH:mm:ss</msLocale:pattern>
                  </msLocale:durationFormat>
                </msLocale:durationFormats>
              </special>
            </timeFormats>
          </calendar>
          <calendar type="Gregorian US">
            <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
              <msLocale:calendarNativeName type="Gregorian Calendar" />
            </special>
          </calendar>
        </calendars>
      </dates>
      <numbers>
        <symbols>
          <list>,</list>
          <decimal>.</decimal>
          <group>,</group>
          <percentSign>%</percentSign>
          <infinity type="positive">Infinity</infinity>
          <infinity type="negative">-Infinity</infinity>
          <nan>NaN</nan>
          <PlusSign />
          <minusSign>-</minusSign>
          <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
            <msLocale:currencyDecimalSeparator>.</msLocale:currencyDecimalSeparator>
            <msLocale:currencyGroupSeparator>,</msLocale:currencyGroupSeparator>
          </special>
        </symbols>
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:decimalDigits>2</msLocale:decimalDigits>
          <msLocale:negativePattern type="1" />
          <msLocale:currencyDecimalDigits type="2" />
          <msLocale:currencyPositivePattern type="2" />
          <msLocale:currencyNegativePattern type="12" />
          <msLocale:percentNegativePattern type="0" />
          <msLocale:percentPositivePattern type="0" />
          <msLocale:leadingZero type="yes" />
          <msLocale:groupSizes type="0">3</msLocale:groupSizes>
          <msLocale:groupSizes type="1">2</msLocale:groupSizes>
          <msLocale:currencyGroupSizes type="0">3</msLocale:currencyGroupSizes>
          <msLocale:currencyGroupSizes type="1">2</msLocale:currencyGroupSizes>
          <msLocale:nativeDigits type="0">0</msLocale:nativeDigits>
          <msLocale:nativeDigits type="1">1</msLocale:nativeDigits>
          <msLocale:nativeDigits type="2">2</msLocale:nativeDigits>
          <msLocale:nativeDigits type="3">3</msLocale:nativeDigits>
          <msLocale:nativeDigits type="4">4</msLocale:nativeDigits>
          <msLocale:nativeDigits type="5">5</msLocale:nativeDigits>
          <msLocale:nativeDigits type="6">6</msLocale:nativeDigits>
          <msLocale:nativeDigits type="7">7</msLocale:nativeDigits>
          <msLocale:nativeDigits type="8">8</msLocale:nativeDigits>
          <msLocale:nativeDigits type="9">9</msLocale:nativeDigits>
          <msLocale:digitSubstitution type="none" />
        </special>
        <currencies>
          <currency type="default">
            <symbol>Rs.</symbol>
            <displayName>रुपय</displayName>
            <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
              <msLocale:isoCurrency>INR</msLocale:isoCurrency>
              <msLocale:currencyEnglishName>Indian Rupee</msLocale:currencyEnglishName>
            </special>
          </currency>
        </currencies>
      </numbers>
    </ldml>
    April 30

    Email to SMS project

    https://www.getafreelancer.com/projects/NET/Email-SMS.html

    Overview

    Create a windows service application written in .NET, that will check a Pop3 email account every 5 minutes (configurable in app.config).
    On receipt of an email, in the format [number]@freebiesms.mobi, then the service will call a webservice,
    (http://www.freebiesms.co.uk/sendsms.asmx?op=SendSms)

    Using these parameters:

    FromName: The From name in the email
    FromNumber: Hard coded, as 00447834567890
    ToNumber: The [number] in the email address
    Message: The Body of the email, or subject line if no body. (Plain text)
    locale: Derived from the prefix of the [number], 0044 is en-GB.
    Full list of valid locales here: http://spreadsheets.google.com/pub?key=p_x5hMjj9OXDTjsYYhluJKQ
    This list must be configurable in the app.config


    Any response from the web service, either error or success must be sent back to the sender via email.

    Points to note:

    * Should support unicode, if email body in unicode (i.e. Russian) then the message should be in unicode.
    * The service must run without any user interaction, any errors should be logged, and ignored. The service should not stop in the event
    of any failure, just try again in 5 minutes.
    * I would prefer .NET 1.1 if possible.
    * Help with setting up the catch-all email address, and help with installation on the server is necessary.

    April 21

    Sending SMS via Soap from Cocoa (Mac)

    Here is some code that was used as part of my IPhone App for sending SMS messages via SOAP;

    Full download can be found here;http://sites.google.com/site/freesmsuk/free-sms-iphone-app

    #import "sendSms.h"
    #import <libxml/xmlstring.h>
    #import <CFNetwork/CFHTTPMessage.h>
    #import <CFNetwork/CFHTTPStream.h>



    @implementation sendSms_SendSms


    @synthesize fromName;
    @synthesize fromNumber;
    @synthesize toNumber;
    @synthesize message;
    @synthesize locale;

    - (id)init
    {
        if((self = [super init])) {
        }
       
        return self;
    }


    - (void)dealloc
    {
       
        [super dealloc];
    }


    - (NSString *)nsPrefix
    {
        return @"sendSms";
    }


    - (NSString *)serializedFormUsingElementName:(NSString *)elName
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
        [serializedForm appendFormat:@"<%@ xsi:type=\"sendSms:SendSms\"", elName];
        [serializedForm appendString:[self serializedAttributeString]];
        [serializedForm appendFormat:@">"];
       
        [serializedForm appendString:[self serializedElementString]];
       
        [serializedForm appendFormat:@"\n</%@>", elName];
       
        return serializedForm;
    }


    - (NSString *)serializedAttributeString
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
       
       
        return serializedForm;
    }


    - (NSString *)serializedElementString
    {
        NSMutableString *serializedForm = [NSMutableString string];
       

        [serializedForm appendFormat:@"\n<sendSms:FromName>"];
        [serializedForm appendFormat:fromName];
        [serializedForm appendFormat:@"</sendSms:FromName>\n"];
       
        [serializedForm appendFormat:@"<sendSms:FromNumber>"];
        [serializedForm appendFormat:fromNumber];
        [serializedForm appendFormat:@"</sendSms:FromNumber>\n"];
       
        [serializedForm appendFormat:@"<sendSms:ToNumber>"];
        [serializedForm appendFormat:toNumber];
        [serializedForm appendFormat:@"</sendSms:ToNumber>\n"];
       
        [serializedForm appendFormat:@"<sendSms:Message>"];
        [serializedForm appendFormat:message];
        [serializedForm appendFormat:@"</sendSms:Message>\n"];
       
        [serializedForm appendFormat:@"<sendSms:locale>"];
        [serializedForm appendFormat:locale];
        [serializedForm appendFormat:@"</sendSms:locale>"];

       
        return serializedForm;
    }
    /* elements */
    /* attributes */
    - (NSDictionary *)attributes
    {
        NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
       
        return attributes;
    }
    + (sendSms_SendSms *)deserializeNode:(xmlNodePtr)cur
    {
        sendSms_SendSms *newObject = [[sendSms_SendSms new] autorelease];
       
        [newObject deserializeAttributesFromNode:cur];
        [newObject deserializeElementsFromNode:cur];
       
        return newObject;
    }
    - (void)deserializeAttributesFromNode:(xmlNodePtr)cur
    {
    }
    - (void)deserializeElementsFromNode:(xmlNodePtr)cur
    {
       
       
    }
    @end








    @implementation sendSms_SendSmsResponse

    @synthesize statusString;

    - (id)init
    {
        if((self = [super init])) {
        }
       
        return self;
    }
    - (void)dealloc
    {
       
        [super dealloc];
    }
    - (NSString *)nsPrefix
    {
        return @"sendSms";
    }
    - (NSString *)serializedFormUsingElementName:(NSString *)elName
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
        [serializedForm appendFormat:@"<%@ xsi:type=\"sendSms:SendSmsResponse\"", elName];
        [serializedForm appendString:[self serializedAttributeString]];
        [serializedForm appendFormat:@">"];
       
        [serializedForm appendString:[self serializedElementString]];
       
        [serializedForm appendFormat:@"\n</%@>", elName];
       
        return serializedForm;
    }
    - (NSString *)serializedAttributeString
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
       
       
        return serializedForm;
    }
    - (NSString *)serializedElementString
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
       
       
        return serializedForm;
    }
    /* elements */
    /* attributes */
    - (NSDictionary *)attributes
    {
        NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
       
        return attributes;
    }
    + (sendSms_SendSmsResponse *)deserializeNode:(xmlNodePtr)cur
    {
        sendSms_SendSmsResponse *newObject = [[sendSms_SendSmsResponse new] autorelease];
       
        [newObject deserializeAttributesFromNode:cur];
        [newObject deserializeElementsFromNode:cur];
       
        return newObject;
    }
    - (void)deserializeAttributesFromNode:(xmlNodePtr)cur
    {
    }
    - (void)deserializeElementsFromNode:(xmlNodePtr)cur
    {
       
       
        if(xmlStrEqual(cur->name, (const xmlChar *) "SendSmsResponse")){
           
            // In this case we have got the ok answer
            statusString = @"SENT";
           
        } else if (xmlStrEqual(cur->name, (const xmlChar *) "Fault")){
           
            // Something is wrong       
            NSLog(@" bodyNode last prev last content in deserializeElementsFromNode %s", cur->last->prev->last->content);
           
            NSString *tmp = [NSString stringWithFormat:@"%s", cur->last->prev->last->content ];
           
            // Strip out the garbage
            //NSString *tmp1  = [tmp substringToIndex:174];   
            //NSString *tmp2 = [tmp1 substringFromIndex:106];
           
           
            // Strip out the garbage
            NSString *tmp1  = [tmp substringToIndex:174];
           
            NSLog(@" tmp1 %@", tmp1);
           
            NSRange nsr = [tmp rangeOfString:@" at"];
           
            // Remove trailer message after at
            if (nsr.location < 174 ){
           
            tmp1  = [tmp1 substringToIndex:nsr.location];
               
            };
           
            NSLog(@" tmp1 %@", tmp1);

            NSString *tmp2 = [tmp1 substringFromIndex:106];
           
            NSLog(@" tmp2 %@Ò", tmp2);
           
            statusString = [[NSString alloc] initWithString:tmp2 ];
           
        }
       
        if (statusString == NULL){
            statusString = @"UNDEFINED";
        };
       
    }
    @end
    @implementation sendSms
    + (void)initialize
    {
        [[USGlobals sharedInstance].wsdlStandardNamespaces setObject:@"xsd" forKey:@"http://www.w3.org/2001/XMLSchema"];
        [[USGlobals sharedInstance].wsdlStandardNamespaces setObject:@"sendSms" forKey:@"http://FreebieSMS.co.uk"];
    }
    + (sendSmsSoap *)sendSmsSoap
    {
        return [[[sendSmsSoap alloc] initWithAddress:@"http://www.freebiesms.co.uk/sendsms.asmx"] autorelease];
    }
    + (sendSmsSoap12 *)sendSmsSoap12
    {
        return [[[sendSmsSoap12 alloc] initWithAddress:@"http://www.freebiesms.co.uk/sendsms.asmx"] autorelease];
    }
    @end
    @implementation sendSmsSoap
    @synthesize address;
    @synthesize logXMLInOut;
    - (id)init
    {
        if((self = [super init])) {
            address = nil;
            cookies = nil;
            logXMLInOut = NO;
        }
       
        return self;
    }
    - (id)initWithAddress:(NSString *)anAddress
    {
        if((self = [self init])) {
            self.address = [NSURL URLWithString:anAddress];
        }
       
        return self;
    }
    - (void)addCookie:(NSHTTPCookie *)toAdd
    {
        if(toAdd != nil) {
            if(cookies == nil) cookies = [[NSMutableArray alloc] init];
            [cookies addObject:toAdd];
        }
    }
    - (sendSmsSoapResponse *)SendSmsUsingParameters:(sendSms_SendSms *)aParameters
    {
        sendSmsSoap_SendSms *operation = [(sendSmsSoap_SendSms*)[sendSmsSoap_SendSms alloc] initWithBinding:self
            parameters:aParameters
        ];
       
        NSOperationQueue *queue = [[NSOperationQueue new] autorelease];
       
        [queue addOperation:operation];
       
        [queue waitUntilAllOperationsAreFinished];
       
        return operation.response;
    }
    - (NSString *)sendHTTPCallUsingBody:(NSString *)outputBody soapAction:(NSString *)soapAction
    {
        NSMutableDictionary *HTTPHeaders = [NSMutableDictionary dictionary];
        if(cookies != nil) {
            NSDictionary *fCookies = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];
            [HTTPHeaders addEntriesFromDictionary:fCookies];
        }
        [HTTPHeaders setObject:@"http://www.freebiesms.co.uk/sendsms.asmx HTTP/1.1" forKey:@"POST"];
        [HTTPHeaders setObject:@"text/xml;charset=UTF-8" forKey:@"Content-Type"];
        [HTTPHeaders setObject:soapAction forKey:@"SOAPAction"];
        [HTTPHeaders setObject:@"wsdl2objc" forKey:@"User-Agent"];
        [HTTPHeaders setObject:@"www.freebiesms.co.uk" forKey:@"Host"];
        [HTTPHeaders setObject:@"641" forKey:@"Content-Length"];

       
        CFHTTPMessageRef request = CFHTTPMessageCreateRequest(kCFAllocatorDefault, (CFStringRef)@"POST", (CFURLRef)self.address, kCFHTTPVersion1_1);
       
        CFDataRef bodyData = (CFDataRef)[outputBody dataUsingEncoding:NSUTF8StringEncoding];
        CFHTTPMessageSetBody(request, bodyData);
       
        for(NSString *key in [HTTPHeaders allKeys]) {
            CFHTTPMessageSetHeaderFieldValue(request, (CFStringRef)key, (CFStringRef)[HTTPHeaders objectForKey:key]);
        }
       
        NSDictionary *outputHeaders = (NSDictionary*)CFHTTPMessageCopyAllHeaderFields(request);
       
        if(self.logXMLInOut) {
            NSLog(@"OutputHeaders:\n%@", outputHeaders);
            NSLog(@"OutputBody:\n%@", outputBody);
        }
       
        CFReadStreamRef readStream = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, request);
       
        if(!CFReadStreamOpen(readStream)) {
            CFStreamError myErr = CFReadStreamGetError(readStream);
            // An error has occurred.
            if (myErr.domain == kCFStreamErrorDomainPOSIX) {
            // Interpret myErr.error as a UNIX errno.
            } else if (myErr.domain == kCFStreamErrorDomainMacOSStatus) {
            // Interpret myErr.error as a MacOS error code.
                //OSStatus macError = (OSStatus)myErr.error;
            // Check other error domains.
            }
        }
       
        CFReadStreamSetProperty(readStream, kCFStreamPropertyHTTPShouldAutoredirect, kCFBooleanTrue);
       
        //CFHTTPMessageRef resp = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStream, kCFStreamPropertyHTTPResponseHeader);
        //NSString *statusLine = (NSString*)CFHTTPMessageCopyResponseStatusLine(resp);
       
        //NSLog(@"status line %@",statusLine );
       
        NSMutableString *responseBody = [NSMutableString string];
       
        static unsigned int kReadBufSize = 1024;
        CFIndex numBytesRead;
        do {
            UInt8 buf[kReadBufSize];
                numBytesRead = CFReadStreamRead(readStream, buf, sizeof(buf));
           
            if( numBytesRead > 0 ) {
                [responseBody appendString:[[[NSString alloc] initWithBytes:buf length:numBytesRead encoding:NSUTF8StringEncoding] autorelease]];
            } else if( numBytesRead < 0 ) {
                CFStreamError error = CFReadStreamGetError(readStream);
                //[[NSApplication sharedApplication] presentError:(NSError*)error];
                NSLog(@"error %@", error);
            }
        //} while( numBytesRead > 0 );
            sleep(1);
            NSLog(@" rebelotte");
            } while( numBytesRead < 1 );
       
        CFHTTPMessageRef response = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStream, kCFStreamPropertyHTTPResponseHeader);
        NSDictionary *responseHeaders = (NSDictionary*)CFHTTPMessageCopyAllHeaderFields(response);
        [responseHeaders autorelease];
       
        if(cookies) [cookies release];
        cookies = [[NSHTTPCookie cookiesWithResponseHeaderFields:responseHeaders forURL:self.address] mutableCopy];
       
        if(self.logXMLInOut) {
            NSLog(@"ResponseHeaders:\n%@", responseHeaders);
            NSLog(@"ResponseBody:\n%@", responseBody);
        }
       
        return responseBody;
    }
    @end
    @implementation sendSmsSoap_SendSms
    @synthesize binding;
    @synthesize response;
    @synthesize parameters;
    - (id)initWithBinding:(sendSmsSoap *)aBinding
      parameters:(sendSms_SendSms *)aParameters
    {
        if((self = [super init])) {
            response = nil;
           
            self.binding = aBinding;
           
            self.parameters = aParameters;
        }
       
        return self;
    }
    - (void)dealloc
    {
        if(binding != nil) [binding release];
        if(parameters != nil) [parameters release];
       
        [super dealloc];
    }
    - (void)main
    {
        [response autorelease];
        response = [sendSmsSoapResponse new];
       
        sendSmsSoap_envelope *envelope = [sendSmsSoap_envelope sharedInstance];
       
        NSMutableDictionary *headerElements = nil;
        headerElements = [NSMutableDictionary dictionary];
       
        NSMutableDictionary *bodyElements = nil;
        bodyElements = [NSMutableDictionary dictionary];
            if(parameters != nil) [bodyElements setObject:parameters forKey:@"SendSms"];
       
        NSString *operationXMLString = [envelope serializedFormUsingHeaderElements:headerElements bodyElements:bodyElements];
       
        NSLog(@" operationXMLString %@", operationXMLString);
       
        NSString *responseBody = [binding sendHTTPCallUsingBody:operationXMLString soapAction:@"http://FreebieSMS.co.uk/SendSms"];
       
        NSLog(@" sendSmsSoap_SendSms main responseBody %@", responseBody);
       
        xmlDocPtr doc;
        xmlNodePtr cur;
       
        const char *buffer = [responseBody cStringUsingEncoding:NSUTF8StringEncoding];
       
        doc = xmlParseMemory(buffer, [responseBody length]);
       
        NSAssert(doc != NULL, @"Errors while parsing returned XML");
       
        cur = xmlDocGetRootElement(doc);
        cur = cur->children;
       
        for( ; cur != NULL ; cur = cur->next) {
            if(cur->type == XML_ELEMENT_NODE) {
               
                if(xmlStrEqual(cur->name, (const xmlChar *) "Body")) {
                    NSMutableArray *responseBodyParts = [NSMutableArray array];
                   
                    xmlNodePtr bodyNode;
                    for(bodyNode=cur->children ; bodyNode != NULL ; bodyNode = bodyNode->next) {
                        if(cur->type == XML_ELEMENT_NODE) {
                            if(xmlStrEqual(bodyNode->name, (const xmlChar *) "SendSmsResponse") || xmlStrEqual(bodyNode->name, (const xmlChar *) "Fault") ) {
                                sendSms_SendSmsResponse *bodyObject = [sendSms_SendSmsResponse deserializeNode:bodyNode];
                                NSAssert1(bodyObject != nil, @"Errors while parsing body %s", bodyNode->name);
                                [responseBodyParts addObject:bodyObject];
                               
                            } else {
                               
                                NSLog(@" xml str no SendSmsResponse nor Fault %s", bodyNode->name );
                            }
                        }
                    }
                   
                    response.bodyParts = responseBodyParts;
                }
            }
        }
       
        xmlFreeDoc(doc);
       
        xmlCleanupParser();
    }
    @end
    static sendSmsSoap_envelope *sendSmsSoapSharedEnvelopeInstance = nil;
    @implementation sendSmsSoap_envelope
    + (sendSmsSoap_envelope *)sharedInstance
    {
        if(sendSmsSoapSharedEnvelopeInstance == nil) {
            sendSmsSoapSharedEnvelopeInstance = [sendSmsSoap_envelope new];
        }
       
        return sendSmsSoapSharedEnvelopeInstance;
    }
    - (NSString *)serializedFormUsingHeaderElements:(NSDictionary *)headerElements bodyElements:(NSDictionary *)bodyElements
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
        [serializedForm appendFormat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"];
        [serializedForm appendFormat:@"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\n"];
        [serializedForm appendFormat:@"xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xsl:version=\"1.0\"\n"];
        [serializedForm appendFormat:@"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"];
        [serializedForm appendFormat:@"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n"];
        [serializedForm appendFormat:@"xmlns:sendSms=\"http://FreebieSMS.co.uk\""];
        [serializedForm appendFormat:@">\n"];
       
        if(headerElements != nil) {
            [serializedForm appendFormat:@"<soap:Header>\n"];
           
            for(NSString *key in [headerElements allKeys]) {
                id header = [headerElements objectForKey:key];
                NSString *elementName = [NSString stringWithFormat:@"%@:%@", [header nsPrefix], key];
               
                [serializedForm appendFormat:@"%@\n", [header serializedFormUsingElementName:elementName]];
            }
           
            [serializedForm appendFormat:@"</soap:Header>"];
        }
       
        if(bodyElements != nil) {
            [serializedForm appendFormat:@"<soap:Body>\n"];
           
            for(NSString *key in [bodyElements allKeys]) {
                id body = [bodyElements objectForKey:key];
                NSString *elementName = [NSString stringWithFormat:@"%@:%@", [body nsPrefix], key];
               
                [serializedForm appendFormat:@"%@\n", [body serializedFormUsingElementName:elementName]];
            }
           
            [serializedForm appendFormat:@"</soap:Body>\n"];
        }
       
        [serializedForm appendFormat:@"</soap:Envelope>"];
       
        return serializedForm;
    }
    @end
    @implementation sendSmsSoapResponse
    @synthesize headers;
    @synthesize bodyParts;
    - (id)init
    {
        if((self = [super init])) {
            headers = nil;
            bodyParts = nil;
        }
       
        return self;
    }
    @end
    @implementation sendSmsSoap12
    @synthesize address;
    @synthesize logXMLInOut;
    - (id)init
    {
        if((self = [super init])) {
            address = nil;
            cookies = nil;
            logXMLInOut = NO;
        }
       
        return self;
    }
    - (id)initWithAddress:(NSString *)anAddress
    {
        if((self = [self init])) {
            self.address = [NSURL URLWithString:anAddress];
        }
       
        return self;
    }
    - (void)addCookie:(NSHTTPCookie *)toAdd
    {
        if(toAdd != nil) {
            if(cookies == nil) cookies = [[NSMutableArray alloc] init];
            [cookies addObject:toAdd];
        }
    }
    - (sendSmsSoap12Response *)SendSmsUsingParameters:(sendSms_SendSms *)aParameters
    {
        sendSmsSoap12_SendSms *operation = [(sendSmsSoap12_SendSms*)[sendSmsSoap12_SendSms alloc] initWithBinding:self
            parameters:aParameters
        ];
       
        NSOperationQueue *queue = [[NSOperationQueue new] autorelease];
       
        [queue addOperation:operation];
       
        [queue waitUntilAllOperationsAreFinished];
       
        return operation.response;
    }
    - (NSString *)sendHTTPCallUsingBody:(NSString *)outputBody soapAction:(NSString *)soapAction
    {
        NSMutableDictionary *HTTPHeaders = [NSMutableDictionary dictionary];
        if(cookies != nil) {
            NSDictionary *fCookies = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];
            [HTTPHeaders addEntriesFromDictionary:fCookies];
        }
        [HTTPHeaders setObject:@"wsdl2objc" forKey:@"UserAgent"];
        [HTTPHeaders setObject:soapAction forKey:@"SOAPAction"];
       
        CFHTTPMessageRef request = CFHTTPMessageCreateRequest(kCFAllocatorDefault, (CFStringRef)@"POST", (CFURLRef)self.address, kCFHTTPVersion1_1);
       
        CFDataRef bodyData = (CFDataRef)[outputBody dataUsingEncoding:NSUTF8StringEncoding];
        CFHTTPMessageSetBody(request, bodyData);
       
        for(NSString *key in [HTTPHeaders allKeys]) {
            CFHTTPMessageSetHeaderFieldValue(request, (CFStringRef)key, (CFStringRef)[HTTPHeaders objectForKey:key]);
        }
       
        NSDictionary *outputHeaders = (NSDictionary*)CFHTTPMessageCopyAllHeaderFields(request);
       
        if(self.logXMLInOut) {
            NSLog(@"OutputHeaders:\n%@", outputHeaders);
            NSLog(@"OutputBody:\n%@", outputBody);
        }
       
        CFReadStreamRef readStream = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, request);
       
        if(!CFReadStreamOpen(readStream)) {
            CFStreamError myErr = CFReadStreamGetError(readStream);
            // An error has occurred.
            if (myErr.domain == kCFStreamErrorDomainPOSIX) {
            // Interpret myErr.error as a UNIX errno.
            } else if (myErr.domain == kCFStreamErrorDomainMacOSStatus) {
            // Interpret myErr.error as a MacOS error code.
                //OSStatus macError = (OSStatus)myErr.error;
            // Check other error domains.
            }
        }
       
        CFReadStreamSetProperty(readStream, kCFStreamPropertyHTTPShouldAutoredirect, kCFBooleanTrue);
       
        //CFHTTPMessageRef response = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStream, kCFStreamPropertyHTTPResponseHeader);
        //NSString *statusLine = (NSString*)CFHTTPMessageCopyResponseStatusLine(response);
       
        NSMutableString *responseBody = [NSMutableString string];
       
        static unsigned int kReadBufSize = 1024;
        CFIndex numBytesRead;
        do {
            UInt8 buf[kReadBufSize];
            numBytesRead = CFReadStreamRead(readStream, buf, sizeof(buf));
            if( numBytesRead > 0 ) {
                [responseBody appendString:[[[NSString alloc] initWithBytes:buf length:numBytesRead encoding:NSUTF8StringEncoding] autorelease]];
            } else if( numBytesRead < 0 ) {
                //CFStreamError error = CFReadStreamGetError(readStream);
                //[[NSApplication sharedApplication] presentError:(NSError*)error];
            }
        } while( numBytesRead > 0 );
       
        CFHTTPMessageRef response = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStream, kCFStreamPropertyHTTPResponseHeader);
        NSDictionary *responseHeaders = (NSDictionary*)CFHTTPMessageCopyAllHeaderFields(response);
        [responseHeaders autorelease];
       
        if(cookies) [cookies release];
        cookies = [[NSHTTPCookie cookiesWithResponseHeaderFields:responseHeaders forURL:self.address] mutableCopy];
       
        if(self.logXMLInOut) {
            NSLog(@"ResponseHeaders:\n%@", responseHeaders);
            NSLog(@"ResponseBody:\n%@", responseBody);
        }
       
        return responseBody;
    }
    @end
    @implementation sendSmsSoap12_SendSms
    @synthesize binding;
    @synthesize response;
    @synthesize parameters;
    - (id)initWithBinding:(sendSmsSoap12 *)aBinding
      parameters:(sendSms_SendSms *)aParameters
    {
        if((self = [super init])) {
            response = nil;
           
            self.binding = aBinding;
           
            self.parameters = aParameters;
        }
       
        return self;
    }
    - (void)dealloc
    {
        if(binding != nil) [binding release];
        if(parameters != nil) [parameters release];
       
        [super dealloc];
    }
    - (void)main
    {
        [response autorelease];
        response = [sendSmsSoap12Response new];
       
        sendSmsSoap12_envelope *envelope = [sendSmsSoap12_envelope sharedInstance];
       
        NSMutableDictionary *headerElements = nil;
        headerElements = [NSMutableDictionary dictionary];
       
        NSMutableDictionary *bodyElements = nil;
        bodyElements = [NSMutableDictionary dictionary];
            if(parameters != nil) [bodyElements setObject:parameters forKey:@"SendSms"];
       
        NSString *operationXMLString = [envelope serializedFormUsingHeaderElements:headerElements bodyElements:bodyElements];
       
        NSString *responseBody = [binding sendHTTPCallUsingBody:operationXMLString soapAction:@"http://FreebieSMS.co.uk/SendSms"];
       
        xmlDocPtr doc;
        xmlNodePtr cur;
       
        const char *buffer = [responseBody cStringUsingEncoding:NSUTF8StringEncoding];
       
        doc = xmlParseMemory(buffer, [responseBody length]);
       
        NSAssert(doc != NULL, @"Errors while parsing returned XML");
       
        cur = xmlDocGetRootElement(doc);
        cur = cur->children;
       
        for( ; cur != NULL ; cur = cur->next) {
            if(cur->type == XML_ELEMENT_NODE) {
               
                if(xmlStrEqual(cur->name, (const xmlChar *) "Body")) {
                    NSMutableArray *responseBodyParts = [NSMutableArray array];
                   
                    xmlNodePtr bodyNode;
                    for(bodyNode=cur->children ; bodyNode != NULL ; bodyNode = bodyNode->next) {
                        if(cur->type == XML_ELEMENT_NODE) {
                            if(xmlStrEqual(bodyNode->name, (const xmlChar *) "SendSmsResponse")) {
                                sendSms_SendSmsResponse *bodyObject = [sendSms_SendSmsResponse deserializeNode:bodyNode];
                                NSAssert1(bodyObject != nil, @"Errors while parsing body %s", bodyNode->name);
                                [responseBodyParts addObject:bodyObject];
                            }
                        }
                    }
                   
                    response.bodyParts = responseBodyParts;
                }
            }
        }
       
        xmlFreeDoc(doc);
       
        xmlCleanupParser();
    }
    @end
    static sendSmsSoap12_envelope *sendSmsSoap12SharedEnvelopeInstance = nil;
    @implementation sendSmsSoap12_envelope
    + (sendSmsSoap12_envelope *)sharedInstance
    {
        if(sendSmsSoap12SharedEnvelopeInstance == nil) {
            sendSmsSoap12SharedEnvelopeInstance = [sendSmsSoap12_envelope new];
        }
       
        return sendSmsSoap12SharedEnvelopeInstance;
    }
    - (NSString *)serializedFormUsingHeaderElements:(NSDictionary *)headerElements bodyElements:(NSDictionary *)bodyElements
    {
        NSMutableString *serializedForm = [NSMutableString string];
       
        [serializedForm appendFormat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"];
        [serializedForm appendFormat:@"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\n"];
        [serializedForm appendFormat:@"xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xsl:version=\"1.0\"\n"];
        [serializedForm appendFormat:@"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"];
        [serializedForm appendFormat:@"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n"];
        [serializedForm appendFormat:@"xmlns:sendSms=\"http://FreebieSMS.co.uk\"\n"];
        [serializedForm appendFormat:@">\n"];
       
        if(headerElements != nil) {
            [serializedForm appendFormat:@"<soap:Header>\n"];
           
            for(NSString *key in [headerElements allKeys]) {
                id header = [headerElements objectForKey:key];
                NSString *elementName = [NSString stringWithFormat:@"%@:%@", [header nsPrefix], key];
               
                [serializedForm appendFormat:@"%@\n", [header serializedFormUsingElementName:elementName]];
            }
           
            [serializedForm appendFormat:@"</soap:Header>"];
        }
       
        if(bodyElements != nil) {
            [serializedForm appendFormat:@"<soap:Body>\n"];
           
            for(NSString *key in [bodyElements allKeys]) {
                id body = [bodyElements objectForKey:key];
                NSString *elementName = [NSString stringWithFormat:@"%@:%@", [body nsPrefix], key];
               
                [serializedForm appendFormat:@"%@\n", [body serializedFormUsingElementName:elementName]];
            }
           
            [serializedForm appendFormat:@"</soap:Body>\n"];
        }
       
        [serializedForm appendFormat:@"</soap:Envelope>"];
       
        return serializedForm;
    }
    @end
    @implementation sendSmsSoap12Response
    @synthesize headers;
    @synthesize bodyParts;
    - (id)init
    {
        if((self = [super init])) {
            headers = nil;
            bodyParts = nil;
        }
       
        return self;
    }
    @end

    March 29

    "Hello World" Blackberry App



    I read in this month's VSJ that Blackberry are launching a IPhone-esque Appstore called "Blackberry Appworld", So, I went and created a developer account at Blackberry.com, and downloaded the VS2008 plugin.

    I dropped on a button and label onto the form, and clicked the button, and added the code:

    function Form1_btnSayMyName_Click()
    {
        Dialog.display("hello world");
    }

    I ran the project, and then I can now click on the button, and it says "Hello World".

    Now, that's the short version,

    The long version, is that I had to reboot my computer twice, disable my anti-virus, and anti-worm protection, switch to the 8100 emulator, rather than the default, and generally trawl through unhelpful debug information such as this gem:



    Access violation reading from 0x00000008
    January 28

    Web services in PHP

    I was recently asked if .NET webservices could be used from PHP, and the answer is they can.
    Thanks to a toolkit called nusoap (http://sourceforge.net/projects/nusoap/)

    I managed to get the Google Web search webservice working (client3.php)

    Here's the output:

    Result

    Array
    (
    [directoryCategories] => Array
    (
    )

    [documentFiltering] =>
    [endIndex] => 10
    [estimateIsExact] =>
    [estimatedTotalResultsCount] => 19300000
    [resultElements] => Array
    (
    [0] => Array
    (
    [URL] => http://en.wikipedia.org/wiki/Robotics
    [cachedSize] => 124k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => Robotics is the science and technology of robots, and their design, manufacture,
    and application. [1] Robotics has connections to electronics, mechanics, ...
    [summary] =>
    [title] => Robotics - Wikipedia, the free encyclopedia
    )

    [1] => Array
    (
    [URL] => http://www.thetech.org/exhibits/online/robotics/
    [cachedSize] => 9k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => The history and workings of robotics. From the Tech Museum of Innovation.
    [summary] =>
    [title] => The Tech Museum: Robotics: Sensing, Thinking, Acting
    )

    [2] => Array
    (
    [URL] => http://www.thetech.org/robotics/
    [cachedSize] => 9k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => The history and workings of robotics. From the Tech Museum of Innovation.
    [summary] =>
    [title] => The Tech Museum: Robotics: Sensing, Thinking, Acting
    )

    [3] => Array
    (
    [URL] => http://www.arrickrobotics.com/
    [cachedSize] => 10k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => Manufactures and sells mobile robots, stepper motor systems, XY positioning
    tables and automation accessories. General technical information on robots.
    [summary] =>
    [title] => Arrick Robotics - Stepper motor, Positioning, Automation, Mobile ...
    )

    [4] => Array
    (
    [URL] => http://www.robotics.org/
    [cachedSize] => 25k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => Jan 27, 2009 ... Robotics Online - RIA - Robotic Industries Association ... Saint Joseph's
    Launches International College of Robotic Surgery ...
    [summary] =>
    [title] => RIA - Robotics Online - Your #1 Online Resource for Industrial ...
    )

    [5] => Array
    (
    [URL] => http://msdn.microsoft.com/en-us/robotics/default.aspx
    [cachedSize] => 37k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => Microsoft Robotics Developer Studio Standard and Academic Editions have the ...
    Collada Update (Jan 2009) for Microsoft Robotics Developer Studio 2008 ...
    [summary] =>
    [title] => Microsoft Robotics
    )

    [6] => Array
    (
    [URL] => http://www.ri.cmu.edu/
    [cachedSize] => 33k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => Established in 1979 to conduct basic and applied research in robotics
    technologies relevant to industrial and societal tasks. Links to a range of
    specific ...
    [summary] =>
    [title] => The Robotics Institute
    )

    [7] => Array
    (
    [URL] => http://robotics.nasa.gov/
    [cachedSize] => 25k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => A NASA project dedicated to encouraging people to become involved in science and
    engineering, particularly building robots. Visit this website to learn ...
    [summary] =>
    [title] => NASA Robotics - Robotics Alliance Project
    )

    [8] => Array
    (
    [URL] => http://robotics.jpl.nasa.gov/
    [cachedSize] => 30k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => MOBILITY AND ROBOTIC SYSTEMS Richard Volpe, Manager Gabriel Udomkesmalee, Deputy
    Manager.
    [summary] =>
    [title] => JPL Robotics: Home Page
    )

    [9] => Array
    (
    [URL] => http://www.roboticstrends.com/
    [cachedSize] => 19k
    [directoryCategory] => Array
    (
    [fullViewableName] =>
    [specialEncoding] =>
    )

    [directoryTitle] =>
    [hostName] =>
    [relatedInformationPresent] => 1
    [snippet] => News, information, opinion and analysis portal covering the personal, service,
    mobile and military robotics markets.
    [summary] =>
    [title] => Robotics Trends | Robots and Robotics Technology News, Information ...
    )

    )

    [searchComments] =>
    [searchQuery] => robotics
    [searchTime] => 0.437665
    [searchTips] =>
    [startIndex] => 1
    )

    Request

    POST /search/beta2 HTTP/1.0
    Host: api.google.com
    User-Agent: NuSOAP/0.7.3 (1.114)
    Content-Type: text/xml; charset=UTF-8
    SOAPAction: "urn:GoogleSearch"
    Content-Length: 960

    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns6198:doGoogleSearch xmlns:ns6198="urn:GoogleSearch"><Googlekey xsi:type="xsd:string">s06KddJQFHI4ZF25z0a8q7P3bjSGzh74</Googlekey><queryStr xsi:type="xsd:string">robotics</queryStr><startFrom xsi:type="xsd:int">0</startFrom><maxResults xsi:type="xsd:int">10</maxResults><filter xsi:type="xsd:boolean">1</filter><restrict xsi:type="xsd:string"></restrict><adultContent xsi:type="xsd:boolean">1</adultContent><language xsi:type="xsd:string"></language><iencoding xsi:type="xsd:string"></iencoding><oendcoding xsi:type="xsd:string"></oendcoding></ns6198:doGoogleSearch></SOAP-ENV:Body></SOAP-ENV:Envelope>

    Response

    HTTP/1.0 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: 10504
    Date: Wed, 28 Jan 2009 10:50:35 GMT
    Expires: Wed, 28 Jan 2009 10:50:35 GMT
    Cache-Control: private, max-age=0
    Server: GFE/1.3
    Connection: Close

    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="ns1:GoogleSearchResult">
    <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[0]">
    </directoryCategories>
    <documentFiltering xsi:type="xsd:boolean">false</documentFiltering>
    <endIndex xsi:type="xsd:int">10</endIndex>
    <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact>
    <estimatedTotalResultsCount xsi:type="xsd:int">19300000</estimatedTotalResultsCount>
    <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[10]">
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://en.wikipedia.org/wiki/Robotics</URL>
    <cachedSize xsi:type="xsd:string">124k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">&lt;b&gt;Robotics&lt;/b&gt; is the science and technology of &lt;b&gt;robots&lt;/b&gt;, and their design, manufacture, &lt;br&gt; and application. [1] &lt;b&gt;Robotics&lt;/b&gt; has connections to electronics, mechanics, &lt;b&gt;...&lt;/b&gt;</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">&lt;b&gt;Robotics&lt;/b&gt; - Wikipedia, the free encyclopedia</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.thetech.org/exhibits/online/robotics/</URL>
    <cachedSize xsi:type="xsd:string">9k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">The history and workings of &lt;b&gt;robotics&lt;/b&gt;. From the Tech Museum of Innovation.</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">The Tech Museum: &lt;b&gt;Robotics&lt;/b&gt;: Sensing, Thinking, Acting</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.thetech.org/robotics/</URL>
    <cachedSize xsi:type="xsd:string">9k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">The history and workings of &lt;b&gt;robotics&lt;/b&gt;. From the Tech Museum of Innovation.</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">The Tech Museum: &lt;b&gt;Robotics&lt;/b&gt;: Sensing, Thinking, Acting</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.arrickrobotics.com/</URL>
    <cachedSize xsi:type="xsd:string">10k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">Manufactures and sells mobile &lt;b&gt;robots&lt;/b&gt;, stepper motor systems, XY positioning &lt;br&gt; tables and automation accessories. General technical information on &lt;b&gt;robots&lt;/b&gt;.</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">Arrick &lt;b&gt;Robotics&lt;/b&gt; - Stepper motor, Positioning, Automation, Mobile &lt;b&gt;...&lt;/b&gt;</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.robotics.org/</URL>
    <cachedSize xsi:type="xsd:string">25k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">Jan 27, 2009 &lt;b&gt;...&lt;/b&gt; &lt;b&gt;Robotics&lt;/b&gt; Online - RIA - &lt;b&gt;Robotic&lt;/b&gt; Industries Association &lt;b&gt;...&lt;/b&gt; Saint Joseph&amp;#39;s &lt;br&gt; Launches International College of &lt;b&gt;Robotic&lt;/b&gt; Surgery &lt;b&gt;...&lt;/b&gt;</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">RIA - &lt;b&gt;Robotics&lt;/b&gt; Online - Your #1 Online Resource for Industrial &lt;b&gt;...&lt;/b&gt;</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://msdn.microsoft.com/en-us/robotics/default.aspx</URL>
    <cachedSize xsi:type="xsd:string">37k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">Microsoft &lt;b&gt;Robotics&lt;/b&gt; Developer Studio Standard and Academic Editions have the &lt;b&gt;...&lt;/b&gt; &lt;br&gt; Collada Update (Jan 2009) for Microsoft &lt;b&gt;Robotics&lt;/b&gt; Developer Studio 2008 &lt;b&gt;...&lt;/b&gt;</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">Microsoft &lt;b&gt;Robotics&lt;/b&gt;</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.ri.cmu.edu/</URL>
    <cachedSize xsi:type="xsd:string">33k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">Established in 1979 to conduct basic and applied research in &lt;b&gt;robotics&lt;/b&gt; &lt;br&gt; technologies relevant to industrial and societal tasks. Links to a range of &lt;br&gt; specific &lt;b&gt;...&lt;/b&gt;</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">The &lt;b&gt;Robotics&lt;/b&gt; Institute</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://robotics.nasa.gov/</URL>
    <cachedSize xsi:type="xsd:string">25k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">A NASA project dedicated to encouraging people to become involved in science and &lt;br&gt; engineering, particularly building &lt;b&gt;robots&lt;/b&gt;. Visit this website to learn &lt;b&gt;...&lt;/b&gt;</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">NASA &lt;b&gt;Robotics&lt;/b&gt; - &lt;b&gt;Robotics&lt;/b&gt; Alliance Project</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://robotics.jpl.nasa.gov/</URL>
    <cachedSize xsi:type="xsd:string">30k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">MOBILITY AND &lt;b&gt;ROBOTIC&lt;/b&gt; SYSTEMS Richard Volpe, Manager Gabriel Udomkesmalee, Deputy &lt;br&gt; Manager.</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">JPL &lt;b&gt;Robotics&lt;/b&gt;: Home Page</title>
    </item>
    <item xsi:type="ns1:ResultElement">
    <URL xsi:type="xsd:string">http://www.roboticstrends.com/</URL>
    <cachedSize xsi:type="xsd:string">19k</cachedSize>
    <directoryCategory xsi:type="ns1:DirectoryCategory">
    <fullViewableName xsi:type="xsd:string"></fullViewableName>
    <specialEncoding xsi:type="xsd:string"></specialEncoding>
    </directoryCategory>
    <directoryTitle xsi:type="xsd:string"></directoryTitle>
    <hostName xsi:type="xsd:string"></hostName>
    <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
    <snippet xsi:type="xsd:string">News, information, opinion and analysis portal covering the personal, service, &lt;br&gt; mobile and military &lt;b&gt;robotics&lt;/b&gt; markets.</snippet>
    <summary xsi:type="xsd:string"></summary>
    <title xsi:type="xsd:string">&lt;b&gt;Robotics&lt;/b&gt; Trends | &lt;b&gt;Robots&lt;/b&gt; and &lt;b&gt;Robotics&lt;/b&gt; Technology News, Information &lt;b&gt;...&lt;/b&gt;</title>
    </item>
    </resultElements>
    <searchComments xsi:type="xsd:string"></searchComments>
    <searchQuery xsi:type="xsd:string">robotics</searchQuery>
    <searchTime xsi:type="xsd:double">0.437665</searchTime>
    <searchTips xsi:type="xsd:string"></searchTips>
    <startIndex xsi:type="xsd:int">1</startIndex>
    </return>
    </ns1:doGoogleSearchResponse>

    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Debug

    2009-01-28 10:50:55.359379 nusoap_client: ctor wsdl= timeout=0 response_timeout=30
    endpoint=string(34) "http://api.google.com/search/beta2"
    2009-01-28 10:50:55.360128 nusoap_client: instantiate SOAP with endpoint at http://api.google.com/search/beta2
    2009-01-28 10:50:55.361319 nusoap_client: setUseCURL(0)
    2009-01-28 10:50:55.362546 nusoap_client: call: operation=doGoogleSearch, namespace=urn:GoogleSearch, soapAction=urn:GoogleSearch, rpcParams=, style=rpc, use=encoded, endpointType=soap
    params=array(10) {
    ["Googlekey"]=>
    string(32) "s06KddJQFHI4ZF25z0a8q7P3bjSGzh74"
    ["queryStr"]=>
    string(8) "robotics"
    ["startFrom"]=>
    int(0)
    ["maxResults"]=>
    int(10)
    ["filter"]=>
    bool(true)
    ["restrict"]=>
    string(0) ""
    ["adultContent"]=>
    bool(true)
    ["language"]=>
    string(0) ""
    ["iencoding"]=>
    string(0) ""
    ["oendcoding"]=>
    string(0) ""
    }
    headers=bool(false)
    2009-01-28 10:50:55.363275 nusoap_client: serializing param array for operation doGoogleSearch
    2009-01-28 10:50:55.364631 nusoap_client: in serialize_val: name=Googlekey, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=string(32) "s06KddJQFHI4ZF25z0a8q7P3bjSGzh74"
    attributes=bool(false)
    2009-01-28 10:50:55.365308 nusoap_client: serialize_val: serialize string
    2009-01-28 10:50:55.367119 nusoap_client: serialize_val returning <Googlekey xsi:type="xsd:string">s06KddJQFHI4ZF25z0a8q7P3bjSGzh74</Googlekey>
    2009-01-28 10:50:55.368314 nusoap_client: in serialize_val: name=queryStr, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=string(8) "robotics"
    attributes=bool(false)
    2009-01-28 10:50:55.368980 nusoap_client: serialize_val: serialize string
    2009-01-28 10:50:55.370159 nusoap_client: serialize_val returning <queryStr xsi:type="xsd:string">robotics</queryStr>
    2009-01-28 10:50:55.370744 nusoap_client: in serialize_val: name=startFrom, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=int(0)
    attributes=bool(false)
    2009-01-28 10:50:55.371388 nusoap_client: serialize_val: serialize int
    2009-01-28 10:50:55.371939 nusoap_client: serialize_val returning <startFrom xsi:type="xsd:int">0</startFrom>
    2009-01-28 10:50:55.373122 nusoap_client: in serialize_val: name=maxResults, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=int(10)
    attributes=bool(false)
    2009-01-28 10:50:55.373807 nusoap_client: serialize_val: serialize int
    2009-01-28 10:50:55.374378 nusoap_client: serialize_val returning <maxResults xsi:type="xsd:int">10</maxResults>
    2009-01-28 10:50:55.374939 nusoap_client: in serialize_val: name=filter, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=bool(true)
    attributes=bool(false)
    2009-01-28 10:50:55.375600 nusoap_client: serialize_val: serialize boolean
    2009-01-28 10:50:55.376151 nusoap_client: serialize_val returning <filter xsi:type="xsd:boolean">1</filter>
    2009-01-28 10:50:55.376893 nusoap_client: in serialize_val: name=restrict, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=string(0) ""
    attributes=bool(false)
    2009-01-28 10:50:55.377546 nusoap_client: serialize_val: serialize string
    2009-01-28 10:50:55.378117 nusoap_client: serialize_val returning <restrict xsi:type="xsd:string"></restrict>
    2009-01-28 10:50:55.378729 nusoap_client: in serialize_val: name=adultContent, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=bool(true)
    attributes=bool(false)
    2009-01-28 10:50:55.379415 nusoap_client: serialize_val: serialize boolean
    2009-01-28 10:50:55.379966 nusoap_client: serialize_val returning <adultContent xsi:type="xsd:boolean">1</adultContent>
    2009-01-28 10:50:55.380546 nusoap_client: in serialize_val: name=language, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=string(0) ""
    attributes=bool(false)
    2009-01-28 10:50:55.381213 nusoap_client: serialize_val: serialize string
    2009-01-28 10:50:55.381785 nusoap_client: serialize_val returning <language xsi:type="xsd:string"></language>
    2009-01-28 10:50:55.382395 nusoap_client: in serialize_val: name=iencoding, type=, name_ns=, type_ns=, use=encoded, soapval=
    value=string(0) ""



    January 25

    IPhone application out to tender

    We've just put the development of an IPhone application out to tender, at http://www.getafreelancer.com/projects/375783.html

    So, any budding Mac developers who are interested in pitting their skills against the IPhone SDK are welcome to place a bid on GetAFreelancer. Bidding closes in 7 days.

    The full specifications can be seen at:
    http://docs.google.com/Doc?id=dc3k45hc_68s55whbg9

    Using Gliffy to create entity models

    I came across a great little tool, called Gliffy, for creating online diagrams, for example, here's one I made earlier,

    http://www.gliffy.com/publish/1588170/

    Showing a simple database design for a rental website. It was really easy to create, although it's a pitty they have a 30 day limit on
    the free account.


    January 24

    Com Reflection

    I read with interest this month's MSDN magazine article on COM reflection. The article provides an example of using reflection to uncover hidden properties and methods of the Speech library, and also explains how the elusive System.__ComObject can give up its goodies, so to speak.

    It works fine on the sample Speech API DLL on the site, however, it isn't so hot when it comes to Sage. I tried plugging in some common CLSID's from Sage's inner workings, but it gave up no further information. I then tried passing a System.__ComObject to it, with the following code;

    Dim oUnknown As Object = o.GetCompanies("C:\Program Files\Sage\Accounts")
    DumpCOMObject(oUnknown)

    However, it crashed out when IDispatch::GetTypeInfoCount returned 0. According to MSDN reference this is done to prevent run-time inspection of the DLL, perhaps for security purposes.

    So, I guess this is a bit of an anti-pattern when it comes to Sage development, but I hope that this research saves another developer some time when it comes to trying to figure out the million dollar question 'what do I cast this object to now?