{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2009/03/14/autogenerating-cml-bindings-for-xmpp.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/et43s-kc120",
      "url": "https://chem-bla-ics.linkedchemistry.info/2009/03/14/autogenerating-cml-bindings-for-xmpp.html",
      "title": "Autogenerating CML bindings for XMPP services with XMLBeans",
      "content_html": "<p>I blogged earlier about our efforts to create a better <a href=\"http://en.wikipedia.org/wiki/SOAP\">SOAP</a>\nservice architecture, based on <a href=\"http://en.wikipedia.org/wiki/Jabber\">XMPP</a>:</p>\n\n<ul>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2009/01/21/details-behind-calling-xmpp-cloud.html\">Details behind the “Calling XMPP cloud services from Taverna2” <i class=\"fa-solid fa-recycle fa-xs\"></i></a></li>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2009/01/19/calling-xmpp-cloud-services-from.html\">Calling XMPP cloud services from Taverna2 <i class=\"fa-solid fa-recycle fa-xs\"></i></a></li>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2008/10/31/next-generation-asynchronous.html\">Next generation asynchronous webservices <i class=\"fa-solid fa-recycle fa-xs\"></i></a></li>\n</ul>\n\n<p>So, I set up XMPP services for QSAR descriptor calculation, 2D diagram and 3D geometry\ncalculations and a few more, using the <a href=\"http://cdk.sf.net/\">CDK</a>.\n<a href=\"http://en.wikipedia.org/wiki/Chemical_Markup_Language\">Chemical Markup Language</a> has been my\nprimary choice for some 10 years now (see <a href=\"http://wwmm.ch.cam.ac.uk/blogs/murrayrust/?p=1241\">Peter’s blog</a>)\nas it allows me to do things I cannot do in other formats.</p>\n\n<p>Now, our XMPP services publish themselves what data types the allow as input and what they output\nin return. They do this by publishing XML Schema to describe the input and output types. My CDK\nservices use CML, so they return the CML schema. Johannes’ <a href=\"http://xws4j.sourceforge.net/\">xws4j</a>\nimplementation of the <a href=\"http://xmpp.org/extensions/xep-0244.html\">IO-DATA</a>\nspecification has an add on that can build bindings to the schema on the fly. Now, CML comes with\na good <a href=\"http://www.xom.nu/\">XOM</a>-based binding (called <a href=\"http://wwmm.ch.cam.ac.uk/maven2/cml/cmlxom/\">CMLXOM</a>)\nso this is not strictly necessary, but for less common schemata it is worthwhile: you can always\ncreate bindings for brand new schemata, for older versions, for whatever. Services can even\ncreate their own local schemata, and people will still be able to easily use them. This is to me\na big plus for this architecture.</p>\n\n<p>Anyway, while CMLXOM exists, we wanted to show that the on-the-fly creation of bindings works,\neven for large schemata, such as CML. However, one of the older flavours had an small error in a\nregular expression in a data type CML defines. Johannes therefore asked me to test building\nbindings for the CML schema version used in my services. He adviced me to use scomp for this,\nwhich is a command line utility around the <a href=\"http://xmlbeans.apache.org/\">XMLBeans</a>\nlibrary used for the binding generation.</p>\n\n<p>As I am running <a href=\"http://www.ubuntu.com/\">Ubuntu</a>, I preferred installing\n<a href=\"http://packages.ubuntu.com/jaunty/libxmlbeans-java\">the packaged version</a> instead of installing\nthe binary provided by XMLBeans. Now, after I did this, I noticed that this .deb did not install\nthe scomp utility, so I filled a <a href=\"https://bugs.launchpad.net/ubuntu/+source/xmlbeans/+bug/342349\">wishlist bug report</a>.\nEarlier this week I already encountered another bug, but this package being Java, I had a good\nidea on how to fix the bug.</p>\n\n<p>And so I implemented my own wishlist. I’m sure there is room for improvement, as my .deb\npackaging skills are a bit rusty (a very long time ago I have been in the Debian New Maintainers\nqueue, but by the time they solved the long queue delays, I was too occupied with other things.\nYes, this was a long time ago already :). Anyway, Ubuntu’s <a href=\"http://launchpad.net/\">LaunchPad</a>\nhas a nice feature, called the <a href=\"http://launchpad.net/ubuntu/+ppas\">Personal Package Archives</a>.\nThis service will, after I have finished hacking on the packaging specs in the famous <em>debian/</em>\nfolder and tested the <em>.debs</em> build from it, will rebuild it and put the resulting package up for\ndownload.</p>\n\n<p>Conclusion: a perfect opportunity to finally gives this a try. The learning curve was\nsurprisingly shallow, and the result can be seen in <a href=\"https://launchpad.net/~egonw/+archive/ppa\">my personal package archive</a>:</p>\n\n<p><img src=\"/assets/images/ppa.png\" alt=\"\" /></p>\n\n<p>Now, you can easily imagine that I will soon work on packaging stuff I did in the past too, such\nas update <a href=\"http://packages.ubuntu.com/jaunty/libcdk-java\">libcdk-java</a> and now that OpenJDK in\nmain can run <a href=\"http://www.jmol.org/\">Jmol</a> reasonably, finally package Jmol for main. I just hope\nI remember my <a href=\"http://alioth.debian.org/\">Alioth</a> account, so that I can properly contribute to\nthe <a href=\"http://alioth.debian.org/projects/debichem/\">debichem</a> project.</p>\n\n<p>Getting back to running <em>scomp</em> on the CML scheme, it works with one minor problem:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>scomp <span class=\"nt\">-src</span> <span class=\"nb\">.</span> <span class=\"nt\">-d</span> <span class=\"nb\">.</span>  cml.xsd\n/home/egonw/tmp/cml/cml.xsd:10098:9: warning: p-props-correct.2.2: maxOccurs must be greater than or equal to 1.\nTime to build schema <span class=\"nb\">type </span>system: 1.792 seconds\nTime to generate code: 3.297 seconds\nTime to compile code: 9.658 seconds\n</code></pre></div></div>\n\n<p>The problem is reflected by line 10098 which goes like:</p>\n\n<div class=\"language-xml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nt\">&lt;xsd:sequence</span> <span class=\"na\">minOccurs=</span><span class=\"s\">\"0\"</span> <span class=\"na\">maxOccurs=</span><span class=\"s\">\"0\"</span><span class=\"nt\">&gt;</span>\n</code></pre></div></div>\n\n<p>which can be traced down to line 23 in <a href=\"http://cml.svn.sf.net/viewvc/cml/schema2/trunk/elements/tableHeaderCell.xsd?revision=161&amp;view=markup\">schema2/trunk/elements/tableHeaderCell.xsd</a>.\nI filled a <a href=\"https://sourceforge.net/tracker2/?func=detail&amp;aid=2686810&amp;group_id=51361&amp;atid=463005\">bug report about this</a>.</p>",
      "summary": "I blogged earlier about our efforts to create a better SOAP service architecture, based on XMPP:",
      "image": "https://chem-bla-ics.linkedchemistry.info/assets/images/ppa.png",
      "date_published": "2009-03-14T00:00:00+00:00",
      "date_modified": "2025-11-29T00:00:00+00:00",
      "tags": ["cml","java","ubuntu","xml","xmpp"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
