rouxemmanuel / DigitalSigning

Digital Signing Alfresco plugin
45 stars 39 forks source link

Error during document signing : ReferenceError: "digitalSigning" is not defined. #44

Closed p4535992 closed 4 years ago

p4535992 commented 6 years ago

I sorry to bother you , i have tried to replicate a new sign function which is a clone of yours , but is returned a error on the javavascript sign.post.js when submit the form. Here the error:

Error during document signing : ReferenceError: "digitalSigning" is not defined. (classpath*:alfresco/extension/templates/webscripts/alfresco/digitalSigning/sign/sign.post.js#63)

I get it it's the javascript object "digitalSigning" not set on the file 'sign.post.js':

..............................................................................
logger.error("END JSON POST SIGN");
digitalSigning.sign(parameters); //the 'digitalSigning' is not defined
model.result = "success";
logger.error("END2 JSON POST SIGN");
...............................................................................

i have created the correct bean with the exact extensions name:

<!-- Sign service javaScript API -->
    <bean id="digitalSigningScript" parent="baseJavaScriptExtension"
        class="org.alfresco.plugin.digitalSigning.script.SigningServiceScript">
        <property name="extensionName">
            <value>digitalSigning</value>
        </property>
               <!-- not used on my example -->
        <!--  
        <property name="digitalSigningService">
            <ref bean="digitalSigningService" />
        </property>
        -->
        <property name="authenticationService" ref="authenticationService" />
        <property name="personService" ref="personService" />
        <property name="nodeService" ref="nodeService" />
    </bean>

and i have created the java class with the method: org.alfresco.plugin.digitalSigning.script.SigningServiceScript.sign(final NativeObject parameters);

So i don't get why the digitalSigning.sign(parameters); code of the javascript keep telling me is not defined i miss something?