on 03-04-2012 4:23 PM
First of all forgive me as i am very new to this advance web development and this is my first time to study webservices. so please bear with me.
I have managed to create my own webservice and has been successful up to the point of having a WSDL document via soamanager. However when i try to call the webservice, i only able to get the actual WSDL document (XSD or the schema).
I'm trying to use python (Using urllib2) to try to call up on the webservice. On tutorial it mentioned that it is using the URI, but i'm not sure if it is the same as its url shown when you click on 'Open WSDL document for selected binding or service' option but on screenshots it seems to be right.
If I go and test the webservice via SE80, it works and i was able to retrieve data, but one thing noticable is it has sort of XML request parameters like this:
<n0:Ztest xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<Connid>0000</Connid>
<Sflight/>
</n0:Ztest>
on tutorials it never mentioned on this format so i'm not quite sure what this is or where should i do this.
If you can provide some helpful links that would be great. most of the tutorials i found are consuming webservices from abap. I want to learn the other way around.
managed to make it work. so there is no problem in sap side. if your curious (or still not annoyed) i used suds as web service client.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi C Z,
we are currently also trying to use suds from Python to call our own remote capable function module. Could you please show a few lines of example code?
We use as a test case so far:
from suds.client import Client, Method
from suds.transport.http import HttpAuthenticated
def main():
transport = HttpAuthenticated( username="***", password="***" )
client = Client( url, username="***", password="***" )
We fail to see how to call the method/ service afterwards ... Any help really appreciated!
Thanks!
Cheers
Frank
this old but i will answer anyway because maybe somebody will looking for the answer:
from suds.client import Client
url = ' wsdl url here'
client = Client(url, username='***', password="***")
then yo do:
print client
and you will find a line like:
Methods (1):
ZGETDETAILS(ns0:char10 CODENUMBER)
and that name is the name you use for call the service , example:
client.service.ZGETDETAILS('CodeNumber'ValueHere)
Hi,
if you want to consume ABAP functionality from Python, you can skip web services and call ABAP RFCs directly. It could be easier and faster - see following examples
http://scn.sap.com/community/scripting-languages/blog/2012/11/20/calling-python-from-erp-with-pyrfc
Regards,
srdjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.