axis 1.4 web service client

axis 1.4 web service client

1. generate EHNVInfoFetcherService.wsdl
2. build.xml
<project name="genWSDL2Java" default="CardOnePlus" basedir=".">
    <description>
        WSDL 2 Java – EHNVInfoFetcherService
    </description>

    <!– Compiler options –>
    <property name="compiler.debug"                 value="on"/>
    <property name="compiler.generate.no.warnings"  value="off"/>
    <property name="compiler.args"                  value=""/>
    <property name="compiler.max.memory"            value="64m"/>

    <!– WSDL build paths –>
    <property name="POS.3plib"     value="${basedir}/../ThirdPartyLibraries"/>
    <property name="local.wsdl"    value="${basedir}/EHNVInfoFetcherService.wsdl"/>
    <property name="generated.dir" value="${basedir}"/>

   <!– Classpath for all the third party libraries –>
    <path id="axis.classpath" >
        <fileset dir="${POS.3plib}/ApacheAxis" includes="**/*.jar" />
        <fileset dir="${POS.3plib}/Mail" includes="**/*.jar" />
    </path>

    <taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
    <axis-wsdl2java output="${generated.dir}"
                    testcase="true"
                    verbose="true"
                    url="${local.wsdl}" >
        <mapping namespace="http://axis.apache.org/ns/interop&quot; package="interop" />
    </axis-wsdl2java>
    <target name="CardOnePlus"></target>
</project>
3. log4j.properties
##################################################################
# Root information
##################################################################
log4j.rootCategory=DEBUG, stdout,  E
##################################################################
# Appender stdout information
##################################################################
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %5p [%t] (%F:%L) – %m%n

##################################################################
# Appender  E is set to be a DailyRollingFileAppender.
##################################################################
log4j.appender.E=org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.Threshold=DEBUG
log4j.appender.E.File=D:/Development/Java/classes/ihd.log
log4j.appender.E.ImmediateFlush=true
log4j.appender.E.Append=true
log4j.appender.E.DatePattern=’.’yyyyMMdd
log4j.appender.E.layout=org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern=%d{HH:mm:ss} %5p [%t] (%c:%L) – %m%n

4. run ant build–get web service code
5.
package com.ws.eh.client;

import com.ipdevco.common.logging.IPLogger;

import com.ipdevco.ce.web.service.ehbean.*;

/**
 * This is a EHBeanClient, used to get EHBeanClient info
 * @version 1.0 Aug. 29, 2008
 * @author George Di
 */
public class EHBeanClient{
    private IPLogger log = IPLogger.getIPLogger(EHBeanClient.class);
   
    EHBeanServiceEndPointService ehBeanServiceEndPointService =new EHBeanServiceEndPointServiceLocator();
   
    public Double getClientBalance(String account) {
         log.info("<<<EHBeanClient.getClientBalance()");
         Double result=new Double(0);
         try{
             result=new Double(ehBeanServiceEndPointService.getEHBeanServiceEndPointPort().getClientBalance(account));
         }catch(Exception e){
             log.error("Exception", e);
         }
         log.info(">>>EHBeanClient.getClientBalance()");
         return result;     
     }
     
     public ValidateBettingResultBean validateBettingRequirements(String accNum, double cashinAmount) {
         log.info("<<<EHBeanClient.validateBettingRequirements()");
         ValidateBettingResultBean validateBettingResultBean=null;
         try{
             validateBettingResultBean=
                 ehBeanServiceEndPointService.getEHBeanServiceEndPointPort().validateBettingRequirements(accNum, cashinAmount);
         }catch(Exception e){
             log.error("Exception", e);
         }
         log.info(">>>EHBeanClient.validateBettingRequirements()");
         return validateBettingResultBean;
     }
     
     public boolean updatePostWithdraw(String uID, String accountID,
                double withdrawAmount, double updatedBalance, String depositType,
                boolean insertCWTrace, long transTime) {
         log.info("<<<EHBeanClient.updatePostWithdraw()");
         boolean result=false;
         try{
             result=ehBeanServiceEndPointService.getEHBeanServiceEndPointPort().updatePostWithdraw(uID, accountID, withdrawAmount,updatedBalance, depositType, insertCWTrace, transTime);
         }catch(Exception e){
             log.error("Exception", e);
         }
         log.info(">>>EHBeanClient.updatePostWithdraw()");
         return result;
     }
     
     public boolean updateClientBalance(String uID, String accountID,
                double amount, String status, String traceType, String depositType,
                boolean insertCWTrace, long transTime) {
         log.info("<<<EHBeanClient.updateClientBalance()");
         boolean result=false;
         try{
             result=ehBeanServiceEndPointService.getEHBeanServiceEndPointPort().updateClientBalance(uID, accountID, amount, status, traceType, depositType, insertCWTrace, transTime);
         }catch(Exception e){
             log.error("Exception", e);
         }
         log.info(">>>EHBeanClient.updateClientBalance()");
         return result;
     }
}

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to axis 1.4 web service client

  1. Unknown says:

    Hi,Do you have used LCDs, second hand LCDs, used flat screens and used LCD monitors? Please go here:www.sstar-hk.com(Southern Stars).We are constantly buying re-usable LCD panels and working for LCD recycling.The re-usable panels go through strictly designed process of categorizing, checking, testing, repairing and refurbishing before they are re-used to make remanufactured LCD displays and TV sets.Due to our recent breakthrough in testing and repairing technology of LCD, we can improve the value for your LCD panels.
    website:www.sstar-hk.com[diijjgacefcccd]

  2. Vic, many thanks for your heads up relating to this.
    I’d stagnated and sweet Jesus Christ, this is wickedly anabolic. I have upped 8lbs in only quick of 2 weeks and strength is via the roof. (315lb shoulder presses for a single). Maintaining a close eye on potential sides and keeping the liver detoxed as considerably as possible, although upping protein by double. PCT will probably be the deciding issue in keeping the gains, but gentlemen, this really is no bullshit significant gear.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s