1 Reply Latest reply on Jun 3, 2014 8:11 PM by Yanick Girouard

    Web Services access

      Hi all:


      Recently the web services were enabled in the preproduction enviroment. We are trying to write some code in Python in order to do some administrative tasks, and we need to execute blclis. We implemented blcli executing via JLI and now we are trying to implement it via web services.

      For convenience reasons the web services implementation is going to be Python-based. So I'm trying to make a library for that web services management.


      As far as I understand, the procedure should go as follows;


      1. Login against the appserver.
      2. Role assumption.
      3. BLCLI execution.


      If i access via browser to




      the following message does appear


      Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml


      what does that mean? Even I'm trying to use SOAP (because of blcli compatibility)


      I tried to use suds (suds) library, with the following code:


      from suds.client import Client
      url = 'https://our_appserver:9843/services/BSALoginService.wsdl'
      client = Client(url)
      d = dict(http='our_proxy:8080', https='our_proxy:8080')


      and I get the following error:


      Traceback (most recent call last):
        File "C:/dev/atf_dev_x86/wkspaces/PRB_Python_Libs/PRB_Python_Libs.py", line 42, in <module>
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\client.py", line 542, in __call__
          return client.invoke(args, kwargs)
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\client.py", line 602, in invoke
          result = self.send(soapenv)
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\client.py", line 637, in send
          reply = transport.send(request)
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\transport\https.py", line 64, in send
          return  HttpTransport.send(self, request)
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\transport\http.py", line 77, in send
          fp = self.u2open(u2request)
        File "C:\dev\atf_dev_x86\software\python_2.7_virtualenvs\atf_virtualenv\lib\site-packages\suds\transport\http.py", line 118, in u2open
          return url.open(u2request, timeout=tm)
        File "C:\dev\atf_dev_x86\software\Portable_Python_2.7.6.1\App\Lib\urllib2.py", line 404, in open
          response = self._open(req, data)
        File "C:\dev\atf_dev_x86\software\Portable_Python_2.7.6.1\App\Lib\urllib2.py", line 422, in _open
          '_open', req)
        File "C:\dev\atf_dev_x86\software\Portable_Python_2.7.6.1\App\Lib\urllib2.py", line 382, in _call_chain
          result = func(*args)
        File "C:\dev\atf_dev_x86\software\Portable_Python_2.7.6.1\App\Lib\urllib2.py", line 1222, in https_open
          return self.do_open(httplib.HTTPSConnection, req)
        File "C:\dev\atf_dev_x86\software\Portable_Python_2.7.6.1\App\Lib\urllib2.py", line 1184, in do_open
          raise URLError(err)
      urllib2.URLError: <urlopen error Tunnel connection failed: 503 Service Unavailable>


      our_appserver, our_proxy, my_user, my_password are renamed for security reasons.


      Thanks for your time.