Has anyone designed a project to interface with UPS ConnectShip before? Connectship has the option of using an XML processor that can be used to process shipment requests.
I’ve been trying to send some requests using system.net.httpPost but haven’t had any success. Should I be using the suds library mentioned in the Ignition docs?
On Ignition 7.7.5.
I’m not aware of anyone using Ignition to link up with UPS ConnectShip before, but that certainly doesn’t mean it’s impossible. I’m unable to find specifics about how the service functions–could you fill me in on the basics? Does it respond to a GET request with JSON or XML? If so, httpGet should work, provided you know how to parse out the information. If you can tell me what ConnectShip expects, you should be able to find something that will work in Ignition. SUDS may work for you as well.
We were able to do it using Progistics AMP and suds. However, initializing the Client is really slow. Is there a way to initialize it only once and then use it across multiple scripts?
Are you talking about initializing the ConnectShip client or the Ignition client? Again, I am not familiar with ConnectShip, so I am not sure if you are able to initialize only once. What is the process for initializing ConnectShip? With more details I may be able to help you.
Apologies I should have figured you were talking about initializing SUDS. I ran a couple tests on my end, and the initialization of SUDS only took a long time the first time I imported it. After that, the client object creation ran instantly. Here’s what I did to test:
from java.util import Calendar
from suds.client import Client
client = Client(“http://www.w3schools.com/webservices/tempconvert.asmx?WSDL”)
The initial import took about 5-10 seconds, but after that it was instantaneous upon consecutive button presses. The only thing that took a while every time was the client service call. That was consistently taking 5 seconds to run. Are you sure the initialization of SUDS is really slow every time? Could it be that your actual calls are taking a while?
We tried initializing it as a global which seems to work well enough.