com.ebay.sdk.handler.EBayServiceHandlerResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebaysdkcore Show documentation
Show all versions of ebaysdkcore Show documentation
This SDK enables you to use Java to make API calls in the eBay Trading API, which is an XML API.
This maven build is provided by tonicsoft for convenience and is an exact copy of version 981 of
the project distributed by eBay via the official eBay SDK website.
The newest version!
/*
Copyright (c) 2013 eBay, Inc.
This program is licensed under the terms of the eBay Common Development and
Distribution License (CDDL) Version 1.0 (the "License") and any subsequent version
thereof released by eBay. The then-current version of the License can be found
at http://www.opensource.org/licenses/cddl1.php and in the eBaySDKLicense file that
is under the root directory at /LICENSE.txt.
*/
package com.ebay.sdk.handler;
import java.util.ArrayList;
import java.util.List;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.PortInfo;
/**
* A resolver to add handlers
* @author boyang
* @version 1.0
*
*/
public class EBayServiceHandlerResolver implements HandlerResolver {
public List getHandlerChain(PortInfo portInfo) {
List handlerChain = new ArrayList();
ClientAuthenticationHandler authn = new ClientAuthenticationHandler();
SOAPMessageLoggingHandler logging = new SOAPMessageLoggingHandler();
HTTPHeaderLoggingHandler httpheader = new HTTPHeaderLoggingHandler();
MetricsLogHandler metrics = new MetricsLogHandler();
//add handler for eBay API credentials
handlerChain.add(authn);
//add handler for soap message logging
handlerChain.add(logging);
//add handler for metrics logging
handlerChain.add(metrics);
//add handler for http headers logging
handlerChain.add(httpheader);
return handlerChain;
}
}