locked
How to add Rest Endpoints without distrubing existing Wcf endpoints and BT code RRS feed

  • Question

  • My existing web application connecting to BizTalk services using WCF-WSHttp endpoint, Now we are planning to consume same services in mobile application using WCF-webhttp end point ( for REST).

    To add additional WCF-webhttp endpoint without touching existing BTcode(schema, orchestrations), Does it possible ?(consuming as Json services)

    If yes, please share some material/links or implementation approach ?

    Advance Thanks,

    ...MKS

    Thursday, January 21, 2016 7:16 AM

Answers

  • Yes, it is more than possible, it's what you should do.  What you should focus on is making the new REST endpoint produce and accept the same internal message types (schemas) the existing services use.

    You basic receive pattern would be:

    1. Define your JSON message, probably somewhat similar to the existing Xml version.
    2. Verify that it can be decoded by the JSON decoder (converted to Xml).
    3. Use a Receive Port Map to transform the Xml version of the JSON message to the same Message Type your existing services use.
    4. Process normally in you app, it really shouldn't know the difference.

    The return is just the reverse:

    1. Use a Send Port Map to transform the existing app response to the JSON Xml.
    2. Use the JSON Encoder to convert the Xml to JSON.
    3. Return message to client.

    Thursday, January 21, 2016 12:48 PM
    Moderator

All replies

  • Hi,

    Without touching any of the exisisting artefacts or code you add a new endpoint using the BizTalk out of the box WCF Publishing Wizard. One of the bindings you can choose is the WCF-WebHttp. An example can be found in the following blog post: http://vikasbhardwaj15.blogspot.nl/2014/01/publish-rest-service-from-biztalk-server.html

    Kind Regards,

    Steef-Jan Wiggers (Microsoft Azure MVP)


    BizTalk


    Thursday, January 21, 2016 8:42 AM
    Moderator
  • Yes, it is more than possible, it's what you should do.  What you should focus on is making the new REST endpoint produce and accept the same internal message types (schemas) the existing services use.

    You basic receive pattern would be:

    1. Define your JSON message, probably somewhat similar to the existing Xml version.
    2. Verify that it can be decoded by the JSON decoder (converted to Xml).
    3. Use a Receive Port Map to transform the Xml version of the JSON message to the same Message Type your existing services use.
    4. Process normally in you app, it really shouldn't know the difference.

    The return is just the reverse:

    1. Use a Send Port Map to transform the existing app response to the JSON Xml.
    2. Use the JSON Encoder to convert the Xml to JSON.
    3. Return message to client.

    Thursday, January 21, 2016 12:48 PM
    Moderator
  • Thank you very much for your explanation about  implementation approach, John.  I will do POC as per what you suggested.

    ..MKS

    Thursday, January 21, 2016 3:12 PM
  • Hi Johns,

    Can you please share how to implement OAuth authentication for WCF-WebHttp endpoint in BT. 

    or 

    Any suggestible extensions for performing authentication between mobile and Biztalk WCF-WebHttp endpoint.

    Advance thanks..... MKS
    Saturday, January 23, 2016 6:21 PM
  • Since this is a new question, you should start a new thread with a meaningful title.
    Saturday, January 23, 2016 10:06 PM
    Moderator