OnewayAgreement

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

The OneWayAgreement entity captures information for either send or receive side of an agreement.

  • OnewayAgreement Entity Properties

  • Create a OnewayAgreement

  • List OnewayAgreements

  • Update a OnewayAgreement

  • Delete a OnewayAgreement

  • Link Other Entities with OnewayAgreements

  • Delete Link between Other Entities and OnewayAgreements

OnewayAgreement Entity Properties

Property

Type

Description

ID

Int

Specifies a unique ID for the one-way agreement. This value is auto-generated.

AgreementAsAtoB

Agreement

A navigation property that specifies the send-side agreement.

AgreementAsBtoA

Agreement

A navigation property that specifies the receive-side agreement.

BatchDescriptions

DataServiceCollection<BatchDescription>

A navigation property that references the batch configuration if the one-way agreement is send-side.

ProtocolSettings

ProtocolSettings

Required. A navigation property that references the protocol settings.

ReceiverBusinessIdentity

BusinessIdentity

Required. A navigation property that references the receiver ID of the one-way agreement.

SenderBusinessIdentity

BusinessIdentity

Required. A navigation property that references the sender ID of the one-way agreement.

Version

Byte[]

This value is auto-generated and is for internal use only.

Considerations

A OnewayAgreement entity must be associated with either a ProtocoSetting, AgreementSender, or AgreementReceiver.

Create a OnewayAgreement

You can create a one way agreement using a POST HTTP request.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements

HTTP/1.1

Sample Request

The following request message shows how to create a one-way agreement and link it to business identities.

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements HTTP/1.1
Content-Type: application/json; odata=verbose
Accept: text/html, application/xhtml+xml, */*
Host: integration.zurich.test.dnsdemo1.com:5446
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Connection: Keep-Alive
Authorization: WRAP access_token = "<token>"

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <category term="Microsoft.ApplicationServer.Integration.PartnerManagement.OnewayAgreement" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/SenderBusinessIdentity" type="application/atom+xml;type=entry" title="SenderBusinessIdentity" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/BusinessIdentities(1)" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/ReceiverBusinessIdentity" type="application/atom+xml;type=entry" title="ReceiverBusinessIdentity" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/BusinessIdentities(2)" />
  <id />
  <title />
  <updated>2013-02-07T00:43:49Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">0</d:Id>
      <d:Version m:type="Edm.Binary">AA==</d:Version>
    </m:properties>
  </content>
</entry>

List OnewayAgreements

You can list one way agreements using a GET HTTP request.

Method

Request URI

HTTP Version

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements

This returns all the one way agreements

HTTP/1.1

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements(id)

This returns information about the one-way agreements with the specified ID.

HTTP/1.1

Sample Request

Retrieve all the one-way agreements

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

Retrieve information about a specific one-way agreement

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Host: integration.zurich.test.dnsdemo1.com:5446

Update a OnewayAgreement

You can update a one-way agreement using a MERGE HTTP request.

Method

Request URI

HTTP Version

MERGE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements(id)

HTTP/1.1

Sample Request

MERGE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Content-Type: application/atom+xml
If-Match: W/"X'0000000000000830'"
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <id>https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/OnewayAgreements(1)</id>
  <category term="Microsoft.ApplicationServer.Integration.PartnerManagement.OnewayAgreement" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <title />
  <updated>2013-02-07T07:39:56Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">5</d:Id>
      <d:Version m:type="Edm.Binary">AAAAAAAACDA=</d:Version>
    </m:properties>
  </content>
</entry>

Delete a OnewayAgreement

You cannot delete a one-way agreement on it’s own. You must instead delete the agreement entity to which the one-way agreement is associated with. For instructions on deleting an agreement, see Delete an Agreement.

In Create a OnewayAgreement section, we saw how to create a link between a one-way agreement and an agreement while creating the one-way agreement. In this section, we see how to create a link in the opposite direction, that is, from an agreement to a one-way agreement. To create the link, the URI of the one-way agreement must be included in the request body.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(id)/$links/OnewayAgreementAToB

Agreements(id) denotes the ID of the agreement that links to the one-way agreement

HTTP/1.1

Sample Request

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1)/$links/OnewayAgreementAToB HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 216
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<uri xmlns="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/OnewayAgreements(1)</uri>

You can delete a link between other entities and a one-way agreement by using the HTTP DELETE method.

Method

Request URI

HTTP Version

DELETE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(id)/$links/OnewayAgreementAToB(id)

HTTP/1.1

Sample Request

DELETE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1)/$links/OnewayAgreementAToB(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 216
Expect: 100-continue

See Also

TPM OM API: Exposed Entities and Properties