Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SOAPpy / WSDL help... please

Reply
Thread Tools

SOAPpy / WSDL help... please

 
 
sberry
Guest
Posts: n/a
 
      10-30-2007
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/"
xmlnssi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlnssd="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!!!

 
Reply With Quote
 
 
 
 
sberry
Guest
Posts: n/a
 
      10-31-2007
On Oct 30, 4:10 pm, sberry <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAPpy WSDL problem: namespace of schema and import match error Christof Winter Python 1 07-28-2008 04:15 PM
SOAPpy, WSDL and objects Bob.Capa@gmail.com Python 1 03-08-2006 07:21 PM
SOAPpy SOAP and/or WSDL Question Rodney Python 0 12-04-2005 04:08 AM
SOAPpy, WSDL, non-standard types and my graying hair Miki Tebeka Python 0 10-11-2005 08:52 AM
SOAPpy and WSDL and basic authentication Vivek Python 0 08-04-2004 12:51 AM



Advertisments