Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
9 subscribers
Views
4378 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Invoke Rest Service
aloks0189
Certified Lead Developer
over 8 years ago
Hi,
I have a requirement, where n number of systems are connected in a local network with a common server where Appian is running and getting access by all other systems in that network. Now I build a Rest service which expects few FormParam to be send as POST call, in order to invoke that service, currently that service is running in a particular system of the network rather than the main server system where Appian is running, when I invoke this service using SoapUI it getting invoke properly but when I try to invoke the same service using Appian either by using httppost , or httpwrite function or by using httpQuery smart service, it's is unable to hit the service , it's getting time out after few minutes. is it needed to deploy the service also in the same server system where Appian is been installed, because if so then it's tightly coupled. please suggest me, where to deploy the service so...
OriginalPostID-257739
Discussion posts and replies are publicly visible
0
aloks0189
Certified Lead Developer
over 8 years ago
... that Appian can hit the service and by using which function, as I need to pass few Form parameter also.
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
Try one thing: see if you can use a!httpquery function to call the web service at
http://up.jsontest.com
See if you are getting a response.
If not, it is likely that you are behind a corporate proxy/firewall and the Appian server is also behind the corporate proxy/firewall.
In that case, the JVM options when Appian starts should be enabled with proxy options.
You can set those options in standalone.conf.bat and restart JBoss. It should work then. Just google for setting proxy options for JVM.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
It's actually
http://ip.jsontest.com
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
Note that tools like SoapUI, Postman etc automatically use the system proxy, but Java does not.. Since Appian is hosted inside the JBoss container , appropriate JVM options for the proxy should be set
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 8 years ago
@Chetany Thanks for you response.
I tried calling above mention service using httpQuery as well as using Smart Service, and both worked well, as it's a GET call so this does not require any FormParam, but the service which i have build is of POST and needed to send few FormParam in order to invoke it. Even i tested my service by creating a REST Client in Java as well as in SOAPUI as mention earlier, here also this gets invokes well and working as expected.
Any suggestion, what could be the cause behind Appian unable to invoke the Service
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
So, it is not an issue of the proxy. You can check how the FormParam need to be passed to the web service. They may need to be passed in query parameters or in the request body. You need to be sure that they are being passed in appropriate way.
I might be wrong, it maybe some other issue as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 8 years ago
@chetany when i deployed the same application into the local server where Appian is running, now i am able to communicate with that service using httppost, which i was not in earlier case, can i say it's one of the tight coupled mechanism in terms of accessing external services using Appian
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
@aloks176, can't say for sure. My experience is as follows:
I have Appian on my local desktop (and its in a local network of the company). I was not able to access webservices hosted on the global Internet. But I was able to access them from SOAPUI and Postman.
Then, I changed one setting in standalone.conf.bat. I added values for http.poxy and http.port for proxy settings. It then started to work from Appian functions also. It means Java had to be informed about the proxy on my machine.
I believe the same configuration should also work for web service hosted within the local network. In my case, I was trying to call web service hosted outside our local network which was not working(but started working after I edited standalone.conf.bat and restarted JBoss).
In your case, the web service is in the local network itself and it still is not working.. So, not sure about the issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel