Start a new topic

Volusion API service works on one PC but no others

Hello Folk's,


My company has a service running on our server(2008 R2) that makes API calls to our Volusion store to get new orders.The service converts the exported orders into QuoteWerks xml format for use in BusinessWorks.


I've been tasked with making some changes and I'm now trying to test the service on my workstation(Win7). I can't get my altered version to work when running on my workstation, nor can I get the original service to run correctly. Both versions post errors regarding no root element for the xml. As far as I can tell this means the returned value either wasn't xml or was literally nothing. The error is thrown on the doc.Load(reader):

 

public static string GetXmlStringFromUrl(string apiUrl)
    {
        XmlDocument doc = null;
        XmlTextReader reader = null;
        StringWriter strWriter = null;
        XmlTextWriter xmlWriter = null;

        try
        {
          using(WebClient client = new WebClient()) {
             string s = client.Download(apiUrl);
             EventLogger.WriteToLog(s,EventLogEntryType.Information);
            }

            reader = new XmlTextReader(apiUrl);
            doc = new XmlDocument();
            doc.Load(reader);

            strWriter = new StringWriter();
            xmlWriter = new XmlTextWriter(strWriter);
            doc.WriteTo(xmlWriter);
        }

 I added the "using" block as an attempt to read the returned values and throw them into my event log before the error was thrown and see if there was a formatting error in microsoft dynamics crm. The URL has this format, which I have tried to check for errors without success.

 

http://www.yourdomain.com/net/WebService.aspx?Login=jon_doe@volusion.com &EncryptedPassword=471757EA629DDFD10B75D92A2AD223DFC00AD2E74C1D342B23F3254EC9A4965114351E&SELECT_Columns=*

 

My problem is that everything I can think of that could cause a bad return can't be the problem because the original service continues to run on the server while I make this change.


So my question is this, why would a windows service get nothing back from an API call when the same service running on another pc using the exact same code gets usable results? What should I check to track this down?


Help me on this Thanks

1 Comment

There could be a few reasons why the Volusion API service works on one PC but not on others. Here are some troubleshooting steps that you can try:

1. Check the API credentials: Make sure that you are using the correct API credentials on all PCs. If the API credentials are incorrect, the API will not work.


2. Check the firewall settings: Check the firewall settings on the PCs where the API is not working. If the firewall is blocking the API, you will need to add an exception to allow the API to connect.


3. Check the network settings: Make sure that the PCs where the API is not working are connected to the same network as the PC where the API is working. If the PCs are not connected to the same network, you may need to configure your network settings to allow the API to connect.


4. Check the software dependencies: Check if the required software dependencies for the Volusion API service are installed on all PCs. If the software dependencies are missing, you will need to install them.


5.Check the API version: Make sure that all PCs are using the same version of the Volusion API service. If the API versions are different, it may cause compatibility issues.


6. Contact Volusion support: If none of the above steps work, you may need to contact Volusion support for further assistance. They can help you diagnose the issue and provide you with a solution.


CCSP is the answer to all your concerns about securing your valuable APIs and protecting your apps and data from exposure.  

Hope it helps you. 

Login or Signup to post a comment