Richard June/SOAPjs

Views
From Brave GNU World
< Richard June
Revision as of 13:37, 4 November 2009 by Rjune (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

SOAPjs

JavaScript

SOAPjs is a library to ease SOAP development in javascript. It was based off SOAPclient, but we rewrote major portions of that library to correct serialization of complex objects and provide the groundwork for RPC chaining. The example WSDL file is available for comparison. Asynchronous use is no longer supported as a function option, but rather done through closures.

wsdldoc

wsdldoc is a python program to generate documentation based on a WSDL file. It does not provide the best documentation, *but* if your WSDL file is properly written, it should at least generate a useful reference for an experienced programmer. It requires PyXML.
cat WSDLFILE | wsdldoc > DOCFILE will create DOCFILE in HTML format. Here is a sample wsdldoc documentation file
  • 0.4 Release - No library updates, just added some documentation and simple calculator example.
  • 0.3 Release - Minor update, added a demonstration proxy server to consume SOAP resources anywhere. Added get/set Proxy functions to configure the address of the SOAP server. Additionally I have started work on a simple calculator application as a more complete demonstration / use case.
  • 0.2 Updated Release - Fixed and packaged SOAPjs a bit better. I now have a working demonstration of SOAPjs. Additionally, I fixed a bug that gSOAP ignores but PHP's SOAP server flips out over.
  • 0.1 Initial Release - This is the first release of SOAPjs, Undoubtedly there are things incorrectly documented or unfortunately tagged. Please email Richard June with any problems.

Downloads

SOAPjs downloads - Download files from Sourceforge

Forums

SOAPjs forums - Go here to get help

Examples

<html>
  <head>
    <title>SOAP.js example</title>
    <script language="javascript" type="text/javascript" src="soap.js"></script>
    <script language="javascript" type="text/javascript">
      /*
       * A simple example that loads a WSDL file then prints a list of
       *   services obtained from the server.
       */
      wsdl.netstats = new WSDL.parser;
      var url = location.protocol + "//" + location.hostname + ":" + location.port + "/soap_server/server.php";
      function getIfListCB(r) {
        if((r.result == undefined) && r.result.success == false ) {
          return;
        }
        var i;
        alpha = r;
        var sl = r.result.ifList
        for (i = 0; i < sl.length; i++) {
          document.write(sl[i] + "<br>");
        }
      }

      function getInterfacesButton() {
        wsdl.netstats.getIfList("", getIfListCB).run();
      }
      wsdl.netstats.loadWsdl("netstats", "netstats.wsdl");
    </script>
  </head>
  <body>
  <input type="submit" value="Get Interfaces" onclick="getInterfacesButton();">
  </body>
</html>


Utilities

BGW Tools
Social Links
Personal tools