-
Home
- Project Documentation Project Reports 11
CPD Results
The following document contains the results of PMD's CPD 6.55.0.
Duplications
File | Line |
---|---|
org/sentrysoftware/winrm/service/WinRMInvocationHandler.java | 83 |
org/sentrysoftware/winrm/service/client/WinRMInvocationHandler.java | 87 |
public class WinRMInvocationHandler implements InvocationHandler { public static final String WSMAN_SCHEMA_NAMESPACE = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"; private static final long PAUSE_TIME_MILLISECONDS = 500; private static final int MAX_RETRY = 3; private static final URL WSDL_LOCATION_URL = WinRMWebServiceClient.class.getClassLoader().getResource("wsdl/WinRM.wsdl"); private static final QName SERVICE = new QName(WSMAN_SCHEMA_NAMESPACE, "WinRMWebServiceClient"); private static final QName PORT = new QName(WSMAN_SCHEMA_NAMESPACE, "WinRMPort"); private static final List<String> CONTENT_TYPE_LIST = Collections.singletonList("application/soap+xml;charset=UTF-8"); @SuppressWarnings("rawtypes") private static final List<Handler> HANDLER_CHAIN = Arrays.asList(new StripShellResponseHandler()); private static final Registry<AuthSchemeProvider> AUTH_SCHEME_REGISTRY = RegistryBuilder.<AuthSchemeProvider>create() .register(AuthSchemes.SPNEGO, new NtlmMasqAsSpnegoSchemeFactory()) .register(AuthSchemes.KERBEROS, new KerberosSchemeFactory(true)) .build(); private static final Policy POLICY; static { POLICY = new Policy(); POLICY.addAssertion(new PrimitiveAssertion(MetadataConstants.USING_ADDRESSING_2004_QNAME)); } private static final WSAddressingFeature WS_ADDRESSING_FEATURE; static { WS_ADDRESSING_FEATURE = new WSAddressingFeature(); WS_ADDRESSING_FEATURE.setResponses(AddressingResponses.ANONYMOUS); } private static final TLSClientParameters TLS_CLIENT_PARAMETERS; static { TLS_CLIENT_PARAMETERS = new TLSClientParameters(); TLS_CLIENT_PARAMETERS.setDisableCNCheck(true); // Accept all certificates TLS_CLIENT_PARAMETERS.setTrustManagers(new TrustManager[] {new TrustAllX509Manager()}); } private static final Map<CredentialsMapKey, Credentials> CREDENTIALS = new ConcurrentHashMap<>(); private final WinRMWebService winRMWebService; private final WinRMEndpoint winRMEndpoint; private final long timeout; private final String resourceUri; private final Path ticketCache; private final Queue<AuthenticationEnum> authenticationsQueue; private AuthenticationEnum authentication; private Client wsClient; /** * WinRMInvocationHandler constructor * * @param winRMEndpoint Endpoint with credentials (mandatory) * @param bus Apache CXF Bus (mandatory) * @param timeout Timeout used for Connection, Connection Request and Receive Request in milliseconds * @param resourceUri The enumerate resource URI * @param ticketCache The Ticket Cache path * @param authentications List of authentications. (mandatory) */ public WinRMInvocationHandler( final WinRMEndpoint winRMEndpoint, final Bus bus, final long timeout, final String resourceUri, final Path ticketCache, final List<AuthenticationEnum> authentications) { Utils.checkNonNull(winRMEndpoint, "winRMEndpoint"); Utils.checkNonNull(bus, "bus"); Utils.checkNonNull(authentications, "authentications"); this.winRMEndpoint = winRMEndpoint; this.timeout = timeout; this.resourceUri = resourceUri; this.ticketCache = ticketCache; authenticationsQueue = authentications.stream().collect(Collectors.toCollection(LinkedList::new)); winRMWebService = createWinRMWebService(winRMEndpoint, bus); final AuthCredentials authCredentials = computeCredentials(winRMEndpoint, ticketCache, authenticationsQueue); authentication = authCredentials.getAuthentication(); wsClient = getWebServiceClient( winRMEndpoint, timeout, resourceUri, winRMWebService, authCredentials.getCredentials()); } public Client getClient() { return wsClient; } @Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { Utils.checkNonNull(method, "method"); try { return invokeMethod(method, args); } catch (final RetryTgtExpirationException e) { // retry with a new TGT in case of current TGT expiration authentication = null; Credentials credentials; try { credentials = KerberosUtils.createCredentials( winRMEndpoint.getUsername(), winRMEndpoint.getPassword(), ticketCache); CREDENTIALS.put( new CredentialsMapKey(winRMEndpoint, ticketCache, AuthenticationEnum.KERBEROS), credentials); // Normally that should not happen as any other exception on KERBEROs should had been throw // at the first KERBEROS call } catch (final Exception e1) { if (continueToRetry()) { final AuthCredentials authCredentials = computeCredentials(winRMEndpoint, ticketCache, authenticationsQueue); authentication = authCredentials.getAuthentication(); credentials = authCredentials.getCredentials(); } else { throw e1; } } wsClient = getWebServiceClient(winRMEndpoint, timeout, resourceUri, winRMWebService, credentials); return invoke(proxy, method, args); } catch (final RetryAuthenticationException e) { if (continueToRetry()) { final AuthCredentials authCredentials = computeCredentials(winRMEndpoint, ticketCache, authenticationsQueue); authentication = authCredentials.getAuthentication(); wsClient = getWebServiceClient( winRMEndpoint, timeout, resourceUri, winRMWebService, authCredentials.getCredentials()); return invoke(proxy, method, args); } // No more retries final Throwable cause = e.getCause(); if (cause instanceof SOAPFaultException) { throw new RuntimeException("KERBEROS with encryption over HTTP is not implemented.", cause); } throw cause; } } // this function is only needed for the unit testing boolean continueToRetry() { return !authenticationsQueue.isEmpty(); } Object invokeMethod(final Method method, final Object[] args) throws IllegalAccessException, RetryAuthenticationException { Throwable firstEx = null; int retry = 0; while (retry < MAX_RETRY) { retry++; try { return method.invoke(winRMWebService, args); } catch (final InvocationTargetException ite) { final Throwable targetEx = ite.getTargetException(); if (targetEx instanceof SOAPFaultException) { // Could retry with a different authentication than NTLM // because it could be a "WstxEOFException: Unexpected EOF in prolog" // due to a KERBEROS with HTTP and AllowUnencrypted=false if (winRMEndpoint.getProtocol() == WinRMHttpProtocolEnum.HTTP && authentication != AuthenticationEnum.NTLM) { throw new RetryAuthenticationException(targetEx); } throw (SOAPFaultException) targetEx; } if (!(targetEx instanceof WebServiceException)) { throw new IllegalStateException("Failure when calling " + createCallInfos(method, args), targetEx); } final WebServiceException wsEx = (WebServiceException) targetEx; if (!(wsEx.getCause() instanceof IOException)) { throw new RuntimeException( "Exception occurred while making WinRM WebService call " + createCallInfos(method, args), wsEx); } if (wsEx.getCause().getMessage() != null && wsEx.getCause().getMessage().startsWith("Authorization loop detected on Conduit")) { final RuntimeException authEx = new RuntimeException( String.format("Authentication error on %s with user name \"%s\"", winRMEndpoint.getEndpoint(), winRMEndpoint.getRawUsername())); // Could be due to a TGT expiration if (authentication == AuthenticationEnum.KERBEROS) { throw new RetryTgtExpirationException(authEx); } // Could retry with a different authentication throw new RetryAuthenticationException(authEx); } if (firstEx == null) { firstEx = wsEx; } if (retry < MAX_RETRY) { try { Utils.sleep(PAUSE_TIME_MILLISECONDS); } catch (final InterruptedException ie) { Thread.currentThread().interrupt(); throw new RuntimeException( "Exception occured while making WinRM WebService call " + createCallInfos(method, args), ie); } } } } throw new RuntimeException( String.format("failed task \"%s\" after %d attempts", createCallInfos(method, args), MAX_RETRY), firstEx); } static String createCallInfos(final Method method, final Object[] args) { final String name = method != null && method.getName() != null ? method.getName() : Utils.EMPTY; return args == null ? name : Stream.concat(Stream.of(name), Stream.of(args)) .filter(Objects::nonNull) .map(Object::toString) .collect(Collectors.joining(" ")); } static Credentials createCredentials( final WinRMEndpoint winRMEndpoint, final AuthenticationEnum authentication, final Path ticketCache) { switch (authentication) { case KERBEROS: return KerberosUtils.createCredentials( winRMEndpoint.getUsername(), winRMEndpoint.getPassword(), ticketCache); case NTLM: default: final String password = String.valueOf(winRMEndpoint.getPassword()); return winRMEndpoint.getProtocol() == WinRMHttpProtocolEnum.HTTP ? new NTCredentialsWithEncryption( winRMEndpoint.getUsername(), password, null, winRMEndpoint.getDomain()) : new NTCredentials( winRMEndpoint.getUsername(), password, null, winRMEndpoint.getDomain()); } } static AuthCredentials computeCredentials( final WinRMEndpoint winRMEndpoint, final Path ticketCache, final Queue<AuthenticationEnum> authenticationsQueue) { try { final AuthenticationEnum authenticationEnum = authenticationsQueue.remove(); final Credentials credentials = CREDENTIALS.compute( new CredentialsMapKey(winRMEndpoint, ticketCache, authenticationEnum), (user, cred) -> cred != null ? cred : createCredentials(winRMEndpoint, authenticationEnum, ticketCache)); return new AuthCredentials(authenticationEnum, credentials); } catch (final Exception e) { // if there's still retry if (!authenticationsQueue.isEmpty()) { return computeCredentials(winRMEndpoint, ticketCache, authenticationsQueue); } throw e; } } static WinRMWebService createWinRMWebService(final WinRMEndpoint winRMEndpoint, final Bus bus) { final JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean(); jaxWsProxyFactoryBean.setServiceName(SERVICE); jaxWsProxyFactoryBean.setEndpointName(PORT); jaxWsProxyFactoryBean.setBus(bus); jaxWsProxyFactoryBean.setServiceClass(WinRMWebService.class); jaxWsProxyFactoryBean.setAddress(winRMEndpoint.getEndpoint()); jaxWsProxyFactoryBean.getFeatures().add(WS_ADDRESSING_FEATURE); jaxWsProxyFactoryBean.setBindingId(SoapBindingConstants.SOAP12_BINDING_ID); jaxWsProxyFactoryBean.getClientFactoryBean().getServiceFactory().setWsdlURL(WSDL_LOCATION_URL); return jaxWsProxyFactoryBean.create(WinRMWebService.class); } static Client getWebServiceClient( final WinRMEndpoint winRMEndpoint, final long timeout, final String enumerateResourceUri, final WinRMWebService winRMWebService, final Credentials credentials) { final Client client = ClientProxy.getClient(winRMWebService); if (enumerateResourceUri != null) { final WSManHeaderInterceptor interceptor = new WSManHeaderInterceptor(enumerateResourceUri); client.getOutInterceptors().add(interceptor); } client.getInInterceptors().add(new DecryptAndVerifyInInterceptor()); client.getOutInterceptors().add(new SignAndEncryptOutInterceptor()); // this is different to endpoint properties client.getEndpoint().getEndpointInfo().setProperty( HTTPConduitFactory.class.getName(), new AsyncHttpEncryptionAwareConduitFactory()); final ServiceInfo serviceInfo = client.getEndpoint().getEndpointInfo().getService(); serviceInfo.setProperty("soap.force.doclit.bare", true); final BindingProvider bindingProvider = (BindingProvider) winRMWebService; bindingProvider.getBinding().setHandlerChain(HANDLER_CHAIN); bindingProvider.getRequestContext().put(PolicyConstants.POLICY_OVERRIDE, POLICY); bindingProvider.getRequestContext().put("http.autoredirect", true); bindingProvider.getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, winRMEndpoint.getEndpoint()); final Map<String, List<String>> headers = new HashMap<>(); headers.put("Content-Type", CONTENT_TYPE_LIST); bindingProvider.getRequestContext().put(Message.PROTOCOL_HEADERS, headers); // Setup timeouts final HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(timeout); httpClientPolicy.setConnectionRequestTimeout(timeout); httpClientPolicy.setReceiveTimeout(timeout); httpClientPolicy.setAllowChunking(false); bindingProvider.getRequestContext().put(Credentials.class.getName(), credentials); bindingProvider.getRequestContext().put(AuthSchemeProvider.class.getName(), AUTH_SCHEME_REGISTRY); final AsyncHTTPConduit asyncHTTPConduit = (AsyncHTTPConduit) client.getConduit(); asyncHTTPConduit.setClient(httpClientPolicy); asyncHTTPConduit.getClient().setAutoRedirect(true); asyncHTTPConduit.setTlsClientParameters(TLS_CLIENT_PARAMETERS); return client; } static class RetryAuthenticationException extends Exception { private static final long serialVersionUID = 1L; RetryAuthenticationException(final Throwable throwable) { super(throwable); } } static class RetryTgtExpirationException extends RetryAuthenticationException { private static final long serialVersionUID = 1L; RetryTgtExpirationException(final Throwable throwable) { super(throwable); } } static class AuthCredentials { private final AuthenticationEnum authentication; private final Credentials credentials; AuthCredentials(final AuthenticationEnum authentication, final Credentials credentials) { this.authentication = authentication; this.credentials = credentials; } public AuthenticationEnum getAuthentication() { return authentication; } public Credentials getCredentials() { return credentials; } @Override public int hashCode() { return Objects.hash(authentication, credentials); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AuthCredentials)) { return false; } final AuthCredentials other = (AuthCredentials) obj; return authentication == other.authentication && Objects.equals(credentials, other.credentials); } } static class CredentialsMapKey { private final String canonizedRawUsername; private final char[] password; private final Path ticketCache; private final AuthenticationEnum authentication; CredentialsMapKey( final WinRMEndpoint winRMEndpoint, final Path ticketCache, final AuthenticationEnum authentication) { this.ticketCache = ticketCache; this.authentication = authentication; password = winRMEndpoint.getPassword(); canonizedRawUsername = winRMEndpoint.getRawUsername() != null ? winRMEndpoint.getRawUsername().replaceAll("\\s", Utils.EMPTY).toUpperCase() : null; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(password); result = prime * result + Objects.hash(authentication, canonizedRawUsername, ticketCache); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CredentialsMapKey)) { return false; } final CredentialsMapKey other = (CredentialsMapKey) obj; return authentication == other.authentication && Objects.equals(canonizedRawUsername, other.canonizedRawUsername) && Arrays.equals(password, other.password) && Objects.equals(ticketCache, other.ticketCache); } } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/StripShellResponseHandler.java | 42 |
org/sentrysoftware/winrm/service/client/StripShellResponseHandler.java | 42 |
public class StripShellResponseHandler implements SOAPHandler<SOAPMessageContext> { @Override public boolean handleMessage(final SOAPMessageContext context) { final Boolean messageOutbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); if (messageOutbound != null && messageOutbound.booleanValue()) { return true; } final QName action = (QName) context.get(WSDL_OPERATION); if (action != null && !"Create".equals(action.getLocalPart())) { return true; } final Iterator<?> childIterator = getBodyChildren(context); while(childIterator.hasNext()) { final Object node = childIterator.next(); if (node instanceof SOAPElement) { final SOAPElement soapElement = (SOAPElement) node; if ("Shell".equals(soapElement.getLocalName())) { childIterator.remove(); } } } return true; } private Iterator<?> getBodyChildren(final SOAPMessageContext context) { try { final SOAPEnvelope envelope = context.getMessage().getSOAPPart().getEnvelope(); final SOAPBody body = envelope.getBody(); return body.getChildElements(); } catch (final SOAPException e) { throw new IllegalStateException(e); } } @Override public boolean handleFault(final SOAPMessageContext context) { return true; } @Override public void close(final MessageContext context) { // Do nothing } @Override public Set<QName> getHeaders() { return Collections.emptySet(); } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/WSManHeaderInterceptor.java | 44 |
org/sentrysoftware/winrm/service/client/WSManHeaderInterceptor.java | 44 |
public class WSManHeaderInterceptor extends AbstractSoapInterceptor { private static final JAXBDataBinding ATTRIBUTABLE_URI_JAXB_DATA_BINDING; static { try { ATTRIBUTABLE_URI_JAXB_DATA_BINDING = new JAXBDataBinding(AttributableURI.class); } catch (final JAXBException e) { throw new RuntimeException( "Failed to create JAXBDataBinding for: AttributableURI" + AttributableURI.class, e); } } private final String resourceUri; public WSManHeaderInterceptor(final String resourceUri) { super(Phase.POST_LOGICAL); addAfter(SoapPreProtocolOutInterceptor.class.getName()); Utils.checkNonNull(resourceUri, "resourceUri"); this.resourceUri = resourceUri; } @Override public void handleMessage(final SoapMessage message) throws Fault { final JAXBElement<String> resourceURI = new ObjectFactory().createResourceURI(resourceUri); final List<Header> headers = message.getHeaders(); headers.add( new Header(resourceURI.getName(), resourceURI, ATTRIBUTABLE_URI_JAXB_DATA_BINDING)); message.put(Header.HEADER_LIST, headers); } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerateResponse.java | 52 |
org/sentrysoftware/winrm/service/enumeration/RenewResponse.java | 52 |
@XmlElement(name = "EnumerationContext", required = true) protected EnumerationContextType enumerationContext; @XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the expires property. * * @return * possible object is * {@link String } * */ public String getExpires() { return expires; } /** * Sets the value of the expires property. * * @param value * allowed object is * {@link String } * */ public void setExpires(String value) { this.expires = value; } /** * Gets the value of the enumerationContext property. * * @return * possible object is * {@link EnumerationContextType } * */ public EnumerationContextType getEnumerationContext() { return enumerationContext; } /** * Sets the value of the enumerationContext property. * * @param value * allowed object is * {@link EnumerationContextType } * */ public void setEnumerationContext(EnumerationContextType value) { this.enumerationContext = value; } /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/WinRMWebService.java | 64 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 92 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 117 |
Signal signal, @WebParam(name = "ResourceURI", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "ResourceURI") String resourceURI, @WebParam(name = "MaxEnvelopeSize", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "MaxEnvelopeSize") int maxEnvelopeSize, @WebParam(name = "OperationTimeout", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "OperationTimeout") String operationTimeout, @WebParam(name = "Locale", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "Locale") Locale locale, @WebParam(name = "SelectorSet", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "SelectorSet") SelectorSetType selectorSet); /** * * @param receive * @param selectorSet * @param operationTimeout * @param resourceURI * @param locale * @param maxEnvelopeSize * @return * returns org.sentrysoftware.winrm.service.shell.ReceiveResponse */ @WebMethod(operationName = "Receive", action = "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive") |
File | Line |
---|---|
org/sentrysoftware/winrm/service/WinRMWebService.java | 64 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 92 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 117 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 174 |
Signal signal, @WebParam(name = "ResourceURI", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "ResourceURI") String resourceURI, @WebParam(name = "MaxEnvelopeSize", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "MaxEnvelopeSize") int maxEnvelopeSize, @WebParam(name = "OperationTimeout", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "OperationTimeout") String operationTimeout, @WebParam(name = "Locale", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "Locale") Locale locale, @WebParam(name = "SelectorSet", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "SelectorSet") SelectorSetType selectorSet); |
File | Line |
---|---|
org/sentrysoftware/winrm/service/WinRMWebService.java | 64 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 92 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 117 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 145 |
org/sentrysoftware/winrm/service/WinRMWebService.java | 174 |
Signal signal, @WebParam(name = "ResourceURI", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "ResourceURI") String resourceURI, @WebParam(name = "MaxEnvelopeSize", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "MaxEnvelopeSize") int maxEnvelopeSize, @WebParam(name = "OperationTimeout", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "OperationTimeout") String operationTimeout, @WebParam(name = "Locale", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "Locale") Locale locale, @WebParam(name = "SelectorSet", targetNamespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", header = true, partName = "SelectorSet") |
File | Line |
---|---|
org/sentrysoftware/winrm/service/wsman/AnyListType.java | 41 |
org/w3/_2005/_08/addressing/MetadataType.java | 41 |
org/w3/_2005/_08/addressing/ReferenceParametersType.java | 41 |
public class AnyListType { @XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/client/encryption/CipherGen.java | 504 |
org/sentrysoftware/winrm/service/client/encryption/CipherGen.java | 526 |
private static byte[] lmv2Hash(final String domain, final String user, final byte[] ntlmHash) throws NTLMEngineException { if (NTLMEngineUtils.UNICODE_LITTLE_UNMARKED == null) { throw new NTLMEngineException("Unicode not supported"); } final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash); // Upper case username, upper case domain! hmacMD5.update( user.toUpperCase(Locale.ROOT).getBytes(NTLMEngineUtils.UNICODE_LITTLE_UNMARKED)); if (domain != null) { hmacMD5.update( domain.toUpperCase(Locale.ROOT).getBytes(NTLMEngineUtils.UNICODE_LITTLE_UNMARKED)); |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerationContextType.java | 46 |
org/sentrysoftware/winrm/service/wsman/MixedDataType.java | 46 |
protected List<Object> content; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the content property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the content property. * * <p> * For example, to add a new item, do as follows: * <pre> * getContent().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * {@link String } * * */ public List<Object> getContent() { if (content == null) { content = new ArrayList<Object>(); } return this.content; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/wsman/AttributableURI.java | 36 |
org/w3/_2005/_08/addressing/AttributedURIType.java | 36 |
org/xmlsoap/schemas/ws/_2004/_08/addressing/AttributedURI.java | 36 |
public class AttributableURI { @XmlValue @XmlSchemaType(name = "anyURI") protected String value; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/xmlsoap/schemas/ws/_2004/_08/addressing/ReplyAfterType.java | 37 |
org/xmlsoap/schemas/ws/_2004/_08/addressing/RetryAfterType.java | 37 |
public class ReplyAfterType { @XmlValue @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger value; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the value property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link BigInteger } * */ public void setValue(BigInteger value) { this.value = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerateResponse.java | 91 |
org/sentrysoftware/winrm/service/enumeration/GetStatus.java | 63 |
org/sentrysoftware/winrm/service/enumeration/RenewResponse.java | 91 |
public EnumerationContextType getEnumerationContext() { return enumerationContext; } /** * Sets the value of the enumerationContext property. * * @param value * allowed object is * {@link EnumerationContextType } * */ public void setEnumerationContext(EnumerationContextType value) { this.enumerationContext = value; } /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/GetStatusResponse.java | 63 |
org/sentrysoftware/winrm/service/enumeration/Renew.java | 91 |
public String getExpires() { return expires; } /** * Sets the value of the expires property. * * @param value * allowed object is * {@link String } * */ public void setExpires(String value) { this.expires = value; } /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/w3/_2005/_08/addressing/AttributedQNameType.java | 35 |
org/xmlsoap/schemas/ws/_2004/_08/addressing/AttributedQName.java | 35 |
public class AttributedQNameType { @XmlValue protected QName value; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the value property. * * @return * possible object is * {@link QName } * */ public QName getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link QName } * */ public void setValue(QName value) { this.value = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/w3/_2005/_08/addressing/AttributedUnsignedLongType.java | 40 |
org/xmlsoap/schemas/ws/_2004/_08/addressing/ReplyAfterType.java | 40 |
org/xmlsoap/schemas/ws/_2004/_08/addressing/RetryAfterType.java | 40 |
@XmlSchemaType(name = "unsignedLong") protected BigInteger value; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the value property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link BigInteger } * */ public void setValue(BigInteger value) { this.value = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerationEnd.java | 58 |
org/sentrysoftware/winrm/service/enumeration/Renew.java | 54 |
@XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the enumerationContext property. * * @return * possible object is * {@link EnumerationContextType } * */ public EnumerationContextType getEnumerationContext() { return enumerationContext; } /** * Sets the value of the enumerationContext property. * * @param value * allowed object is * {@link EnumerationContextType } * */ public void setEnumerationContext(EnumerationContextType value) { this.enumerationContext = value; } /** * Gets the value of the code property. * * @return * possible object is * {@link String } * */ public String getCode() { |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerateResponse.java | 54 |
org/sentrysoftware/winrm/service/enumeration/GetStatusResponse.java | 50 |
org/sentrysoftware/winrm/service/enumeration/RenewResponse.java | 54 |
@XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the expires property. * * @return * possible object is * {@link String } * */ public String getExpires() { return expires; } /** * Sets the value of the expires property. * * @param value * allowed object is * {@link String } * */ public void setExpires(String value) { this.expires = value; } /** * Gets the value of the enumerationContext property. * * @return * possible object is * {@link EnumerationContextType } * */ public EnumerationContextType getEnumerationContext() { |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerationEnd.java | 58 |
org/sentrysoftware/winrm/service/enumeration/GetStatus.java | 50 |
org/sentrysoftware/winrm/service/enumeration/Pull.java | 67 |
org/sentrysoftware/winrm/service/enumeration/Renew.java | 54 |
@XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the enumerationContext property. * * @return * possible object is * {@link EnumerationContextType } * */ public EnumerationContextType getEnumerationContext() { return enumerationContext; } /** * Sets the value of the enumerationContext property. * * @param value * allowed object is * {@link EnumerationContextType } * */ public void setEnumerationContext(EnumerationContextType value) { this.enumerationContext = value; } /** * Gets the value of the code property. * * @return * possible object is * {@link String } * */ public String getCode() { |
File | Line |
---|---|
org/sentrysoftware/winrm/service/WinRMService.java | 406 |
org/sentrysoftware/winrm/service/WinRMService.java | 445 |
}, timeout); } catch (final InterruptedException | ExecutionException e) { if (e.getCause() != null) { throw new WinRMException(e.getCause(), e.getCause().getMessage()); } throw new WinRMException(e); } } |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/FilterType.java | 53 |
org/sentrysoftware/winrm/service/wsman/SelectorType.java | 56 |
@XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the content property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the content property. * * <p> * For example, to add a new item, do as follows: * <pre> * getContent().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * {@link String } * * */ public List<Object> getContent() { if (content == null) { content = new ArrayList<Object>(); } return this.content; } /** * Gets the value of the dialect property. * * @return * possible object is * {@link String } * */ public String getDialect() { |
File | Line |
---|---|
org/sentrysoftware/winrm/service/enumeration/EnumerationContextType.java | 47 |
org/sentrysoftware/winrm/service/enumeration/FilterType.java | 53 |
org/sentrysoftware/winrm/service/wsman/MixedDataType.java | 47 |
org/sentrysoftware/winrm/service/wsman/SelectorType.java | 56 |
@XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the content property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the content property. * * <p> * For example, to add a new item, do as follows: * <pre> * getContent().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * {@link String } * * */ public List<Object> getContent() { if (content == null) { content = new ArrayList<Object>(); } return this.content; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { |
Search Results for {{siteSearch | truncate:'50'}}
{{resultArray.length}}
No results.