protected WsrfResourceStub(EndpointReference resourceEpr, long timeout) { this.resourceEndpointReference = resourceEpr; logger.info("resourceEprInWsrfResourceStub Constructor" + resourceEpr.toString()); timeoutInMilliSeconds = timeout; opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(resourceEpr); opts.setTimeOutInMilliSeconds(timeout); }
protected WsrfResourceStub(EndpointReference resourceEpr, long timeout) { this.resourceEndpointReference = resourceEpr; logger.info("resourceEprInWsrfResourceStub Constructor" + resourceEpr.toString()); timeoutInMilliSeconds = timeout; opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(resourceEpr); opts.setTimeOutInMilliSeconds(timeout); }
public void recordRequestStartTime(NHttpClientConnection conn, Axis2HttpRequest axis2Req) { if (conn != null) { this.connectionCreationTime = (Long) conn.getContext().getAttribute( ClientHandler.CONNECTION_CREATION_TIME); try { HttpRequest request = axis2Req.getRequest(); RequestLine requestLine = request.getRequestLine(); this.lastRequestProtocol = requestLine.getProtocolVersion().toString(); this.lastRequestHTTPMethod = requestLine.getMethod(); this.headers = request.getAllHeaders(); } catch (IOException ignore) { } catch (HttpException ignore) { } } if (this.lastRequestStartTime != 0) { if (previousRequestAttempts == null) { previousRequestAttempts = new StringBuffer(); } else { previousRequestAttempts.append(fieldSeparator); } previousRequestAttempts.append("Attempt-Info").append(keyValueSeparator).append("{"); previousRequestAttempts.append("Req-Start-Time").append(keyValueSeparator) .append(format(this.lastRequestStartTime)); previousRequestAttempts.append(fieldSeparator); previousRequestAttempts.append("Req-URL").append(keyValueSeparator) .append(this.lastRequestEPR).append("}"); } this.lastRequestStartTime = System.currentTimeMillis(); this.lastRequestEPR = axis2Req.getEpr().toString(); }
private int getTenantId(MessageContext synCtx){ String url = synCtx.getTo().toString(); int tenantId = getTenantId(url); // tenantId = 0 because domain name was null. May be this is the SSO response if(tenantId == 0 && url.contains(MultitenantConstants.TENANT_DOMAIN+"=")){ // OK,this is the SAML SSO response from the IS // e.g url = https://localhost:9444/acs?teantDomain=domain String domainName = url.split("=").clone()[1]; // return tenant id if domain name is not null if (domainName != null) { try { return ConfigHolder.getInstance().getRealmService().getTenantManager().getTenantId(domainName); } catch (org.wso2.carbon.user.api.UserStoreException e) { log.error("An error occurred while obtaining the tenant id.", e); } } } return tenantId; }
int tenantId = AutoscaleUtil.getTenantId(synCtx.getTo().toString());
to = endpoint.getAddress(synapseOutMessageContext); } else { to = synapseOutMessageContext.getTo().toString();
to = endpoint.getAddress(synapseOutMessageContext); } else { to = synapseOutMessageContext.getTo().toString();