0

I have Xubuntu 16.04 as a Host machine and i am running Windows 7 on VirtualBox. On the Windows machine i have Developer version Adobe InDesign 2014 Server. I am calling a simple test script with generated files (java classes for InDesign WSDL) and with Axis 1.4 but i got the following error.

Caused by: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at localhost.Service_wsdl.ServiceStub.runScript(ServiceStub.java:305)

Debugging in it deeper i also find an error AxisFault faultCode: Server.userException. The whole situation is strange, because before i had Xubuntu 14.04 and i guess an earlier version of VBox, but everything went well. I'm stuck with this for 2 month now. I cannot see what was the difference between the previous system and my current.

We have a simple test to see if IDS is running and working. We call a Ping test from Java with the following JavaScript code:

var scriptName = "BmpPing";
var scriptSource = app.scriptArgs.getValue('test');
app.consoleout('---------------------------');
app.consoleout(scriptName + " invoked: " + scriptSource);
var bmp = new File (app.activeScript.parent.fsName + '/bmp.jsx');
$.evalFile(bmp);
bmp_timediff.setStartTime();
bmp_log.debug(scriptName + " started on \"" + scriptSource + "\"...");
result = bmp_json.stringify({"PING": "PONG"});
bmp_log.info("BmpPing finished with result: '" + result + "' in: " + 
(bmp_timediff.getDiff() / 1000) + " bmp seconds");
bmp_log.debug('============================');
result;
YoloZsolo
  • 1
  • 1
  • Just to get started - you are running InDesign Server not InDesign client, is this correct? – Nicolai Kant May 17 '17 at 10:11
  • Try to call a very simple InDesign Script which does nothing and does not refer DOM or any document at all, just return 1 to the soap call – Nicolai Kant May 17 '17 at 10:13
  • I updated the post, and inserted the test js. I am not sure if it meets the the requirement on what you just said. @NicolaiKaint – YoloZsolo May 18 '17 at 11:46

1 Answers1

0

You ping script is not that simple, there are a number of things which can go wrong. Try to verify your InDesign Server is working first.

Try this js script:

main();   
function main() {
    return ("success");
    // or return 1;
}

The soap request should be something like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://ns.adobe.com/InDesign/soap/"><soapenv:Body>
                          <soap:RunScript>
                          <runScriptParameters>
                          <scriptLanguage>javascript</scriptLanguage>
                          <scriptFile>C:/InDesign/test.jsx</scriptFile>
                          </runScriptParameters>
                          </soap:RunScript>
                          </soapenv:Body>
 </soapenv:Envelope>

and reply should be:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:IDSP="http://ns.adobe.com/InDesign/soap/">
    <SOAP-ENV:Body>
        <IDSP:RunScriptResponse>
            <errorNumber>0</errorNumber>
            <scriptResult>
                <data xsi:type="xsd:string">success</data>
            </scriptResult>
        </IDSP:RunScriptResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If you do not have it - you need to look at set up of your server. If you do have it - start adding the script lines one at a time and see which one throws exception.

Also, try to make a soap call from a different ui, like SOAPUI or Postman

Nicolai Kant
  • 1,391
  • 1
  • 9
  • 23