The following is an example Apache Axis client calling a promotions web service. The claimCoupon web service is used in this example.

The first step in calling a promotion web service using Apache is to generate the client stubs:

java org.apache.axis.wsdl.WSDL2Java
http://hostname:port/commerce/promotion/claimCoupon?WSDL

Next, the following code executes the claimCoupon web service:

ClaimCouponSEIService webService = new ClaimCouponSEIServiceLocator();
ClaimCouponSEI couponStub = webService.getClaimCouponSEIPort();
CouponStub.claimCoupon(myProfileId, someCouponClaimCode);

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices