Select to view content in your preferred language

Create a custom widget to request external soap web service in ArcGIS online?

5591
11
07-25-2016 08:04 PM
pijuwang
Deactivated User

The current task is to create a custom widget that needs to pass the map location to an external web service then get the response as the result.

The external web service hosts on the client server which is SOAP API. The information are wsdl location and requiredto add HTTP Basic authentication header. Tested on SOAP UI, .NET, python code.. but not yet working for browser request (javascirpt).

Any way to request the soap web service from the widget which create from Web App Builder then deploy to ArcGIS online?

Does ArcGIS online can overcome the cross-origin resource sharing if host this widget in the ArcGIS online?

Any suggestion is welcome....

Best Regards,

Vicky

0 Kudos
11 Replies
RebeccaStrauch__GISP
MVP Emeritus

I'm not sure I totally understand you question, but to answer

Any way to request the soap web service from the widget which create from Web App Builder then deploy to ArcGIS online?

see Clarifying 3 questions about Web AppBuilder for ArcGIS | ArcGIS Blog

which states

Enabling custom widgets within Web AppBuilder embedded in ArcGIS Online and Portal for ArcGIS is not a supported workflow. To be specific, this means that you cannot add custom widgets into the Web AppBuilder “builder” user experience. Only Web AppBuilder for ArcGIS Developer Edition supports custom widgets and leveraging them in the “builder” user experience.

So, if you are using a custom widget, you should be looking at the developer edition an hosting locally

Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

I'll tag Web AppBuilder for ArcGIS​ and Web AppBuilder Custom Widgets

RobertScheitlin__GISP
MVP Emeritus

Rebecca is spot on with here reply. Because you are using WAB on AGOL you will not be able to use a custom widget even if you could develop one to do a SOAP request.

pijuwang
Deactivated User

Thanks you Rebecca. It's a useful information. I used Web AppBuilder developer edition and want to make a soap web service call. According to the blog, it states it's not supported workflow. However, there might have work around for using REST endpoint web service.

Not 100% sure that I can get the REST web service as that's the web service host in external client side.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I'm afraid I can't help you there. I haven't seen anything "soap"widgets come across my view and I double checked my Web AppBuilder Developer Edition - Customization Resource List​   That doesn't mean it doesn't exist, but it's beyond my skill set.

I did a web search of "javascript soap widget" and a couple other variations with "GIS" and "REST" in the mix and got a couple hits, but not sure what to do with them, but you may know.  Also, they linked to

The Services Directory and the REST API | Guide | ArcGIS API for JavaScript 3.17

ArcGIS REST API

but I'm out of my knowledge on the subject.  Robert might pipe in again now that he knows you are on the developer edition, but I'll bow out.

RobertScheitlin__GISP
MVP Emeritus

Vicky,

  You are correct using SOAP is not an option. But if you can get a REST service then yes this can be done. To communicate with a RESTful web service you would just use an esriRequest

pijuwang
Deactivated User

Thank you Robert.

As I cannot ask the third party to change the SOAP to REST. I will do the converter host in AWS and publish the REST endpoint for my widget to consume the service.

First thought, that I will implement c# WCF restful web service... From your point of view, any thing I need to keep in mind for implementing these REST api? perhaps, there is specific requirement for widget to request?

Don't have ArcGIS Server.  Won't be any chance to host something in the ArcGIS Server.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Vicky,

  I am a VB.net developer and I had no problem finding examples of developing a RESTful web service on Google. There is nothing special that you will need to be able to call the web service from a widget.

pijuwang
Deactivated User

Hi Robert,

that's cool. I am using c#. and yes it's easy to find the example. I've created one on the way to test my widget request from my REST web service.

I've come across the REST Geoservices specification. wondering if I use ESRI Javascript api to consume the web service should i follow the certain rule. https://www.esri.com/library/whitepapers/pdfs/geoservices-rest-spec.pdf 

Anyway, will try and find out.

0 Kudos
pijuwang
Deactivated User

Quick question Robert,

The request failed and got the CORS issue. 1) I created my widget WAB developer edition locally http://computername.com:3434. 2) created another restful web service on my local VS2013 => http://localhost:5662/myservice.svc

the widget from 1) call web service 2) and in browser console get the cannot access cross domain resource issue. I knew that one computer but different ports will consider CROS. Then, I use esri/config => esriConfig.defaults.io.corsEnabledServers.push("http://localhost:5662")

still not working.

Do I need to host the rest web service in the IIS server and setup the proxy.ash to make it work????

Any workaround ?

0 Kudos