In [1]:
from SoapProxy import models, utils
In [2]:
obj = models.ProxyService.objects.all()[0]
obj.soap()
obj.methods
print obj.methods
In [5]:
from suds.plugin import MessagePlugin
from suds.client import Client
class LogPlugin(MessagePlugin):
def sending(self, context):
print(str(context.envelope))
print("\n\n\n\n")
def received(self, context):
print(str(context.reply))
print("\n\n\n\n")
cli = Client("http://www.webservicex.net/stockquote.asmx?WSDL")
res = cli.service.GetQuote(symbol="ORC")
print cli.last_sent()
print cli.last_received()
In [16]:
import xml.dom.minidom
mxml = xml.dom.minidom.parseString(str(cli.last_sent()))
mxml.toprettyxml()
Out[16]:
In [12]:
url = "http://10.192.224.5:7006/DealerServices_SB/ProxyServices/DealerOnlinePaymentProxy?wsdl"
In [13]:
from SoapProxy.utils import SoapClient
client = SoapClient(wsdl=url)
In [14]:
client.ToJson()
Out[14]:
In [15]:
out = client.GetMethods()
In [16]:
out[0]["inputs"]
Out[16]:
In [6]:
res = client.call(name='ReadVIP',params = {'msisdn': '96566361918'})
In [7]:
print res
In [11]:
client.client.service.ReadVIP(msisdn='965')
Out[11]:
In [2]:
from django.shortcuts import redirect
redirect('soapview', wsdlurl="hello")
Out[2]:
In [3]:
print redirect('soapview', wsdlurl="hello")
In [1]:
from django.core.urlresolvers import reverse
reverse("soapresponse")
Out[1]:
In [ ]: