Search Unity

Web service in Unity build: How to implement properly a SOAPExtension?

Discussion in 'Scripting' started by mohydineName, Oct 24, 2013.

  1. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Hi all,

    I am trying to have my app make a web service call. Part of the issue is as follows: I need to implement some sort of WSE UsernameTokenm as an authentication method. The libraray does not seem to exist for this in Mono. Is it correct?
    Base on this I would need to either create a custom SOAP header or maybe use a SOAPExtension and catch the message while they are built by the app.

    So in the latter scenario, I would need to add some "web.config" to configure the SOAP extension, but where should I put this file?

    Sorry for the brievity for this request, but I would love to provide more details if you have experience in this field.

    Stephane
     
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Is there any particular reason your service has to be SOAP based? I'm assuming it's a WCF service. You'll get better mileage out of Unity using a RESTful service instead. This will ensure better mobile compatibility. And you can set custom headers with the WWW class.
     
  3. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Yes I would love to use RESTful services but I am stuck with SOAP for compatibility reasons with the actual server service.