Share via

SSRS report - XML query with POST

mark goldin 706 Reputation points
2021-07-27T08:51:01.607+00:00

How can I specify a request method in an xml query? I need to use POST.

Thanks

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

0 comments No comments

6 answers

Sort by: Most helpful
  1. mark goldin 706 Reputation points
    2021-07-28T13:10:05.02+00:00

    Here is my query:
    <Query>
    <Method Name="LoginOTP" Namespace="http://schemas.xmlsoap.org/soap/envelope/">
    <Parameters>
    <Parameter Name="ClientID">
    <DefaultValue>xxxxxxx</DefaultValue>
    </Parameter>
    <Parameter Name="GUID">
    <DefaultValue>some_guid</DefaultValue>
    </Parameter>
    <Parameter Name="User">
    <DefaultValue>xxx</DefaultValue>
    </Parameter>
    <Parameter Name="Password">
    <DefaultValue>xxxx</DefaultValue>
    </Parameter>
    </Parameters>
    </Method>
    <SoapAction>abc/hhh/lkklk</SoapAction>
    </Query>

    And I get this:
    118713-image.png

    Hard to say if it s the correct one becausue I need to add two headers.

    Was this answer helpful?

    0 comments No comments

  2. mark goldin 706 Reputation points
    2021-07-28T12:58:56.597+00:00

    Ok, one problem is solved. What about my other problem such as adding custom headers? Also in Postman it only works if I use form data/raw. Using form fields wasn't working for me. Is the same as specifying parameters in an XML query?

    Thanks for all the help you provide.

    Was this answer helpful?

    0 comments No comments

  3. Olaf Helper 47,621 Reputation points
    2021-07-28T12:38:01.957+00:00

    I need to use POST.

    POST is the HTTP command: https://en.wikipedia.org/wiki/POST_(HTTP)
    That's automatically done by SSRS when it accesses a SOAP API over Http.

    Was this answer helpful?


  4. mark goldin 706 Reputation points
    2021-07-28T09:36:20.623+00:00

    No, I am trying XML query to get data from a web service. The web service method expects POST and custom headers. Both I don't know how to add.

    Was this answer helpful?

    0 comments No comments

  5. Joyzhao-MSFT 15,651 Reputation points
    2021-07-28T09:33:16.843+00:00

    Hi @mark goldin ,
    How are you using XML in SSRS , are you trying to have XML datasource from one website ?
    Best Regards,
    Joy

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.