src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java

changeset 408
b0610cd08440
parent 368
0989ad8c0860
child 637
9c07ef4934dd
equal deleted inserted replaced
405:cc682329886b 408:b0610cd08440
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
34 import com.sun.xml.internal.ws.api.policy.PolicyResolver; 34 import com.sun.xml.internal.ws.api.policy.PolicyResolver;
35 import com.sun.xml.internal.ws.api.client.WSPortInfo; 35 import com.sun.xml.internal.ws.api.client.WSPortInfo;
36 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 36 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
37 import com.sun.xml.internal.ws.binding.BindingImpl; 37 import com.sun.xml.internal.ws.binding.BindingImpl;
38 import com.sun.xml.internal.ws.binding.WebServiceFeatureList; 38 import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
39 import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
40 import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
41 import com.sun.xml.internal.ws.policy.PolicyMap; 39 import com.sun.xml.internal.ws.policy.PolicyMap;
42 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil; 40 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
43 41
44 import javax.xml.namespace.QName; 42 import javax.xml.namespace.QName;
45 import javax.xml.ws.WebServiceFeature; 43 import javax.xml.ws.WebServiceFeature;
94 } 92 }
95 93
96 public PolicyMap createPolicyMap() { 94 public PolicyMap createPolicyMap() {
97 PolicyMap map; 95 PolicyMap map;
98 if(portModel != null) { 96 if(portModel != null) {
99 map = ((WSDLModelImpl) portModel.getOwner().getParent()).getPolicyMap(); 97 map = portModel.getOwner().getParent().getPolicyMap();
100 } else { 98 } else {
101 map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer())); 99 map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
102 } 100 }
103 //still map is null, create a empty map 101 //still map is null, create a empty map
104 if(map == null) 102 if(map == null)
152 150
153 //This method is used for Dispatch client only 151 //This method is used for Dispatch client only
154 private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) { 152 private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) {
155 153
156 if (owner.getWsdlService() != null){ 154 if (owner.getWsdlService() != null){
157 Iterable<WSDLPortImpl> ports = owner.getWsdlService().getPorts(); 155 Iterable<? extends WSDLPort> ports = owner.getWsdlService().getPorts();
158 for (WSDLPortImpl port : ports){ 156 for (WSDLPort port : ports){
159 if (port.getName().equals(portName)) 157 if (port.getName().equals(portName))
160 return port; 158 return port;
161 } 159 }
162 } 160 }
163 return null; 161 return null;

mercurial