/** @see SoapClientHandler#putAllHttpHeaders(Object, Map) */ @Override public void putAllHttpHeaders(Stub soapClient, Map<String, String> headersMap) { @SuppressWarnings("unchecked") Hashtable<String, String> headers = (Hashtable<String, String>) soapClient._getProperty(HTTPConstants.REQUEST_HEADERS); if (headers == null) { headers = new Hashtable<String, String>(); } headers.putAll(headersMap); soapClient._setProperty(HTTPConstants.REQUEST_HEADERS, headers); }
public void loadSession(String url, String cookieString) throws Exception { if (_service != null) { disconnect(); } _locator = new VimServiceLocator(); _locator.setMaintainSession(true); _service = _locator.getVimPort(new URL(url)); org.apache.axis.client.Stub st = (org.apache.axis.client.Stub) _service; st._setProperty(org.apache.axis.transport.http.HTTPConstants.HEADER_COOKIE, cookieString); _locator.setMaintainSession(true); _sic = _service.retrieveServiceContent(_svcRef); }
private MarathonWS2Soap_PortType getService() throws FileNotFoundException, ServiceException, Exception { EngineConfiguration config = getAxisEngine(); // String monitorServiceUrl = // "http://localhost/SvcFasteignaskra_0201/Fasteignaskra.asmx"; MarathonWS2Locator locator = new MarathonWS2Locator(config); locator.setEndpointAddress("MarathonWS2Soap", getServiceUrl()); MarathonWS2Soap_PortType port = locator.getMarathonWS2Soap(); Stub stub = (Stub) port; stub._setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); stub._setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT); stub._setProperty(WSHandlerConstants.USER, getUserName()); // stub._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, this.getClass().getName()); stub._setProperty(WSHandlerConstants.PW_CALLBACK_REF, this); return port; }
/** * Sets the endpoint address of the given SOAP client. * * @param soapClient the SOAP client to set the endpoint address for * @param endpointAddress the target endpoint address */ @Override public void setEndpointAddress(Stub soapClient, String endpointAddress) { soapClient._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, endpointAddress); }
/** * Set whether SOAP requests should use compression. * * @param soapClient the client to set compression settings for * @param compress whether or not to use compression */ @Override public void setCompression(Stub soapClient, boolean compress) { soapClient._setProperty(HTTPConstants.MC_ACCEPT_GZIP, compress); soapClient._setProperty(HTTPConstants.MC_GZIP_REQUEST, compress); }
/** * Clears all of the SOAP headers from the given SOAP client. * * @param soapClient the client to remove the headers from */ @Override public void clearHeaders(Stub soapClient) { soapClient._setProperty(HTTPConstants.REQUEST_HEADERS, new Hashtable<String, String>()); soapClient.clearHeaders(); }