16 Replies Latest reply on Dec 13, 2011 3:42 PM by MvanderVeeken

    Silverlight + PI Web Services Example

    Lonnie Bowling

      Hi Everyone,

       

      Attached is the project I built during my presentation at vCampus live.  For those that were there I hope you enjoyed it and were able to follow along. To get this example working you are going to need PI Web Services installed on a server and connected to a PI data source.  The video of my walk-through is going to be posted soon so look for it.  If you have problems getting this to work feel free to post here and I will try and help.

       

      Lonnie

       

      PS:  It was so cool to meet everyone and I had a great time!

        • Re: Silverlight + PI Web Services Example
          Ahmad Fattahi

          Thanks Lonnie this is quick!

           

          Glad you had a good time and hope to see you next year, same time, same place for vCampus Live! 2011

          • Re: Silverlight + PI Web Services Example

            Thanks for presenting at the event and for posting this so rapidly! I am sure other people learned a lot from your session (and hopefully you got to learn a lot yourself throughout the rest of the conference!).

             

            It was good to see you there, and I hope to have the chance to meet even more of you guys next year!

              • Re: Silverlight + PI Web Services Example
                MichaelvdV@Atos

                Lonnie, thanks for your great presentation and example. I think a lot of members can get started using this information. I was a bit suprised by the interest for Silverlight tough, because it seems there is not a lot of attention for it on the vCampus forum...

                 

                I think you have succesfully demistified Silverlight .

                 

                 

                  • Re: Silverlight + PI Web Services Example
                    Lonnie Bowling

                    Michael @ Atos Origin

                    Lonnie, thanks for your great presentation and example. I think a lot of members can get started using this information. I was a bit suprised by the interest for Silverlight tough, because it seems there is not a lot of attention for it on the vCampus forum...

                     

                    I think you have succesfully demistified Silverlight .

                     

                    Thanks Michael, I'm really gald that my goal was accomplished.  I was a bit suprised also by the response and interest in Silverlight, maybe it is just starting to take hold and we will see more here on the boards!  It was great meeting you and getting to talk some!

                • Re: Silverlight + PI Web Services Example
                  Rick Davin

                  Lonnie,

                   

                  Thanks for the great presentation at Vcampus Live! and sharing here.  I attended your presentation and felt it was one of the better ones.  It had a nice flow and rhythm to keep interest for the whole 45-minutes, and it wasn't too grand or ambitious in scale to lose the audience.  And most importantly, you didn't just simply present mechanical steps but included the critical "Why" you were doing something.  Good job,

                   

                  Rick Davin
                  2-time attendee of Vcampus Live!

                   

                   

                    • Re: Silverlight + PI Web Services Example
                      andreas

                      Lonnie,

                       

                      great presentation indeed. Hope you will present next year as well!

                        • Re: Silverlight + PI Web Services Example
                          Lonnie Bowling

                          Andreas

                          Lonnie,

                          great presentation indeed. Hope you will present next year as well!

                           

                          Hey Andreas, it was great meeting you and thanks!  I have already been thinking about the next one (if I get the honor of presenting again), maybe something moble, like PI Web Services + Windows Phone 7 + Silverlight, I think that would be really cool!

                           

                          Lonnie

                            • Re: Silverlight + PI Web Services Example
                              AlistairFrith

                              Hi Lonnie,

                               

                              I am trying to get this KPIDemo example working and I keep getting the error:

                               

                              CommunicationException was unhandled by user code

                               

                              An error occurred while trying to make a request to URI 'http://10.0.11.215:1080/PIWebServices/PITimeSeries.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

                               

                              Can you offer any help on this (in words of 2 syllables or less 'cos I'm a bit thick!)? I think the clientaccesspolicy.xml is correct but I could be wrong!

                               

                              --- Alistair.

                               

                               

                               

                               

                                • Re: Silverlight + PI Web Services Example
                                  MvanderVeeken

                                  The first things you want to check are:

                                  1. Make sure your service is available by browsing to 'http://10.0.11.215:1080/PIWebServices/PITimeSeries.svc'
                                  2. Make sure your clientaccesspolicy.xml is available by browsing to 'http://10.0.11.215:1080/clientaccesspolicy.xml'
                                  3. Make sure you have the correct bindings defined (basicHttpBinding) in your web.config of PIWebservices.
                                    • Re: Silverlight + PI Web Services Example
                                      AlistairFrith

                                      1. Yes, so long as I drop the ":1080". If I include that then I just get an "Unable to connect" message.

                                       

                                      2. Yes, again only if I do not include ":1080" in the address. Here's the contents of the file:

                                       

                                      <access-policy><cross-domain-access><policy><allow-from http-request-headers="SOAPAction"><domain uri="*"/></allow-from><grant-to><resource path="/" include-subpaths="true"/></grant-to></policy></cross-domain-access></access-policy>

                                       

                                      3. Yes:

                                       

                                        <bindings>
                                          <basicHttpBinding>
                                            <binding name="basicBindingConfig">
                                            </binding>
                                          </basicHttpBinding>
                                          <wsHttpBinding>
                                            <binding name="wsBinding" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
                                              <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
                                              <security mode="Message">
                                                <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
                                              </security>
                                            </binding>
                                          </wsHttpBinding>
                                          <mexHttpBinding>
                                            <binding name="mexBinding" />
                                          </mexHttpBinding>
                                        </bindings>

                              • Re: Silverlight + PI Web Services Example
                                Lonnie Bowling

                                Rick Davin

                                Lonnie,

                                Thanks for the great presentation at Vcampus Live! and sharing here.  I attended your presentation and felt it was one of the better ones.  It had a nice flow and rhythm to keep interest for the whole 45-minutes, and it wasn't too grand or ambitious in scale to lose the audience.  And most importantly, you didn't just simply present mechanical steps but included the critical "Why" you were doing something.  Good job,

                                 

                                Rick Davin
                                2-time attendee of vCampus Live!

                                 

                                Hi Rick, thanks for the feedback, I'm so happy you liked it, I had a lot of fun doing it and worked really hard to make sure I was prepared.  I wanted to show more than just the steps and help others as much as I could based on what I have learned.  I really wanted to keep it simple and try not to lose anyone along the way.

                                 

                                See you at the vCampus!

                                 

                                Lonnie