diff -r cc682329886b -r b0610cd08440 src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Thu Sep 26 10:43:28 2013 -0700 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Fri Oct 04 16:21:34 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,10 @@ import com.sun.xml.internal.ws.api.model.ParameterBinding; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; import com.sun.xml.internal.ws.resources.ClientMessages; import com.sun.xml.internal.ws.util.QNameMap; import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException; @@ -47,26 +51,26 @@ * * @author Vivek Pandey */ -public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements WSDLBoundPortType { +public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType { private final QName name; private final QName portTypeName; - private WSDLPortTypeImpl portType; + private EditableWSDLPortType portType; private BindingID bindingId; - private final @NotNull WSDLModelImpl owner; - private final QNameMap bindingOperations = new QNameMap(); + private final @NotNull EditableWSDLModel owner; + private final QNameMap bindingOperations = new QNameMap(); /** * Operations keyed by the payload tag name. */ - private QNameMap payloadMap; + private QNameMap payloadMap; /** * {@link #payloadMap} doesn't allow null key, so we store the value for it here. */ - private WSDLBoundOperationImpl emptyPayloadOperation; + private EditableWSDLBoundOperation emptyPayloadOperation; - public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull WSDLModelImpl owner, QName name, QName portTypeName) { + public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) { super(xsr); this.owner = owner; this.name = name; @@ -78,11 +82,11 @@ return name; } - public @NotNull WSDLModelImpl getOwner() { + public @NotNull EditableWSDLModel getOwner() { return owner; } - public WSDLBoundOperationImpl get(QName operationName) { + public EditableWSDLBoundOperation get(QName operationName) { return bindingOperations.get(operationName); } @@ -93,7 +97,7 @@ * @param ptOp Must be non-null * @throws NullPointerException if either opName or ptOp is null */ - public void put(QName opName, WSDLBoundOperationImpl ptOp) { + public void put(QName opName, EditableWSDLBoundOperation ptOp) { bindingOperations.put(opName,ptOp); } @@ -101,11 +105,11 @@ return portTypeName; } - public WSDLPortTypeImpl getPortType() { + public EditableWSDLPortType getPortType() { return portType; } - public Iterable getBindingOperations() { + public Iterable getBindingOperations() { return bindingOperations.values(); } @@ -149,7 +153,7 @@ * @return null if the binding could not be resolved for the part. */ public ParameterBinding getBinding(QName operation, String part, Mode mode) { - WSDLBoundOperationImpl op = get(operation); + EditableWSDLBoundOperation op = get(operation); if (op == null) { //TODO throw exception return null; @@ -160,23 +164,7 @@ return op.getOutputBinding(part); } - /** - * Gets mime:content@part value which is the MIME type for a given operation, part and {@link Mode}. - * - * @param operation wsdl:operation@name value. Must be non-null. - * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. - * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. - * @return null if the binding could not be resolved for the part. - */ - public String getMimeType(QName operation, String part, Mode mode) { - WSDLBoundOperationImpl op = get(operation); - if (Mode.IN == mode) - return op.getMimeTypeForInputPart(part); - else - return op.getMimeTypeForOutputPart(part); - } - - public WSDLBoundOperationImpl getOperation(String namespaceUri, String localName) { + public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) { if(namespaceUri==null && localName == null) return emptyPayloadOperation; else{ @@ -184,19 +172,7 @@ } } - public void enableMTOM() { - features.add(new MTOMFeature()); - } - - public boolean isMTOMEnabled() { - return features.isEnabled(MTOMFeature.class); - } - - public SOAPVersion getSOAPVersion(){ - return getBindingId().getSOAPVersion(); - } - - void freeze() { + public void freeze() { portType = owner.getPortType(portTypeName); if(portType == null){ throw new LocatableWebServiceException( @@ -204,7 +180,7 @@ } portType.freeze(); - for (WSDLBoundOperationImpl op : bindingOperations.values()) { + for (EditableWSDLBoundOperation op : bindingOperations.values()) { op.freeze(owner); } @@ -214,15 +190,15 @@ private void freezePayloadMap() { if(style== Style.RPC) { - payloadMap = new QNameMap(); - for(WSDLBoundOperationImpl op : bindingOperations.values()){ - payloadMap.put(op.getReqPayloadName(), op); + payloadMap = new QNameMap(); + for(EditableWSDLBoundOperation op : bindingOperations.values()){ + payloadMap.put(op.getRequestPayloadName(), op); } } else { - payloadMap = new QNameMap(); + payloadMap = new QNameMap(); // For doclit The tag will be the operation that has the same input part descriptor value - for(WSDLBoundOperationImpl op : bindingOperations.values()){ - QName name = op.getReqPayloadName(); + for(EditableWSDLBoundOperation op : bindingOperations.values()){ + QName name = op.getRequestPayloadName(); if(name == null){ //empty payload emptyPayloadOperation = op;