5 Replies Latest reply on Apr 26, 2013 2:43 PM by Bhess

    PI WebService and WP7

    drausim127@spiratec

      Hi All,

       

      I have read a "Hands-On Lab" document (vCampus Live 2012) with the name "PI Data Access meets PI Event Frames" in particular the part "PI Web Service and Windows Phone 7". I have tried to rebuild this example but without any success.

       

      Does anybody know if the sourcecode is available for this example. Or is there another more detailed instruction availble regarding PI Web Service and Windows Phone 7?

       

      Best regards

       

      Markus

        • Re: PI WebService and WP7
          Bhess

          We did a similar example as a webinar on vCampus last year.  The video and source is available here, which should help you get started:

           

          vcampus.osisoft.com/.../18217.aspx

            • Re: PI WebService and WP7
              drausim127@spiratec

              Thank you very much for this link.

               

              I have tried to open this .NET project but without any success. I always get a error message that "EventFramesInWP7.csproj cannot be opened" and that a "silverlight for phone project" is missing. I think I have a problem with my environment. Is something other then "VS2010 for Phone" necessary for this?

               

              I have also tried to rebuild this project in a separate windows phone project but when I add a Service Reference no code will be automatically generated (Refernce.cs, no Bindings, ...).

               

              If you have a short and easy idea how to solve this problem please let me know otherwise thank you very much for your help.

                • Re: PI WebService and WP7
                  Bhess

                  Markus,

                   

                  Are you trying to open the csproj or the sln file?  I'm not able to reproduce your problem when opening the solution file on a fresh install of VS2010 for Windows Phone.  Perhaps you might try repairing your installation of the Windows Phone SDK if this doesn't do the trick.

                   

                  Brad

                    • Re: PI WebService and WP7
                      drausim127@spiratec

                      Hi Brad,

                       

                      I have made a new installation of Visual Studion for Windows Phone and now I can open the Soultion file. I have made different changes in the project (replace PIWSEventFrames by PIWSSoap) and now it looks good with one exception. When I start searching for event frames I always get the following error message: Content type text/xml; charset=utf-8 was not supported by service PISoap.svc. I found out that this is an error regarding SOAP 1.1 and SOAP 1.2. Do you have any idea how I can solve this issue?

                       

                      Best regards Markus

                        • Re: PI WebService and WP7
                          Bhess

                          Markus,

                           

                          This likely has something to do with an inconsistency in the way you have your WCF bindings specified on your client and your server.  Based on the error message, it looks like your client is using a SOAP 1.1 binding (basicHttpBinding) and your server is expecting a SOAP 1.2 binding.  The quickest fix is usually to update the Service Reference on your client in Visual Studio; though I'll admit that sometimes this doesn't work quite right, in which case deleting and re-adding the Service Reference is usually the answer.  If you're interested in digging into the guts of the WCF configuration, you can also manually modify the binding information in your client's app.config.

                           

                          Brad