1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Thu Sep 26 10:43:28 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Fri Oct 04 16:21:34 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -31,6 +31,10 @@ 1.11 import com.sun.xml.internal.ws.api.model.ParameterBinding; 1.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 1.13 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; 1.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 1.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 1.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 1.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 1.18 import com.sun.xml.internal.ws.resources.ClientMessages; 1.19 import com.sun.xml.internal.ws.util.QNameMap; 1.20 import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException; 1.21 @@ -47,26 +51,26 @@ 1.22 * 1.23 * @author Vivek Pandey 1.24 */ 1.25 -public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements WSDLBoundPortType { 1.26 +public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType { 1.27 private final QName name; 1.28 private final QName portTypeName; 1.29 - private WSDLPortTypeImpl portType; 1.30 + private EditableWSDLPortType portType; 1.31 private BindingID bindingId; 1.32 - private final @NotNull WSDLModelImpl owner; 1.33 - private final QNameMap<WSDLBoundOperationImpl> bindingOperations = new QNameMap<WSDLBoundOperationImpl>(); 1.34 + private final @NotNull EditableWSDLModel owner; 1.35 + private final QNameMap<EditableWSDLBoundOperation> bindingOperations = new QNameMap<EditableWSDLBoundOperation>(); 1.36 1.37 /** 1.38 * Operations keyed by the payload tag name. 1.39 */ 1.40 - private QNameMap<WSDLBoundOperationImpl> payloadMap; 1.41 + private QNameMap<EditableWSDLBoundOperation> payloadMap; 1.42 /** 1.43 * {@link #payloadMap} doesn't allow null key, so we store the value for it here. 1.44 */ 1.45 - private WSDLBoundOperationImpl emptyPayloadOperation; 1.46 + private EditableWSDLBoundOperation emptyPayloadOperation; 1.47 1.48 1.49 1.50 - public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull WSDLModelImpl owner, QName name, QName portTypeName) { 1.51 + public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) { 1.52 super(xsr); 1.53 this.owner = owner; 1.54 this.name = name; 1.55 @@ -78,11 +82,11 @@ 1.56 return name; 1.57 } 1.58 1.59 - public @NotNull WSDLModelImpl getOwner() { 1.60 + public @NotNull EditableWSDLModel getOwner() { 1.61 return owner; 1.62 } 1.63 1.64 - public WSDLBoundOperationImpl get(QName operationName) { 1.65 + public EditableWSDLBoundOperation get(QName operationName) { 1.66 return bindingOperations.get(operationName); 1.67 } 1.68 1.69 @@ -93,7 +97,7 @@ 1.70 * @param ptOp Must be non-null 1.71 * @throws NullPointerException if either opName or ptOp is null 1.72 */ 1.73 - public void put(QName opName, WSDLBoundOperationImpl ptOp) { 1.74 + public void put(QName opName, EditableWSDLBoundOperation ptOp) { 1.75 bindingOperations.put(opName,ptOp); 1.76 } 1.77 1.78 @@ -101,11 +105,11 @@ 1.79 return portTypeName; 1.80 } 1.81 1.82 - public WSDLPortTypeImpl getPortType() { 1.83 + public EditableWSDLPortType getPortType() { 1.84 return portType; 1.85 } 1.86 1.87 - public Iterable<WSDLBoundOperationImpl> getBindingOperations() { 1.88 + public Iterable<EditableWSDLBoundOperation> getBindingOperations() { 1.89 return bindingOperations.values(); 1.90 } 1.91 1.92 @@ -149,7 +153,7 @@ 1.93 * @return null if the binding could not be resolved for the part. 1.94 */ 1.95 public ParameterBinding getBinding(QName operation, String part, Mode mode) { 1.96 - WSDLBoundOperationImpl op = get(operation); 1.97 + EditableWSDLBoundOperation op = get(operation); 1.98 if (op == null) { 1.99 //TODO throw exception 1.100 return null; 1.101 @@ -160,23 +164,7 @@ 1.102 return op.getOutputBinding(part); 1.103 } 1.104 1.105 - /** 1.106 - * Gets mime:content@part value which is the MIME type for a given operation, part and {@link Mode}. 1.107 - * 1.108 - * @param operation wsdl:operation@name value. Must be non-null. 1.109 - * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. 1.110 - * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. 1.111 - * @return null if the binding could not be resolved for the part. 1.112 - */ 1.113 - public String getMimeType(QName operation, String part, Mode mode) { 1.114 - WSDLBoundOperationImpl op = get(operation); 1.115 - if (Mode.IN == mode) 1.116 - return op.getMimeTypeForInputPart(part); 1.117 - else 1.118 - return op.getMimeTypeForOutputPart(part); 1.119 - } 1.120 - 1.121 - public WSDLBoundOperationImpl getOperation(String namespaceUri, String localName) { 1.122 + public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) { 1.123 if(namespaceUri==null && localName == null) 1.124 return emptyPayloadOperation; 1.125 else{ 1.126 @@ -184,19 +172,7 @@ 1.127 } 1.128 } 1.129 1.130 - public void enableMTOM() { 1.131 - features.add(new MTOMFeature()); 1.132 - } 1.133 - 1.134 - public boolean isMTOMEnabled() { 1.135 - return features.isEnabled(MTOMFeature.class); 1.136 - } 1.137 - 1.138 - public SOAPVersion getSOAPVersion(){ 1.139 - return getBindingId().getSOAPVersion(); 1.140 - } 1.141 - 1.142 - void freeze() { 1.143 + public void freeze() { 1.144 portType = owner.getPortType(portTypeName); 1.145 if(portType == null){ 1.146 throw new LocatableWebServiceException( 1.147 @@ -204,7 +180,7 @@ 1.148 } 1.149 portType.freeze(); 1.150 1.151 - for (WSDLBoundOperationImpl op : bindingOperations.values()) { 1.152 + for (EditableWSDLBoundOperation op : bindingOperations.values()) { 1.153 op.freeze(owner); 1.154 } 1.155 1.156 @@ -214,15 +190,15 @@ 1.157 1.158 private void freezePayloadMap() { 1.159 if(style== Style.RPC) { 1.160 - payloadMap = new QNameMap<WSDLBoundOperationImpl>(); 1.161 - for(WSDLBoundOperationImpl op : bindingOperations.values()){ 1.162 - payloadMap.put(op.getReqPayloadName(), op); 1.163 + payloadMap = new QNameMap<EditableWSDLBoundOperation>(); 1.164 + for(EditableWSDLBoundOperation op : bindingOperations.values()){ 1.165 + payloadMap.put(op.getRequestPayloadName(), op); 1.166 } 1.167 } else { 1.168 - payloadMap = new QNameMap<WSDLBoundOperationImpl>(); 1.169 + payloadMap = new QNameMap<EditableWSDLBoundOperation>(); 1.170 // For doclit The tag will be the operation that has the same input part descriptor value 1.171 - for(WSDLBoundOperationImpl op : bindingOperations.values()){ 1.172 - QName name = op.getReqPayloadName(); 1.173 + for(EditableWSDLBoundOperation op : bindingOperations.values()){ 1.174 + QName name = op.getRequestPayloadName(); 1.175 if(name == null){ 1.176 //empty payload 1.177 emptyPayloadOperation = op;