I am using Powerbuilder 2017 Universal version.
Powerbuilder, Powerserver, the test web service and the mobile app (which calls the test web service) are all installed on the same system.
When the mobile app specifies a url of http://localhost/testwebservice/n_testwebservice.asmx the mobile app can successfully call the web service.
When the mobile app specifies a url of http:///testwebservice/n_testwebservice.asmx the mobile app reports error "Execute call Web Service failed. Errormessage:App-Webservice:Invoke Web Service method failure! message=Exception has been thrown by the target of an invocation" when attempting to call the web service.
represents the actual url that can be used to access the web service from systems not on the local network. When I browse url http:///testwebservice/n_testwebservice.asmx from an external system I can successfully view web service description page and see the same page as I do when I browse http://localhost/testwebservice/n_testwebservice.asmx from the local system.
Also, I can successfully call the web service from a Powerbuilder desktop program specifying url http:///testwebservice/n_testwebservice.asmx.
Any ideas why I cannot call the web service from the mobile app using the external url?
"When the mobile app specifies a url of http://localhost/testwebservice/n_testwebservice.asmx the mobile app can successfully call the web service"
How do you test the mobile app on localhost? PB 2017 doesnt ship the AWS emulator.
What if you use a WS datawindow? Does it work?
You can switch endpoint at runtime using :
lws_connection = CREATE wsconnection
lws_connection.endpoint = "http://servername/testwebservice/n_testwebservice.asmx?WSDL"
If dw_1.SetwsObject(lws_connection) = 1 Then dw_1.retrieve()
Cheers,
Marco