Refine search
QName name = new QName(serviceName.getNamespaceURI(), port.getName()); = CastUtils.cast(port.getBinding().getExtensibilityElements()); if (!extensions.isEmpty()) { ExtensibilityElement e = extensions.get(0); extensions = CastUtils.cast(port.getExtensibilityElements()); if (!extensions.isEmpty()) { ExtensibilityElement e = extensions.get(0); address = ((SOAP12Address)e).getLocationURI(); } else if (e instanceof SOAPAddress) { address = ((SOAPAddress)e).getLocationURI(); } else if (e instanceof HTTPAddress) { address = ((HTTPAddress)e).getLocationURI();
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAPAddress soapAddress = (SOAPAddress)extReg.createExtension(parentType, elementType); String locationURI = DOMUtils.getAttribute(el, Constants.ATTR_LOCATION); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (locationURI != null) { soapAddress.setLocationURI(locationURI); } if (requiredStr != null) { soapAddress.setRequired(new Boolean(requiredStr)); } return soapAddress; } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAPAddress soapAddress = (SOAPAddress)extension; if (soapAddress != null) { String tagName = DOMUtils.getQualifiedValue(SOAPConstants.NS_URI_SOAP, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, soapAddress.getLocationURI(), pw); Boolean required = soapAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
public static String getPortAddress(Port port) { Object ext = port.getExtensibilityElements().get(0); if (ext instanceof SOAPAddress) { return ((SOAPAddress)ext).getLocationURI(); } if (ext instanceof SOAP12Address) { return ((SOAP12Address)ext).getLocationURI(); } return null; }
public List<String> getOperationEndpointLocations(String operationName) { List<String> result = new ArrayList<String>(); Collection<Service> services = getDefinition().getServices().values(); Binding binding = getBinding(operationName); for (Service service : services) { Collection<Port> ports = service.getPorts().values(); for (Port port : ports) { if (port.getBinding().equals(binding)) { for (Object obj : port.getExtensibilityElements()) { if (obj instanceof SOAPAddress) { SOAPAddress address = (SOAPAddress) obj; String endpoint = address.getLocationURI(); result.add(endpoint); } } } } } return result; }
private static Port copyPort(Definition def, Port port, WebServiceBinding wsBinding) { Port newPort = def.createPort(); newPort.setName(port.getName()); newPort.setBinding(port.getBinding()); List portExtensions = port.getExtensibilityElements(); for (final Object extension : portExtensions) { ((SOAPAddress)newExt).setLocationURI(uri); newPort.addExtensibilityElement(newExt); } else if (extension instanceof SOAP12Address) {
public void generate() { Service service = definition.createService(); service.setQName(new QName(WSDLConstants.WSDL_PREFIX, wmodel.getServiceName())); Port port = definition.createPort(); port.setName(wmodel.getPortName()); Binding binding = definition.createBinding(); String targetNameSpace = wmodel.getTargetNameSpace(); binding.setQName(new QName(targetNameSpace, wmodel.getPortTypeName() + "Binding")); port.setBinding(binding); SOAPAddress soapAddress = null; try { soapAddress = (SOAPAddress)extensionRegistry .createExtension(Port.class, new QName(WSDLConstants.SOAP11_NAMESPACE, "address")); soapAddress.setLocationURI(ADDRESS_URI); } catch (WSDLException e) { throw new ToolException(e.getMessage(), e); } port.addExtensibilityElement(soapAddress); service.addPort(port); definition.addService(service); } }
while (portItr.hasNext()) { Port port = (Port) portItr.next(); AxisEndpoint endpoint = getAxisEndpoint(port.getName()); List list = port.getExtensibilityElements(); for (int i = 0; i < list.size(); i++) { Object extensibilityEle = list.get(i); if (extensibilityEle instanceof SOAPAddress) { SOAPAddress soapAddress = (SOAPAddress) extensibilityEle; String existingAddress = soapAddress.getLocationURI(); if (existingAddress == null || existingAddress if (endpoint != null) { ((SOAPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL(requestIP)); } else { ((SOAPAddress) extensibilityEle) .setLocationURI(getEPRs()[0]); if (endpoint != null) { ((SOAPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL()); } else { ((SOAPAddress) extensibilityEle) .setLocationURI(getLocationURI( getEPRs(), existingAddress));
protected void setSoapAddressLocationOn(Port port, String url) { List<?> extensions = port.getExtensibilityElements(); for (Object extension : extensions) { if (extension instanceof SOAP12Address) { ((SOAP12Address)extension).setLocationURI(url); } else if (extension instanceof SOAPAddress) { ((SOAPAddress)extension).setLocationURI(url); } } }
protected void visit(Port port) { SOAPAddress add = DefinitionsHelper.getSOAPAddress(port); SOAPBinding sbind = DefinitionsHelper.getSOAPBinding(port.getBinding()); org.codehaus.xfire.service.Binding binding = getService().getBinding(port.getBinding().getQName()); if (binding != null) { Endpoint ep = new Endpoint(new QName(getService().getTargetNamespace(), port.getName()), binding, add.getLocationURI()); getService().addEndpoint(ep); } } }
/** * Filters the WSDL document. * * @param definition location pointing to a WSDL XML definition. * @param propertyResolver the Property Resolver */ public static void filterWSDL(Definition definition, PropertyResolver propertyResolver) { for (Object serviceObject : definition.getServices().values()) { Service service = (Service) serviceObject; for (Object portObject : service.getPorts().values()) { Port port = (Port) portObject; for (Object extObject : port.getExtensibilityElements()) { if (extObject instanceof SOAPAddress) { SOAPAddress address = (SOAPAddress) extObject; String toReplace = Strings.replaceProperties(address.getLocationURI(), propertyResolver); if (!toReplace.isEmpty() && !toReplace.equals(address.getLocationURI())) { address.setLocationURI(toReplace); } } } } } }
setEndpoint(port.getName()); } else { throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() marshaler.setBaseUrl(getLocationURI()); } else if (sa11 != null) { marshaler.setBaseUrl(sa11.getLocationURI()); } else if (sa12 != null) { marshaler.setBaseUrl(sa12.getLocationURI()); } else { throw new DeploymentException("No locationURI set and no SOAP address defined on port '" + port.getName() + "'");
/** * (non-Javadoc) * @see org.eclipse.wst.wsi.wsdl.traversal.WSDLVisitor#visit(Port, Object, WSDLTraversalContext) */ public void visit(Port obj, Object parent, WSDLTraversalContext ctx) { if(obj != null) { Iterator it = obj.getExtensibilityElements().iterator(); while (it.hasNext()) { Object e = (Object) it.next(); // for each SOAPAddress elements check LocationURI if(e instanceof SOAPAddress) { if(isRelativeURI(((SOAPAddress) e).getLocationURI())) { errorList.add(((SOAPAddress) e).getElementType() + ":" + ((SOAPAddress) e).getLocationURI()); } } } } }
/** * Get the SOAP address location for the specified port. * * @param p * A WSDL Port instance. * @return The SOAP address URI. */ protected static String getSOAPAddress( Port p ) { ExtensibilityElement e = findExtensibilityElement( p, SOAP_PORT_ADDRESS_NAME ); if ( e instanceof SOAP12Address ) { return ( (SOAP12Address) e ).getLocationURI(); } else if ( e instanceof SOAPAddress ) { return ( (SOAPAddress) e ).getLocationURI(); } return null; }
setEndpoint(port.getName()); } else { throw new DeploymentException( soapAddress.setLocationURI(getLocationURI()); } else { SOAP12Address soap12Address = WSDLUtils.getExtension(port, SOAP12Address.class);
public Port createPort(Definition definition, Binding binding, Service service, String uri) { try { Port port = definition.createPort(); port.setBinding(binding); configurePort(port, binding); if (uri != null) { ExtensibilityElement portExtension = definition.getExtensionRegistry().createExtension(Port.class, soapAddress); if (requiresSOAP12) { ((SOAP12Address)portExtension).setLocationURI(uri); } else { ((SOAPAddress)portExtension).setLocationURI(uri); } port.addExtensibilityElement(portExtension); } service.addPort(port); return port; } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
for (Object e : l) { if (e instanceof SOAPAddress) { String add = ((SOAPAddress)e).getLocationURI(); int idx = add.indexOf("jndiURL="); if (idx != -1) { + "jndiURL=" + encodedUrl + (idx2 == -1 ? "" : add.substring(idx2)); ((SOAPAddress)e).setLocationURI(add);
public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); address.setLocationURI("dummy"); return address; } public static javax.wsdl.Service doAppendService(Definition wsdlDefinition,
soapAddress.setLocationURI((String)env.get(ToolConstants.CFG_ADDRESS)); } else { soapAddress.setLocationURI(HTTP_PREFIX + "/" + env.get(ToolConstants.CFG_SERVICE) + "/" + env.get(ToolConstants.CFG_PORT)); port.addExtensibilityElement(soapAddress); } else if ("jms".equalsIgnoreCase((String)env.get(ToolConstants.CFG_TRANSPORT))) { JMSAddress jmsAddress = null; throw new ToolException(msg, wse); port.addExtensibilityElement(jmsAddress);
/** * @param port analyzed port * @return Returns the endpoint URL of the given Port */ private String getSOAPLocation(Port port) { String endpoint = null; @SuppressWarnings("unchecked") List<ExtensibilityElement> extensions = port.getExtensibilityElements(); for (Iterator<ExtensibilityElement> i = extensions.iterator(); i.hasNext();) { ExtensibilityElement ext = i.next(); if (ext instanceof SOAPAddress) { SOAPAddress addr = (SOAPAddress) ext; endpoint = addr.getLocationURI(); } } return endpoint; }