Please enable JavaScript to view this site.

Altova MapForce Server 2020 Advanced Edition

MapForce Server API > API Reference (Java) > Classes > MapForceServer > Methods

addCredentialPropertiesFromMap

Scroll Home Prev Top Next More

Adds properties from a credential property map to the current credential. This method takes as argument a credential property map (property_name, property_value). This method must be called after calling beginCredential() and before calling endCredential(). As an alternative to calling this method, you can also call AddCredentialProperty().

 

Signature

addCredentialPropertiesFromMap(arg0:Map) -> void

 

Parameters

Name

Type

Description

arg0

Map

A map that supplies the name of the credential property and its value.

 

Examples

The following code listing illustrates adding a credential called "mycredential" to the current context, using the addCredentialPropertiesFromMap method.

 

//Create a MapForce Server object

com.altova.mapforceserver.MapForceServer objMFS = new com.altova.mapforceserver.MapForceServer();

 

objMFS.beginCredential("mycredential");

java.util.Map<String, String> credentialMap = new java.util.HashMap<String,String>();

credentialMap.put("username", "altova");

credentialMap.put("password", "b45ax78!");

objMFS.addCredentialPropertiesFromMap(credentialMap);

objMFS.endCredential();

© 2019 Altova GmbH