进行中

convert VBA code into Java for Rest API

I am trying to get a Token from the Intranet Server using REST API and in the process not getting error but no token result

The VBA code that works is

With oHttp

.Open "Post", "http://xxxx:8480/rest/v1/auth/token", False

.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

.setRequestHeader "accept", "application/json"

.send ("grant_type=password&client_id=yyyy-client&client_secret=xrsc-7dbd-44f4-8d51-fbcc836bdb7b&username=zzz&password=zzzzzz")

'Wait for request to finish

Do While [login to view URL] <> 4

DoEvents

Loop

MsgBox (.responseText)

Set JSONa = [login to view URL](.responseText)

strToken = "Bearer " & JSONa("access_token")

'.Open "Get", "http://xxxx:8480/rest/v1/domain/data/WELL?qc=CODE,=,370053109800-00&qa=OBJECT_ID,CODE,NAME&stripmeta=true", False

' .setRequestHeader "Authorization", strToken

'.send

[login to view URL] .responseText

MsgBox strToken

If Not .Status = 200 Then

MsgBox "UnAuthorized"

Exit Sub

End If

End With

Set oHttp = Nothing

技能: Excel VBA, Java, Javascript, HTTP

查看更多: excel macro rest api call, vba rest api json, calling rest api from excel vba, calling jira rest api from excel vba, how to use api in excel 2010, vba rest api post, vba api call example, connect api to excel, convert zip code java, myspace java rest api, convert vba code php code, convert jar code java code, convert vba code perl examples, convert vba code vbnet, convert delphi code java, convert easylanguage code java, convert vba code vb, tool convert matlab code java, convert perl code java, convert vba code

关于此雇主:
( 1条评论 ) Sugar Land, United States

项目ID: #21657965

授予:

panther0103

Hello. I can do it. I've fully understood your requirements and VBA code. I am the Java expert and lover. In Java, I've no problem. Please let me know your details or we can discuss more closely. Thanks.

$20 USD 在1天内
(4条评论)
1.8

6 威客就此工作平均出价 $63

mkoteshwar

I am comfortable in both vba and java and can solve your issue asap. I can create a code snippet that work for you.

$50 USD 在3天内
(9条评论)
5.1
atulamol

Hello, I have More than Five years (6+ years) of experience in Professional Software Development. Seeking for a challenging position as a Java Developer with the strong working experience in programming, designing of 更多

$50 USD 在7天内
(40条评论)
5.0
ThinkAndCo

Hi, We are a team of professional software developers. We have expertise in Java and can readily work on your requirements. Kindly consider our proposal for the best results. Looking forward to talking for more infor 更多

$30USD 在1天里
(34条评论)
4.7
WongGanteng

Hello. I'm very happy to bid on your project. I read your description carefully and am very interesting in your project. I can start right now and I can confirm high quality. If you hire me,I will do my best for your j 更多

$200 USD 在7天内
(3条评论)
3.2
polite90

I have made the java program using http restful qpu. I am sure with restful api and network connection. I can do it perfectly. Thanks

$30USD 在1天里
(4条评论)
3.0