×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    8

    How to Call Soap service in S40 web apps

    I need to implement SOAP service in my application but I have no idea how to call SOAP service using javascript. Is there any simpe demo or documentation, please help.

  2. #2
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Preview server cannot send SOAP requests

    Hello,

    I am also facing a similar issue with SOAP requests.

    I am trying to access a webservice by sending a SOAP request using XMLHttpRequest POST. It works when the wgt is opened locally in the simulator. But, when uploaded to preview server, I am getting the status 400(Bad Request) from the webservices server(IIS7 Server).

    I have set the following request headers :
    SOAPAction:
    Content-Type:text/xml
    Content-Length:Length of SOAP request string

    I believe my code is correct since it works outside Preview Server, but miss something to be compatible with Preview Server. Please let me know if any one has more information on this.

    Regards,
    Surya

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    10

    Re: How to Call Soap service in S40 web apps

    I faced the same problem too. The soap request always receives 400 error, bad request, so strangely.
    Nobody help solving this problem???

  4. #4
    Registered User
    Join Date
    Feb 2011
    Posts
    45

    Re: How to Call Soap service in S40 web apps

    Quote Originally Posted by monima View Post
    I need to implement SOAP service in my application but I have no idea how to call SOAP service using javascript. Is there any simpe demo or documentation, please help.
    There might be a better alternative by implementing those API request using proxy app. Some script on your server that is used only for s40 webapp.

  5. #5
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to Call Soap service in S40 web apps

    Hi,

    We are working on finding the root cause of this issue. Until then the workaround proposed by artinteg is worth trying.

    Br,
    Ilkka

  6. #6
    Registered User
    Join Date
    May 2011
    Posts
    10

    Re: How to Call Soap service in S40 web apps

    Quote Originally Posted by isalento View Post
    Hi,

    We are working on finding the root cause of this issue. Until then the workaround proposed by artinteg is worth trying.

    Br,
    Ilkka
    Hello,
    I am in China, and I have installed the latest NWT 1.2.1, but this problem was not solved all the same. When I use XMLHttpRequest to send a soap request (POST to a web service with SOAPAction header), the response always is 400 (bad request). My javascript code which implements to send soap request is as follows. Who can tell me what's wrong with it? Thanks.
    Regards.

    // My js code
    function soapRequest(){
    var symbol = "MSFT";
    var xml = '<?xml version="1.0" encoding="utf-8"?>' +
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
    'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
    '<soap:Body> ' +
    '<GetQuote xmlns="http://www.webserviceX.NET/"> ' +
    '<symbol>' + symbol + '</symbol> ' +
    '</GetQuote> ' +
    '</soap:Body> ' +
    '</soap:Envelope>';

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open("POST", "http://www.webservicex.net/stockquote.asmx", true);
    xmlhttp.setRequestHeader("SOAPAction", "http://www.webserviceX.NET/GetQuote");
    xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlhttp.setRequestHeader("Content-Length", xml.length);
    xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4) {
    if (xmlhttp.status == 200) {
    if (xmlhttp.responseText != null) {
    alert(xmlhttp.responseText);
    }
    else {
    alert("Failed to receive response - file not found.");
    }
    }
    else {
    alert("Error code " + xmlhttp.status + " received: " + xmlhttp.statusText);
    }
    }
    }
    xmlhttp.send(xml);
    }

  7. #7
    Registered User
    Join Date
    May 2011
    Posts
    10

    Re: How to Call Soap service in S40 web apps

    Hello,
    How can we use proxy app? Could you tell some details or give any samples to us?
    Regards.

  8. #8
    Registered User
    Join Date
    May 2011
    Posts
    10

    Re: How to Call Soap service in S40 web apps

    I am in China, and I have installed the latest NWT 1.2.1, but this problem was not solved all the same. When I use XMLHttpRequest to send a soap request (POST to a web service with SOAPAction header), the response always is 400 (bad request).

  9. #9
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to Call Soap service in S40 web apps

    Hi,

    The root cause of this issue is identified and is fixed in coming updates.

    Br,
    Ilkka

  10. #10
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to Call Soap service in S40 web apps

    Hi,

    Updating this thread just to notify that SOAP issue has been fixed in Nokia Series 40 Web App version 1.5.

    Br,
    Ilkka

Similar Threads

  1. send complete soap message to web service
    By qbs in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2010-08-19, 09:34
  2. Replies: 3
    Last Post: 2010-08-02, 14:04
  3. How to call a Web Service
    By lessa.bru in forum Symbian
    Replies: 4
    Last Post: 2009-03-09, 10:28
  4. [moved] how to call a web service from Http connection in j2me?
    By mindIt in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-02-10, 09:17
  5. Web Service / Soap
    By corradoME in forum Mobile Java General
    Replies: 0
    Last Post: 2004-11-25, 11:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •