+ Reply to Thread
Results 1 to 8 of 8

SOAP request not working

  1. #1
    Registered User
    Join Date
    05-03-2018
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    4

    Question SOAP request not working

    Hi all

    I have some problems getting a SOAP request to work in Excel.

    This is my code:

    Please Login or Register  to view this content.
    where xml is a variant variable containing xml data as a text String. (I had to add Spaces in between h t t p s to be allowed to post on this forum. New users are not allowed to post "links".)

    I sent the same XML data in a test Application called SoapUI. There it works. But when I send the exact same xml in Excel, it does not work. Instead I get an error Message from the server, saying a required parameter is zero. But the parameter is defined in the xml, and it's value should have been set to the same in both SoapUI and Excel. So the error has to be in the VBA code, and not in the xml.

    Does anyone see what I have done wrong?

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: SOAP request not working

    Hi,

    The Code seems OK to me.. I suspect xml isn't being generated properly.. Make sure your SOAP Envelope is OK..

    I suggest, Instead of Late Binding the Code, Early Bind it.. It will be easier for you to debug, and then change it back to Late Binding if you wish to.
    Last edited by NeedForExcel; 05-03-2018 at 05:42 AM.
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    05-03-2018
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    4

    Re: SOAP request not working

    Hi

    Thanks for Your reply. I have changed it to early binding

    The forum won't let me post xml here (it says html tags are not allowed). But the xml is generated by SoapUI (where it Works), and I just copied it from there. It validates as xml With no errors. But it does not work in Excel.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: SOAP request not working

    Hi,

    Can you upload your XML here?

    http://textuploader.com/

    It is a bit hard to judge what the exact issue might be without taking a look

  5. #5
    Registered User
    Join Date
    05-03-2018
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    4

    Re: SOAP request not working

    This was not an easy to use forum I uploaded the xml to textuploader.com, but I'm still not allowed to post clickable links

    This is the XML I used, which was automatically generated by SoapUT:
    textuploader.com/df0pi

    I also tried this XML, which I just copied from the service documentation:
    textuploader.com/df0zs

    (I have censored the value of my user id, but I have an actual 9 digits number there)

    This is the response from the server:
    textuploader.com/df0z5

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: SOAP request not working

    Hi,

    You will basically need a code like this -

    http://textuploader.com/df02l

    You will have to check if the SOAP Envelope is right, and pass in the required parameters.

    That is the best I could do without debugging.
    Last edited by NeedForExcel; 05-04-2018 at 06:19 AM.

  7. #7
    Registered User
    Join Date
    05-03-2018
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    4

    Re: SOAP request not working

    I finally found a solution to this. I was using a SOAP 1.1 Call. I changed it to 1.2, and it worked. The documentation said both calls could be used, but apparently only 1.2 was working. Thank you for your help

  8. #8
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: SOAP request not working

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA add request code is not working
    By nmckever in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2014, 12:21 PM
  2. My hyperlink is not working i humbly request u to help
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2013, 05:07 PM
  3. Request for tips working with 900,000 row spreadsheets
    By Mikery1985 in forum Excel General
    Replies: 4
    Last Post: 01-26-2013, 09:08 PM
  4. Sending complex types in Soap Web Services Request
    By johannvivot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2012, 02:58 PM
  5. excel to SOAP request and back
    By k1ng in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-21-2011, 06:59 AM
  6. SOAP Request?
    By ebuat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2011, 10:10 AM
  7. SQL.REQUEST not working in EXCEL 2003
    By MrSmiley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2006, 01:35 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1