Page 1 of 1

Web services in AbleCommerce 7.0

Posted: Fri Sep 18, 2009 12:47 pm
by jenn13
We need to take a text file from an external source and use the data in it to create/update users in our AbleCommerce site. Part of this solution is to be a web service that will call the user creation and updating code from CommerceBuilder with the appropriate parameters.
I've created a web service project in the same solution with the project containing the AbleCommerce code, and wrote a test method to check that I can actually call the CommerceBuilder code from my web service:

Code: Select all

[WebMethod]
public string CountUsers()
{
      try
       {
            int count = UserDataSource.CountForStore();
            return count.ToString();
       }
       catch (Exception ex)
       {
            return ex.Message;
       }
}
When I invoke the method, I get the following exception:

"AbleCommerceHttpModule does not appear to be configured."

I'm not sure what I'm doing wrong here, whether it's an issue with my use of web services (this is really the first time I've ever tried to make one), or something I need to do with the AbleCommerce code. Any ideas how I can solve this?

Re: Web services in AbleCommerce 7.0

Posted: Fri Sep 18, 2009 2:07 pm
by jenn13
It appears I have found my own solution: creating the web service in the original project rather than a new project in the solution.

Re: Web services in AbleCommerce 7.0

Posted: Fri Sep 18, 2009 4:09 pm
by Logan Rhodehamel
You have found the appropriate solution. I think it's been discussed here a few times. The AbleCommerceHttpModule is responsible for initializing the token, connections, etc. This is all within the root web.config of the AbleCommerce installation. So just create the service somewhere within the AbleCommerce installation directory - which is what you discovered.