Hi!
I’m new in Soap and I’m trying to connect to a Web Service and it trows me the error “Access Denied”.
What this particular web service required is some credentials to be able to use it.
I’ve manage to do in Ignition the script to get the credentials and it works fine. I use this credentials to test if it work in the program SoapUI and it gives me as a response the correct value that I’m looking for, but in Ignition gives me the “Access Denied” error, using the same credentials.
These are the WSDL I use:
- To get the credentials (token and sign): “https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl”
- To get access to the specific web service I’m trying to connect: “https://fwshomo.afip.gov.ar/wsctg/services/CTGService_v3.0?wsdl”
In this last one, the method I want it’s called “consultarCTGActivosPorPatente”
I do the following in a button in Ignition:
from suds.client import Client
from xml.dom.minidom import parseString
client = Client(“https://fwshomo.afip.gov.ar/wsctg/services/CTGService_v3.0?wsdl”)
ConsultaCTGActivo = client.service.consultarCTGActivosPorPatente(token,sign,CUIT,patente)
Here is the full error:
Traceback (most recent call last):
File “event:actionPerformed”, line 32, in
File “C:\Users\giuli.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py”, line 542, in call
return client.invoke(args, kwargs)
File “C:\Users\giuli.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py”, line 602, in invoke
result = self.send(soapenv)
File “C:\Users\giuli.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py”, line 649, in send
result = self.failed(binding, e)
File “C:\Users\giuli.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py”, line 702, in failed
r, p = binding.get_fault(reply)
File “C:\Users\giuli.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\bindings\binding.py”, line 265, in get_fault
raise WebFault(p, faultroot)
suds.WebFault: Server raised fault: ‘Acceso Denegado - El token o la firma son nulos.’
at org.python.core.PyException.doRaise(PyException.java:219)
at org.python.core.Py.makeException(Py.java:1239)
at org.python.core.Py.makeException(Py.java:1243)
at org.python.core.Py.makeException(Py.java:1247)
at suds.bindings.binding$py.get_fault$14(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\bindings\binding.py:266)
at suds.bindings.binding$py.call_function(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\bindings\binding.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
at org.python.core.PyFunction.__call__(PyFunction.java:327)
at org.python.core.PyMethod.__call__(PyMethod.java:124)
at suds.client$py.failed$46(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py:710)
at suds.client$py.call_function(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
at org.python.core.PyFunction.__call__(PyFunction.java:338)
at org.python.core.PyMethod.__call__(PyMethod.java:139)
at suds.client$py.send$43(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py:650)
at suds.client$py.call_function(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
at org.python.core.PyFunction.__call__(PyFunction.java:327)
at org.python.core.PyMethod.__call__(PyMethod.java:124)
at suds.client$py.invoke$42(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py:608)
at suds.client$py.call_function(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
at org.python.core.PyFunction.__call__(PyFunction.java:338)
at org.python.core.PyMethod.__call__(PyMethod.java:139)
at suds.client$py.__call__$37(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py:542)
at suds.client$py.call_function(C:\Users\giuli\.ignition\cache\gwlocalhost_8088_8043_main\C0\pylib\suds\client.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
at org.python.core.PyFunction.__call__(PyFunction.java:387)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
at org.python.core.PyMethod.__call__(PyMethod.java:211)
at org.python.core.PyMethod.__call__(PyMethod.java:206)
at org.python.core.PyObject.invoke(PyObject.java:3555)
at org.python.core.PyInstance.instance___call__(PyInstance.java:351)
at org.python.core.PyInstance.__call__(PyInstance.java:342)
at org.python.core.PyObject.__call__(PyObject.java:387)
at org.python.core.PyObject.__call__(PyObject.java:391)
at org.python.pycode._pyx62.f$0(<event:actionPerformed>:32)
at org.python.pycode._pyx62.call_function(<event:actionPerformed>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:647)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:183)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:284)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
at com.sun.proxy.$Proxy29.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Ignition v7.9.1 (b2017012511)
Java: Oracle Corporation 1.8.0_121
If anyone could help me on this I’ll be very much apreciated!