Advertisement
lonestar101x

TrackServiceLocator

Apr 14th, 2014
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.46 KB | None | 0 0
  1. /**
  2.  * TrackServiceLocator.java
  3.  *
  4.  * This file was auto-generated from WSDL
  5.  * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
  6.  */
  7.  
  8. package com.fedex.track.stub;
  9.  
  10. public class TrackServiceLocator extends org.apache.axis.client.Service implements com.fedex.track.stub.TrackService {
  11.  
  12.     public TrackServiceLocator() {
  13.     }
  14.  
  15.  
  16.     public TrackServiceLocator(org.apache.axis.EngineConfiguration config) {
  17.         super(config);
  18.     }
  19.  
  20.     public TrackServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
  21.         super(wsdlLoc, sName);
  22.     }
  23.  
  24.     // Use to get a proxy class for TrackServicePort
  25.     //private java.lang.String TrackServicePort_address = "https://wsbeta.fedex.com:443/web-services/track";
  26.     private java.lang.String TrackServicePort_address = "https://ws.fedex.com:443/web-services/track";
  27.  
  28.     public java.lang.String getTrackServicePortAddress() {
  29.         return TrackServicePort_address;
  30.     }
  31.  
  32.     // The WSDD service name defaults to the port name.
  33.     private java.lang.String TrackServicePortWSDDServiceName = "TrackServicePort";
  34.  
  35.     public java.lang.String getTrackServicePortWSDDServiceName() {
  36.         return TrackServicePortWSDDServiceName;
  37.     }
  38.  
  39.     public void setTrackServicePortWSDDServiceName(java.lang.String name) {
  40.         TrackServicePortWSDDServiceName = name;
  41.     }
  42.  
  43.     public com.fedex.track.stub.TrackPortType getTrackServicePort() throws javax.xml.rpc.ServiceException {
  44.        java.net.URL endpoint;
  45.         try {
  46.             endpoint = new java.net.URL(TrackServicePort_address);
  47.         }
  48.         catch (java.net.MalformedURLException e) {
  49.             throw new javax.xml.rpc.ServiceException(e);
  50.         }
  51.         return getTrackServicePort(endpoint);
  52.     }
  53.  
  54.     public com.fedex.track.stub.TrackPortType getTrackServicePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
  55.         try {
  56.             com.fedex.track.stub.TrackServiceSoapBindingStub _stub = new com.fedex.track.stub.TrackServiceSoapBindingStub(portAddress, this);
  57.             _stub.setPortName(getTrackServicePortWSDDServiceName());
  58.             return _stub;
  59.         }
  60.         catch (org.apache.axis.AxisFault e) {
  61.             return null;
  62.         }
  63.     }
  64.  
  65.     public void setTrackServicePortEndpointAddress(java.lang.String address) {
  66.         TrackServicePort_address = address;
  67.     }
  68.  
  69.     /**
  70.      * For the given interface, get the stub implementation.
  71.      * If this service has no port for the given interface,
  72.      * then ServiceException is thrown.
  73.      */
  74.     public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
  75.         try {
  76.             if (com.fedex.track.stub.TrackPortType.class.isAssignableFrom(serviceEndpointInterface)) {
  77.                 com.fedex.track.stub.TrackServiceSoapBindingStub _stub = new com.fedex.track.stub.TrackServiceSoapBindingStub(new java.net.URL(TrackServicePort_address), this);
  78.                 _stub.setPortName(getTrackServicePortWSDDServiceName());
  79.                 return _stub;
  80.             }
  81.         }
  82.         catch (java.lang.Throwable t) {
  83.             throw new javax.xml.rpc.ServiceException(t);
  84.         }
  85.         throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
  86.     }
  87.  
  88.     /**
  89.      * For the given interface, get the stub implementation.
  90.      * If this service has no port for the given interface,
  91.      * then ServiceException is thrown.
  92.      */
  93.     public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
  94.         if (portName == null) {
  95.             return getPort(serviceEndpointInterface);
  96.         }
  97.         java.lang.String inputPortName = portName.getLocalPart();
  98.         if ("TrackServicePort".equals(inputPortName)) {
  99.             return getTrackServicePort();
  100.         }
  101.         else  {
  102.             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
  103.             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
  104.             return _stub;
  105.         }
  106.     }
  107.  
  108.     public javax.xml.namespace.QName getServiceName() {
  109.         return new javax.xml.namespace.QName("http://fedex.com/ws/track/v8", "TrackService");
  110.     }
  111.  
  112.     private java.util.HashSet ports = null;
  113.  
  114.     public java.util.Iterator getPorts() {
  115.         if (ports == null) {
  116.             ports = new java.util.HashSet();
  117.             ports.add(new javax.xml.namespace.QName("http://fedex.com/ws/track/v8", "TrackServicePort"));
  118.         }
  119.         return ports.iterator();
  120.     }
  121.  
  122.     /**
  123.     * Set the endpoint address for the specified port name.
  124.     */
  125.     public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
  126.        
  127. if ("TrackServicePort".equals(portName)) {
  128.             setTrackServicePortEndpointAddress(address);
  129.         }
  130.         else
  131. { // Unknown Port Name
  132.             throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
  133.         }
  134.     }
  135.  
  136.     /**
  137.     * Set the endpoint address for the specified port name.
  138.     */
  139.     public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
  140.         setEndpointAddress(portName.getLocalPart(), address);
  141.     }
  142.  
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement