@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(); } }
public ExtensibilityElement createExtension(final boolean isSOAP12, final String address) throws WSDLException { SoapAddress soapAddress = null; soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSOAP12); soapAddress.setLocationURI(address); return soapAddress; } }
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); } }
public ExtensibilityElement createExtension(final boolean isSOAP12, final String address) throws WSDLException { SoapAddress soapAddress = null; soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSOAP12); soapAddress.setLocationURI(address); return soapAddress; } }
private void createSoapExtensors(Bus bus, EndpointInfo ei, SoapBindingInfo bi, boolean isSoap12) { try { String address = ei.getAddress(); if (address == null) { address = "http://localhost:9090"; } ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry(); SoapAddress soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSoap12); soapAddress.setLocationURI(address); ei.addExtensor(soapAddress); } catch (WSDLException e) { e.printStackTrace(); } }
private void createSoapExtensors(Bus bus, EndpointInfo ei, SoapBindingInfo bi, boolean isSoap12) { try { String address = ei.getAddress(); if (address == null) { address = "http://localhost:9090"; } ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry(); SoapAddress soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSoap12); soapAddress.setLocationURI(address); ei.addExtensor(soapAddress); } catch (WSDLException e) { e.printStackTrace(); } }
@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(); } }