none
How to send user name and password to Rest sendport RRS feed

  • Question

  • Hi i want to send user name and password to rest service

    in biztalk admin console rest send port properties 

    Please help me. 

    Wednesday, April 3, 2019 9:23 AM

All replies

  • So, the thing is, you don't just "send user name and password".  You have to comply with the services authentication requirements.

    What authentication method is the service using?

    Wednesday, April 3, 2019 1:26 PM
    Moderator
  • As Johns said, what authentication method is it using?

    Basic Auth, oAuth, SAS, Federated AD?

    Wednesday, April 3, 2019 5:36 PM
  • Hi 

    I need to consume below service given by client.

    http://ab.abc.com/api/cls/enuiry

    Also client team has given sample request request as:

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

        <soapenv:Header />

      <UserID>abs</UserID>

        <UserPassword>cdf</UserPassword>

        <soapenv:Body>

            ................

        </soapenv:Body>

    </soapenv:Envelope>

    This is only information i have from client.

    How can i do it.


    • Edited by DineshNad Thursday, April 4, 2019 12:48 PM
    Thursday, April 4, 2019 6:24 AM
  • Hi johns and Colin

    I have requested the client about what authentication method is it using?

    Mean while i want to know the process of  Each of Basic Auth, oAuth, SAS, Federated AD

    How can i implement each type of authentication in biztalk.

    Please explain and help me.


    Friday, April 5, 2019 9:38 AM
  • You mean explain beyond what's in the Documentation?
    Friday, April 5, 2019 12:28 PM
    Moderator
  • hi johns,

    i am sending xml to the api and

    for user name and password  i am setting in the  wcf-webhttp adapter as:

    but still facing issue.

    if i test the same with soap ui api  is working fine.

    please suggest is this the correct way of sending username and password to api?

    Sunday, April 7, 2019 11:31 AM
  • You say that it is a REST service, but the sample you have is a SOAP envelope.  

    Now it is possible to send a message in SOAP envelope to a Restful service, but I would not think it likely that anyone would implement that.  Are you sure that it isn't a SOAP web service rather than a REST one?  If it is SOAP, you should be using the WCF-WSHttp adatper rather than the WCF-WebHttp adapter.

    For us to explain how to implement each different authentication method would be a very broad topic, especially as some of them very a lot in implementation such as oAuth.  

    I would seek details about how to consume the web service from the publisher of the web service.  Once you have that, then you can look at how to implement it in BizTalk.

    You said you got it working in SOAP UI.  What settings did you use in there?

    Sunday, April 7, 2019 8:47 PM
  • Hi colin,

    As i have mentioned in previous thread the same input is used in the soap ui and it worked on it.

    I dont know why it is not worked in biztalk.

    Any how now issue is resolved , as client team asked me to send these user name and password in same body xml tags and it is working fine now.

    Thanks agian colin and johns for your support.

    I can understand explain how to implement each different authentication method would be a very broad topic,

    So can you  please send me the any reference articles so i will gain some knowledge for future.

    Monday, April 8, 2019 11:55 AM
  • Sorry for interrupting agin

    My client again changed  Service as :

    http://ab.abc.com/api/cls/enuiry

    Also client team has given sample request request as:

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

        <soapenv:Header >
            <UserID>abs</UserID>
           <UserPassword>cdf</UserPassword>

        </soapenv:Header >

        <soapenv:Body>

            ................

        </soapenv:Body>

    </soapenv:Envelope>

    Now they are expecting this user name and password in header.

    also confirmed my client as They are using Basic Auth,

    So please explain how to achieve it


    • Edited by DineshNad Wednesday, April 10, 2019 5:16 AM
    Wednesday, April 10, 2019 5:13 AM
  • They really need to make up their mind.  Also, header credentials and Basic Auth are two totally different things.

    They need to tell you which one it is...or both if that the case.

    If you have any influence, get them to not use header credentials.  It's messy and annoying and silly for everyone.  Basic Http auth over TLS is much easier and widely understood.

    Wednesday, April 10, 2019 12:58 PM
    Moderator
  • Hi johns ,

    I have found some url :

    https://www.connected-pawns.com/2017/04/09/wcf-webhttp-adapter-basic-authorisation/

    At last he set Outbound HTTP header.

     is it possible to do like this.if ye ho can i get that :

    Authorization: Basic  N1p....etc

    Wednesday, April 10, 2019 1:34 PM
  • Well, here's the deal.  You've now asked about 3 different and unrelated things.

    To go any further, the service owner needs to settle on 1 authentication pattern and stick to it.

    Once they commit to one pattern and tell you exactly what it is, we can help.

    Wednesday, April 10, 2019 2:12 PM
    Moderator