325N/A/*
325N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/Apackage com.sun.xml.internal.ws.api.model.wsdl;
325N/A
325N/Aimport com.sun.istack.internal.NotNull;
325N/Aimport com.sun.istack.internal.Nullable;
325N/Aimport com.sun.xml.internal.ws.api.BindingID;
325N/Aimport com.sun.xml.internal.ws.api.message.Message;
325N/A
325N/Aimport javax.jws.soap.SOAPBinding;
325N/Aimport javax.xml.namespace.QName;
325N/A
325N/A/**
325N/A * {@link WSDLPortType} bound with a specific binding.
325N/A *
325N/A * @author Vivek Pandey
325N/A */
325N/Apublic interface WSDLBoundPortType extends WSDLFeaturedObject, WSDLExtensible {
325N/A /**
325N/A * Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace
325N/A * as the namespace uri.
325N/A */
325N/A QName getName();
325N/A
325N/A /**
325N/A * Gets the {@link WSDLModel} that owns this port type.
325N/A */
325N/A @NotNull WSDLModel getOwner();
325N/A
325N/A /**
325N/A * Gets the {@link WSDLBoundOperation} for a given operation name
325N/A *
325N/A * @param operationName non-null operationName
325N/A * @return null if a {@link WSDLBoundOperation} is not found
325N/A */
325N/A public WSDLBoundOperation get(QName operationName);
325N/A
325N/A /**
325N/A * Gets the wsdl:binding@type value, same as {@link WSDLPortType#getName()}
325N/A */
325N/A QName getPortTypeName();
325N/A
325N/A /**
325N/A * Gets the {@link WSDLPortType} associated with the wsdl:binding
325N/A */
325N/A WSDLPortType getPortType();
325N/A
325N/A /**
325N/A * Gets the {@link WSDLBoundOperation}s
325N/A */
325N/A Iterable<? extends WSDLBoundOperation> getBindingOperations();
325N/A
325N/A /**
325N/A * Is this a document style or RPC style?
325N/A *
325N/A * Since we only support literal and not encoding, this means
325N/A * either doc/lit or rpc/lit.
325N/A */
325N/A @NotNull SOAPBinding.Style getStyle();
325N/A
325N/A /**
325N/A * Returns the binding ID.
325N/A * This would typically determined by the binding extension elements in wsdl:binding.
325N/A */
325N/A BindingID getBindingId();
325N/A
325N/A /**
325N/A * Gets the bound operation in this port for a tag name. Here the operation would be the one whose
325N/A * input part descriptor bound to soap:body is same as the tag name except for rpclit where the tag
325N/A * name would be {@link WSDLBoundOperation#getName()}.
325N/A *
325N/A * <p>
325N/A * If you have a {@link Message} and trying to figure out which operation it belongs to,
325N/A * always use {@link Message#getOperation}, as that performs better.
325N/A *
325N/A * <p>
325N/A * For example this can be used in the case when a message receipient can get the
325N/A * {@link WSDLBoundOperation} from the payload tag name.
325N/A *
325N/A * <p>
325N/A * namespaceUri and the local name both can be null to get the WSDLBoundOperation that has empty body -
325N/A * there is no payload. According to BP 1.1 in a port there can be at MOST one operation with empty body.
325N/A * Its an error to have namespace URI non-null but local name as null.
325N/A *
325N/A * @param namespaceUri namespace of the payload element.
325N/A * @param localName local name of the payload
325N/A * @throws NullPointerException if localName is null and namespaceUri is not.
325N/A * @return
325N/A * null if no operation with the given tag name is found.
325N/A */
325N/A @Nullable WSDLBoundOperation getOperation(String namespaceUri, String localName);
325N/A}