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, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices