希望通过SoapUI groovy脚本在Azure上建立cosmos数据库连接。
import com.microsoft.azure.documentdb.*;
import org.apache.http.*;
import com.google.gson.Gson;
def END_POINT = 'https://XXXXXXXXX.documents.azure.com:443'
def MASTER_KEY = 'XXXXXiAdtwC12HmwrpE83I5zWS76T4FznonFQ2UV3EWJrqorIc6LkoDhvKkfa00XPHFyAtOKRLTHXFcWTD1g=='
def databaseId = 'testdb12'
def collectionId = 'XXXXXXXXXXXX'
Database databaseCache;
DocumentCollection collectionCache;
DocumentClient documentClient = new DocumentClient(END_POINT,MASTER_KEY,ConnectionPolicy.GetDefault(),ConsistencyLevel.Session)
Database databaseDefinition = new Database()
databaseDefinition.setId(databaseId)
databaseCache = documentClient.createDatabase(databaseDefinition, null).getResource()
错误:
java.lang.NoSuchMethodError:org.apache.http.impl.conn.DefaultClientConnectionOperator。 (Lorg /阿帕奇/ HTTP /康恩/方案/ SchemeRegistry; Lorg /阿帕奇/ HTTP /康恩/使用DNSResolver)
我在这一行设置了错误
DocumentClient documentClient = new DocumentClient(END_POINT,MASTER_KEY,ConnectionPolicy.GetDefault(),ConsistencyLevel.Session)
我已经尝试过几乎所有的jar文件。
请添加一些有价值的解决方案。