Method Community

 

Trying to get a response in PostMan

Last post 02-05-2020 2:11 PM by ecrescioni. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-22-2020 11:36 AM

    Trying to get a response in PostMan

    I'm trying to run an HTTP GET request. From what I understand in the the documentation the strSessionID is not a required parameter. However it's still asking me for it. I have also tried to set it to NULL; no dice.

    Does anyone have any insight as to what I'm doing wrong here?

     https://ibb.co/7nfXDnT

  • 01-23-2020 2:26 PM In reply to

    Re: Trying to get a response in PostMan

    Hello,

    Thanks for reaching out. Couple of things

    • Instead of Params try sending it through Body as a raw XML request.
    • Do a POST instead of GET

    Sample request in the Postman body would look something like

    <?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>
      <MethodAPITableListV2 xmlns="http://tempuri.org/">
       <strCompanyAccount>{{CompanyAccount}}</strCompanyAccount>
       <strLogin>{{Login}}</strLogin>
       <strPassword>{{Password}}</strPassword>
       <strSessionID></strSessionID>
      </MethodAPITableListV2>
     </soap:Body>
    </soap:Envelope>


    You can find sample XML body for different operations from here https://www.methodintegration.com/methodapi/service.asmx.

    Hope it helps.


    Laks Sahayaprasath
    Product Manager
    Method CRM
  • 01-23-2020 4:55 PM In reply to

    Re: Trying to get a response in PostMan

    I really appreciate your help. I have no experience with SOAP so I thought I could send a regular HTTP request like in a RESTful API.

    Thanks again.

  • 02-04-2020 4:08 PM In reply to

    Re: Trying to get a response in PostMan

    Hi again!

    I'm now getting the following response on Postman: 

    The server cannot service the request because the media type is unsupported.
    My request is exactly how you described above, and I'm sending it as application/xml, in a POST request. I noticed, however, that my password contains special characters (#, %, !, $); do you think this is causing the problem?

    Link to postman request: https://ibb.co/47xrrF2
  • 02-05-2020 12:43 PM In reply to

    Re: Trying to get a response in PostMan

    Hello,

    We normally get this error when supporting Content-type was not set? It has to be set as one of the requests Headers. Under Headers add a Key that says Content-Type and a Value that says text/xml. Hope this helps.

    Laks Sahayaprasath
    Product Manager
    Method CRM
  • 02-05-2020 2:11 PM In reply to

    Re: Trying to get a response in PostMan

    Laks - thanks again. I had set the Content-Type to application/xml; it was supposed to be text/xml.

    Thanks again for humoring these amateur questions, I'm very thankful for your help.

Page 1 of 1 (6 items)