001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.axis2.jaxws.description;
021:
022: import org.apache.axis2.client.ServiceClient;
023: import org.apache.axis2.description.AxisService;
024: import org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType;
025:
026: import javax.xml.namespace.QName;
027: import javax.xml.ws.Service;
028: import javax.xml.ws.handler.PortInfo;
029: import javax.xml.ws.soap.SOAPBinding;
030:
031: /**
032: * An EndpointDescription corresponds to a particular Service Implementation. It can correspond to
033: * either either a client to that impl or the actual service impl.
034: * <p/>
035: * The EndpointDescription contains information that is relevant to both a Provider-based and
036: * SEI-based (aka Endpoint-based or Java-based) enpdoints. SEI-based endpoints (whether they have an
037: * explicit or implcit SEI) will have addtional metadata information in an
038: * EndpointInterfaceDescription class and sub-hierachy; Provider-based endpoitns do not have such a
039: * hierachy.
040: * <p/>
041: * <pre>
042: * <b>EndpointDescription details</b>
043: * <p/>
044: * CORRESPONDS TO: The endpoint (both Client and Server)
045: * <p/>
046: * AXIS2 DELEGATE: AxisService
047: * <p/>
048: * CHILDREN: 0..1 EndpointInterfaceDescription
049: * <p/>
050: * ANNOTATIONS:
051: * WebService [181]
052: * WebServiceProvider [224]
053: * ServicMode [224]
054: * BindingType [224]
055: * <p/>
056: * WSDL ELEMENTS:
057: * port
058: * <p/>
059: * </pre>
060: */
061:
062: public interface EndpointDescription {
063:
064: public static final String AXIS_SERVICE_PARAMETER = "org.apache.axis2.jaxws.description.EndpointDescription";
065: public static final String DEFAULT_CLIENT_BINDING_ID = SOAPBinding.SOAP11HTTP_BINDING;
066:
067: /**
068: * Paramater set on AxisService which contains an ArrayList of SOAP header QNames
069: * of SOAPHandlers.
070: */
071: public static final String HANDLER_PARAMETER_QNAMES = "org.apache.axis2.jaxws.description.EndpointDescription.handlerParameterQNames";
072:
073: public abstract AxisService getAxisService();
074:
075: public abstract ServiceClient getServiceClient();
076:
077: public abstract ServiceDescription getServiceDescription();
078:
079: public abstract EndpointInterfaceDescription getEndpointInterfaceDescription();
080:
081: /**
082: * Returns the JAX-WS handler PortInfo object for this endpoint.
083: *
084: * @return PortInfo
085: */
086: public abstract PortInfo getPortInfo();
087:
088: public abstract boolean isProviderBased();
089:
090: public abstract boolean isEndpointBased();
091:
092: public abstract String getName();
093:
094: public abstract String getTargetNamespace();
095:
096: /**
097: * Returns the binding type FOR A SERVER. This is based on the BindingType annotation and/or
098: * the WSDL. This will return the default binding (SOAP11) if no annotation was specified on the
099: * server. This should NOT be called on the client since it will always return the default
100: * binding. Use getClientBindingID() on clients.
101: *
102: * @return
103: */
104: public abstract String getBindingType();
105:
106: public abstract void setHandlerChain(HandlerChainsType handlerChain);
107:
108: public abstract HandlerChainsType getHandlerChain();
109:
110: /**
111: * Set the binding type FOR A CLIENT. The BindingType annotation is not valid on the client per
112: * the JAX-WS spec. The value can be set via addPort(...) for a Dispatch client or via TBD for
113: * a Proxy client.
114: */
115: public abstract void setClientBindingID(String clientBindingID);
116:
117: /**
118: * Return the binding type FOR A CLIENT. This will return the default client binding type if
119: * called on the server. Use getBindingType() on servers.
120: *
121: * @return String representing the client binding type
122: * @see setClientBindingID();
123: */
124: public abstract String getClientBindingID();
125:
126: public void setEndpointAddress(String endpointAddress);
127:
128: public abstract String getEndpointAddress();
129:
130: //public abstract List<String> getHandlerList();
131: public abstract QName getPortQName();
132:
133: public abstract QName getServiceQName();
134:
135: public abstract Service.Mode getServiceMode();
136: }
|