using https://bse.pnl.gov/axis/services/BseService?wsdl


Just Got Here
I'm trying to use this service in c#. I was able to generate a service reference to the service (which I'd be glad to upload, it took some fiddling to get it to work in c#), but when I call the service I get the following exception:

Request not allowed from host.

I've created the BseService object, I've called its Open method successfully, just when I ask to read a basis set I'm not allowed. Do I need a certificate? Do I need a login other than the portal login?


Thanks all for any help or advice you're able to give. You can contact me at lnardozi at gmail dot com, at 850-497-2855 or through the forum.


Louis Nardozi

Gets Around
You are not the first person to encounter problems. See for example this thread: http://nwchemgit.github.io/Special_AWCforum/st/id1015

It is stated in that thread "we haven't yet written something that would allow you to access the BSE in this way."

But according to this message the web services interface should let you pull data from the exchange: http://ccl.net/chemistry/resources/messages/2013/11/25.004-dir/index.html

The system is described in

Basis Set Exchange: A Community Database for Computational Sciences
Karen L. Schuchardt, Brett T. Didier, Todd Elsethagen, Lisong Sun, Vidhya Gurumoorthi, Jared Chase, Jun Li, and Theresa L. Windus
J. Chem. Inf. Model.
2007, 47 (3), pp 1045–1052
DOI: 10.1021/ci600510j

From the paper it appears that programmatic access was intended in the very way you are attempting it.

"The main capabilities of downloading and contributing basis sets are implemented as Web services enabling some important usage scenarios: dynamic access to basis sets by environments such as the Extensible Computational Chemistry Environment, GridChem, or the E-Science effort in the United Kingdom, and bulk downloads of the latest and best values for inclusion with the release of a variety of computational codes. By providing these capabilities, we are encouraging the development of a single comprehensive community database since both users and software tools have ready access to the latest, best data at any time. The Web service interfaces are documented in the interface definition document at http://purl.oclc.org/net/emsl/bse/services. As an example, the methods support querying for the names of available basis sets and then requesting individual basis sets by name."

This isn't the first SOAP service I've written code for, but it doesn't appear to work (as you have already experienced).

Here's a short attempt in Python. The getGaussianCatalog method doesn't take any arguments so it should be dead simple.

from SOAPpy import WSDL

class BSEInterface(object):
    def __init__(self):
        wsdl = "https://bse.pnl.gov/axis/services/BseService?wsdl"
        self.server = WSDL.Proxy(wsdl)

    def call(self, method_name, *args):
        m = getattr(self.server, method_name)
        result = m(*args)
        return result

if __name__ == '__main__':
    B = BSEInterface()
    catalog = B.call('getGaussianCatalog')
    print catalog


I got an error back from the test code:

SOAPpy.Types.faultType: <Fault soapenv:Server.userException: java.rmi.RemoteException: Request not allowed from host: <SOAPpy.Types.structType detail at 139695836778224>: {'hostname': 'gnode2'}>


So there's some Java RMI working behind the scenes, and it's not allowing a request from the host 'gnode2'. The Basis Set Exchange public URL used to be http://gnode2.pnl.gov/bse/portal. This is just a shot in the dark, but maybe as host names changed over the years the Java RMI code didn't update its allowed hosts to match changing host names. Or maybe the API never worked. I can't find any historical examples of an application or library accessing the BSE programmatically even though that was an explicit use case given in its published description.


Forum >> BSE: Basis Set Exchange >> General BSE Topics