com.konakartadmin.ws
Class KKWSAdminSoapMgr

java.lang.Object
  extended by com.konakartadmin.ws.KKWSAdminSoapMgr

public class KKWSAdminSoapMgr
extends java.lang.Object

For operating on KonaKart SOAP messages


Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
KKWSAdminSoapMgr()
           
 
Method Summary
 void addStoreIdTag(com.konakartadmin.ws.KKWSAdminIf impl, java.lang.String storeId)
          Set the storeId tag on the AXIS Stub service so that it will be included in all messages sent to the target service.
static KKAdminException createKKAdminExceptionFromAxisFault(org.apache.axis.AxisFault af)
          Create a KKAdminException from an AxisFault.
 java.lang.String getStoreId()
          Return the value of the storeId tag that should be in the SOAPHeader.
 void setSoapTimeout(com.konakartadmin.ws.KKWSAdminIf impl, int timeout)
          Set the timeout on SOAP calls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

KKWSAdminSoapMgr

public KKWSAdminSoapMgr()
Method Detail

getStoreId

public java.lang.String getStoreId()
                            throws KKAdminException
Return the value of the storeId tag that should be in the SOAPHeader. If the storeId is missing this returns the default storeId.

Returns:
the storeId contained in the storeId tag in the SOAPHeader
Throws:
KKAdminException - for unexpected exceptions processing the SOAP message context

addStoreIdTag

public void addStoreIdTag(com.konakartadmin.ws.KKWSAdminIf impl,
                          java.lang.String storeId)
                   throws KKAdminException
Set the storeId tag on the AXIS Stub service so that it will be included in all messages sent to the target service.

Parameters:
impl - the AXIS Stub implementation on which we will set the SOAP Header
storeId - the store Id
Throws:
KKAdminException

setSoapTimeout

public void setSoapTimeout(com.konakartadmin.ws.KKWSAdminIf impl,
                           int timeout)
                    throws KKAdminException
Set the timeout on SOAP calls.

Parameters:
impl - the AXIS Stub implementation on which we will set the SOAP Header
timeout - the timeout for SOAP calls (in milliseconds)
Throws:
KKAdminException

createKKAdminExceptionFromAxisFault

public static KKAdminException createKKAdminExceptionFromAxisFault(org.apache.axis.AxisFault af)
Create a KKAdminException from an AxisFault. We extract the KKAdminException code from the exception message if we can find it. If present it will appear as [int] with the code being the int inside the brackets (eg. [10]).

Parameters:
af - the AxisFault
Returns:
a KKAdminException with the code set, if found.


Copyright © 2011 DS Data Systems UK Ltd.