6 Replies Latest reply on Feb 11, 2015 9:30 AM by Eugene Lee

    Are Java libraries available for interfacing with a PI web server, specficially data services?

    jcasillas

      I had come across this article:

      Accessing PI Webservices from Java

       

      But cannot find out how to download or even purchase the libraries from OSISoft referenced in the article!

      Thank you,

      Jose

        • Re: Are Java libraries available for interfacing with a PI web server, specficially data services?
          sdriscoll

          I think there may be a disconnect somewhere so I'm going to give a high-level overview and then feel free to ask specific questions.

           

          There are 2 OSIsoft web service products: PI Web API and PI Web Services.

           

          PI Web API is the newer of the two products and our main focus for future development. It is a REST based web service. PI Web Services is an older product that continues to be maintained but no new functionality is being added, as of right now. It is a SOAP based web service. Assuming you have the necessary license you can download either product from the OSIsoft Technical Support Download Center. Once installed and configured, the web service can be consumed from a variety of different languages.

           

          Thus far everything above is referring to the web service which needs to be installed and exposed on a web server machine. You can get more info from user/install manuals for those products. Continuing the discussion, now we want to create something to consume the web service. You can use an existing external product just to get a feel for what is available (WcfStorm, Postman, modern-day web browsers) or you can program your own client using any programming language that supports consuming a web service. Generally this refers to a programming language that support HTTP requests, but with PI Web Services your not limited by just HTTP.

           

          On to the use of Java to consume a web service (not specific to PI), specifically referring to HTTP requests/responses. There is a lot of information out there but here is a common library for HTTP and an associated SO article with examples,

          org.apache.commons.httpclient

           

           

          Hope that all helps, please let me know if something needs to be clarifies/expanded or any other questions you have.

          • Re: Are Java libraries available for interfacing with a PI web server, specficially data services?
            Eugene Lee

            I have moved this thread to 'Other OSIsoft Technologies' section as it involves more about PI Web Services.