about UndefinedService

Asked by romankrv on 2011-07-27

Hi again.

i have code:

def auth(username, password):
    try:
        user = authenticate(username=username, password=password)
    except:
        pass

class MyGateway(object):
    """
    Service for customers of TaleoGateway that provides some methods ...
    """
    @ladonize(unicode, unicode, rtype=unicode)
    def test_login(self, username, password):
        #Try authentication via django auth-module
        auth(username, password)
        return "Hello %(username)s. You are user as active= " % locals()

when i try this via client python-shell it work:

but when i run this via soap it return in web-browser next messages:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ladon/server/wsgi_application.py", line 241, in __call__
    raise UndefinedService(ifname,'Service "%s" has not been exposed' % sname)
UndefinedService: Service "soap" has not been exposed

but in trace server show as:
localhost.localdomain - - [27/Jul/2011 16:12:25] "POST //soap HTTP/1.1" 200 272

What is problem with that. UndefinedService: Service "soap" has not been exposed
what need to added to my code for fix ?

Thanks !

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
jsgaarde Edit question
Last query:
2011-07-27
Last reply:
2012-01-10
jsgaarde (jakob-simon-gaarde) said : #1

When you access a ladon application you control which service and protocol to access via the URL.

So if your Ladon application root URL is http://mydomain.com/ladonservice and you have a service called MyGateway then this service is accessed with the URL:
http://mydomain.com/ladonservice/MyGateway

Accessing this service via the SOAP protocol is via the URL:
http://mydomain.com/ladonservice/MyGateway/soap

It seems like your SOAP client is trying to access a service using the URL:
http://mydomain.com/ladonservice/soap

UndefinedService: Service "soap" has not been exposed
The exception you are getting actually says that ;-)

Best regards
Jakob Simon-Gaarde

jsgaarde (jakob-simon-gaarde) said : #2

Hi Romankrv.
Can you give this a closing status?
Best Regards
Jakob Simon-Gaarde

jsgaarde (jakob-simon-gaarde) said : #3

I'm closing this one