This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
Calling Web Services on behalf of another user
This is from an old technote we wrote, but I thought it was an interesting case so wanted to add it to the blog.
How can I invoke a Commerce Web Service on behalf of another user? (For instance, the Order service using a CSR user)
1. Create a new folder named 'com.ibm.commerce.order-ext' under WC/xml/config
2. Create a new configuration file named 'wc-component.xml' under the new folder. You can use the original file in WC/xml/config/com.ibm.commerce.order as a template.
3. Add the following snippet in to the new file.
CallbackHandler callbackHandler = null;
OrderFacadeClient orderFacadeClient = new OrderFacadeClient(iBusinessContext, callbackHandler);