public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocation(s); } }
protected static EndpointInfo getAddressValue(EndpointInfo ei, boolean dp) { if (dp) { String eiAddress = ei.getAddress(); if (eiAddress == null) { try { ServerSocket s = new ServerSocket(0); ei.setAddress("http://localhost:" + s.getLocalPort()); s.close(); return ei; } catch (IOException ex) { // problem allocating a random port, go to the default one ei.setAddress("http://localhost"); } } String addr = StringUtils.addDefaultPortIfMissing(ei.getAddress()); if (addr != null) { ei.setAddress(addr); } } return ei; }
public EndpointInfo createEndpointInfo( ServiceInfo serviceInfo, BindingInfo b, List<?> ees ) { if (ees != null) { for (Iterator<?> itr = ees.iterator(); itr.hasNext();) { Object extensor = itr.next(); if (extensor instanceof AddressType) { final AddressType httpAdd = (AddressType)extensor; EndpointInfo info = new HttpEndpointInfo(serviceInfo, "http://schemas.xmlsoap.org/wsdl/http/"); info.setAddress(httpAdd.getLocation()); info.addExtensor(httpAdd); return info; } } } HttpEndpointInfo hei = new HttpEndpointInfo(serviceInfo, "http://schemas.xmlsoap.org/wsdl/http/"); AddressType at = new AddressType(); hei.addExtensor(at); return hei; }
public static void setAddress(AbstractDestination dest, String absAddress) { dest.getEndpointInfo().setAddress(absAddress); if (dest.getEndpointInfo().getExtensor(AddressType.class) != null) { dest.getEndpointInfo().getExtensor(AddressType.class).setLocation(absAddress); } } }
&& portInfo.getAddress() != null && !portInfo.getAddress().equals(ei.getAddress())) { ei.setAddress(portInfo.getAddress());
ei.setAddress(address); ei.setBinding(bindingInfo);
@Override public void handle(HttpExchange exchange) throws IOException { try { //Update address in EndpointInfo; this can only happen here, //as the contextPath is provided in the HttpExchange only EndpointInfo ei = destination.getEndpointInfo(); if (ei != null) { String ad = ei.getAddress(); String path = exchange.getHttpContext().getPath(); if (ad != null && ad.equals(path)) { synchronized (ei) { String contextPath = exchange.getContextPath(); ei.setAddress(contextPath + path); if (ei.getExtensor(AddressType.class) != null) { ei.getExtensor(AddressType.class).setLocation(contextPath + path); } else if (ei.getExtensor(SoapAddress.class) != null) { ei.getExtensor(SoapAddress.class).setLocationURI(contextPath + path); } } } } //service request destination.doService(new HttpServletRequestAdapter(exchange), new HttpServletResponseAdapter(exchange)); } finally { exchange.close(); } }
EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo(); if (endpointInfo.getAddress() == null || !endpointInfo.getAddress().contains(addr)) { endpointInfo.setAddress(addr);
client.getEndpoint().getEndpointInfo().setAddress(clientFac.getAddress()); } else { client.getEndpoint().getEndpointInfo().setAddress(portInfo.getAddress());
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocation(s); } }
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocationURI(s); } }
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocationURI(s); } }
@Override public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocation(s); } }
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocation(s); } }
synchronized void updateAddress(URI request) { if (this.address == null) { String requestAddress = CXFWebServiceContainer.getBaseUri(request); getEndpoint().getEndpointInfo().setAddress(requestAddress); this.address = requestAddress; } }
private synchronized String updateEndpointAddress(String addr) { // only update the EndpointAddress if the base path is equal // make sure we don't broke the get operation?parament query String address = removeTrailingSeparator(endpointInfo.getAddress()); if (getBasePathForFullAddress(address) .equals(removeTrailingSeparator(getStem(getBasePathForFullAddress(addr))))) { endpointInfo.setAddress(addr); } return address; }
public static void setAddress(AbstractDestination dest, String absAddress) { dest.getEndpointInfo().setAddress(absAddress); if (dest.getEndpointInfo().getExtensor(AddressType.class) != null) { dest.getEndpointInfo().getExtensor(AddressType.class).setLocation(absAddress); } } }
public static void setAddress(AbstractDestination dest, String absAddress) { dest.getEndpointInfo().setAddress(absAddress); if (WSDLLibrary.isAvailable() && dest.getEndpointInfo().getExtensor(AddressType.class) != null) { dest.getEndpointInfo().getExtensor(AddressType.class).setLocation(absAddress); } } }
@Override public synchronized void prepare(Message message) { EndpointInfo ei = getEndpoint().getEndpointInfo(); ei.setAddress(Server.ADDRESS3); message.put(Message.ENDPOINT_ADDRESS, Server.ADDRESS3); super.prepare(message); }
private void unregisterServStatic(String add) throws Exception { Bus bus = getStaticBus(); DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); DestinationFactory df = dfm .getDestinationFactory("http://cxf.apache.org/transports/http/configuration"); EndpointInfo ei = new EndpointInfo(); ei.setAddress(add); Destination d = df.getDestination(ei, bus); d.setMessageObserver(null); }