473,379 Members | 1,170 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,379 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 3887
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.