I try simple example from http://dada.pe.kr/464 and I got error.
this is my error:
============ERROR===============
ERROR: Failure: TypeError (Response is "application/soap+xml", not
"text/xml")
==============Controller==================
from turbogears import controllers, expose, flash
from webku import CodeGeass
class Root(controllers.RootController):
codegeass=CodeGeass("http://localhost/codegeass/")
@expose(template="codegeass.templates.welcome")
def index(self):
import time
flash("Your application is now running")
return dict(now=time.ctime())
===========server side (webku.py)=================
from tgwebservices.controllers import WebServicesRoot,WebServicesController,
wsexpose, wsvalidate
from tgwebservices.runtime import typedproperty, unsigned
class Person(object):
name = ''
id = ''
class CodeGeass(WebServicesRoot):
@wsexpose(Person)
@wsvalidate(Person)
def getPerson(self, value):
person = Person()
person.id = value.name
person.name = value.id
return person
==============Client side=================
from CodeGeass_services import *
from CodeGeass_services_types import ns0
loc = CodeGeassLocator()
port = loc.getCodeGeass_PortType()
req = getPersonRequest()
inputMessage = ns0.Person_Def(None, None)
inputMessage._id = "dada"
inputMessage._name = "lulush"
req._value = inputMessage
res = port.getPerson(req)
returnMessage = res._result
print "Result ID:", returnMessage._id
print "Result name:", returnMessage._name
=======================================
this example in korean, so I don't really understand.
can you give me simple example about TGwebservices in server side and client
side? (I hope in english)
thank,
-pauline
2008/9/5 krsyoung <[EMAIL PROTECTED]>
>
> On Sep 5, 11:21 am, "Florent Aide" <[EMAIL PROTECTED]> wrote:
> > On Fri, Sep 5, 2008 at 3:58 PM, pauline <[EMAIL PROTECTED]>
> wrote:
> >
> > > I'm newbie in python and turbogears. Now I have project to make web
> > > using turbogears.
> > > When I try use tgwebservice (server side) and turbozsi (client side),
> > > i got error. I confused, my project is deadline.
> >
> > Maybe the tgwebservices mailing list would be more appropriate to ask
> > this. If you get no answer here try to post in their list:
> >
> > http://groups.google.com/group/turbogears-web-services
> >
> > Florent.
>
> It is also worth reading (again and again) the readme here:
> http://tgws.googlecode.com/svn/trunk/README.txt
>
> I had some troubles implementing it at first too but eventually got it
> to work (with a PHP client). Any chance you can paste the exact error
> you are receiving and a summary of the functions you are trying to
> call?
>
> -Chris
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---