473,289 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

SOAPpy / WSDL help... please

I have an Adobe InDesign server running that includes a built-in SOAP
server. The wsdl is located here:
http://www.seanberry.com/IDSP.wsdl.

I have a PHP example that looks like this for calling the SOAP
function runScriptParameters

//---------------------------------------------------------------------------
$scriptArgs = array();
$scriptArgs[] = array("name" ="myVarName", "value" ="myVarValue");
$scriptArgs[] = array("name" ="myVarName2", "value" =>
"myVarValue2");
$runScriptParams = array( "scriptFile" ="/some/path/to/file.jsx",
"scriptArgs" =$scriptArgs, "scriptLanguage" ="javascript");
$scriptData = array("runScriptParameters" =$runScriptParams);
$client = new SoapClient("IDSP.wsdl", $proxy_settings);
$returnedValue = $client->RunScript($scriptData);
//---------------------------------------------------------------------------

This works fine and produces the following as its output XML:
//---------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:ns1="http://ns.adobe.com/InDesign/soap/">
<SOAP-ENV:Body>
<ns1:RunScript>
<runScriptParameters>
<scriptLanguage>javascript</scriptLanguage>
<scriptFile>/some/path/to/file.jsx</scriptFile>
<scriptArgs><name>myVarName</name><value>myVarValue</value></
scriptArgs>
<scriptArgs><name>myVarName2</name><value>myVarValue2</value></
scriptArgs>
</runScriptParameters>
</ns1:RunScript>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---------------------------------------------------------------------------
Now I am writing a client in Python and have tried the following:
//---------------------------------------------------------------------------
#!/usr/bin/python

import SOAPpy

url = "./IDSP.wsdl"

wsdlObject = SOAPpy.WSDL.Proxy(url)
SOAPpy.Config.debug = 1

scriptArgs = []
scriptArgs.append({"name":"myVarName", "value":"myVarValue"})
scriptArgs.append({"name":"myVarName2", "value":"myVarValue2"})
runScriptParams = {}
runScriptParams["scriptFile"] = "/some/path/to/file.jsx"
runScriptParams["scriptLanguage"] = "javascript"
runScriptParams["scriptArgs"] = scriptArgs

result = wsdlObject.RunScript(runScriptParameters=runScript Params)
print result
//---------------------------------------------------------------------------
This errors out and shows the following as the XML.
//---------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<RunScript SOAP-ENC:root="1">
<runScriptParameters>
<scriptArgs SOAP-
ENC:arrayType="ns1:SOAPStruct[2]" xsi:type="SOAP-ENC:Array"
xmlns:ns1="http://soapinterop.org/xsd">
<item>
<name
xsi:type="xsd:string">myVarName</name>
<value
xsi:type="xsd:string">myVarValue</value>
</item>
<item>
<name
xsi:type="xsd:string">myVarName2</name>
<value
xsi:type="xsd:string">myVarValue2</value>
</item>
</scriptArgs>
<scriptLanguage
xsi:type="xsd:string">javascript</scriptLanguage>
<scriptFile xsi:type="xsd:string">/some/
path/to/file.jsx</scriptFile>
</runScriptParameters>
</RunScript>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//---------------------------------------------------------------------------------

This looks wrong first off because of the RunScript node, but also has
those extra "item" nodes for the scriptArgs instead of each being a
scriptArgs node. Can anyone help? I really need to get this working
and would appreciate any pointers anyone can give.

THANKS!!!

Oct 30 '07 #1
1 3883
On Oct 30, 4:10 pm, sberry <s...@buildingonline.comwrote:
I have an Adobe InDesign server running that includes a built-in SOAP
server. The wsdl is located here:http://www.seanberry.com/IDSP.wsdl.

I have a PHP example that looks like this for calling the SOAP
function runScriptParameters

Sorry, I meant that I was trying to run the SOAP function RunScript...
not runScriptParameters like I posted previously.

Thanks for any help.

Oct 31 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vivek | last post by:
Hi, Can anyone provide me with sample code that will allow me to use SOAPpy with a WSDL file using HTTP basic authentication? The only thing I've been able to find on the net is...
0
by: Bartas | last post by:
Hi, I'am writting a simple SOAP client in python (2.4) using SOAPpy lib. I've met with this problem: when I want to send a list of complex type using some method from WebService(java,WAS), ...
0
by: benboals | last post by:
Note: this is in reply to a message from August 2 which i found searching for help on my own problem. I couldn't seem to reply to it, but a friend suggested that simply using the same subject...
0
by: Roy Smith | last post by:
I just got SOAPpy 0.11.6 running under Python 2.3.5. I can do some simple stuff like: from SOAPpy import WSDL wsdlFile = 'http://myserver/soap/XPlanner?wsdl' server = WSDL.Proxy(wsdlFile)...
0
by: Steve | last post by:
Hi All, I have a Python script that uses SOAPpy and I'm outputting all of the methods and info about the parameters... I'm having trouble getting information out of the __init__ parameter. ...
1
by: icius | last post by:
Hello all, I am trying to use a web services API with Python and SOAPpy as a client. Some of the method paramters in this web service's WSDL are asking for an "ArrayOfString" type. Here is my...
0
by: marcello lussana | last post by:
Hi, I'm trying to send some xml data to a WSDL server. Here's my code: xmldata = "<oesystem<user login=\"nekhem\" password=\"one5076\" tpoa=\"\"<message id=\"1\"<textTest di messaggio 1...
0
by: pion | last post by:
Hello I'm trying to make a web service client in python, and so to start out, I found this simple example that are supposed to parse an wsdl file using SOAPPy. I'm using Windows and got SOAPPy...
1
by: Christof Winter | last post by:
I am trying to use a webservice with SOAPpy: import SOAPpy intact_wsdl = "http://www.ebi.ac.uk/intact/binary-search-ws/binarysearch?wsdl" intact_serv = SOAPpy.WSDL.Proxy(intact_wsdl) The...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.