Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Wrong contract response

Posted on by 304
Hi,
 
I'm sending a message via x++ to service bus. when trying to read the bus via postman to send to service bus, weird characters appear, this is what is returned:  @string3http: //schemas.microsoft.com/2003/10/Serialization/�3{/Type/:/X.X.112/}
I only need this: {/Type/:/X.X.112/}
 
The code below is missing few things.. but the idea is that i want to send contract and not single string message
 

 
  • Martin Dráb Profile Picture
    Martin Dráb 229,275 Most Valuable Professional on at
    Wrong contract response
    The reason why you're getting XML inside JSON can be found in documentation of this overload of BrokeredMessage's constructor. Let me quote:
     
    Initializes a new instance of the BrokeredMessage class from a given object by using DataContractSerializer with a binary XmlDictionaryWriter.
     
    I also see you're adding values to 'properties' object, but you showed neither declaration nor usage of this object. If it's related to your scenario, show us your complete code (including the population of streamWriter), if it's irrelevant, throw such code away.
  • DELDYN Profile Picture
    DELDYN 304 on at
    Wrong contract response
    Hi Andre,
     
    No it's dynamics. I wrote this code via x++. What this code does is that it puts a message in service bus.
    However, as I showed you the message appears with weird characters when i tried to read the service bus message from postman. However, if i send a string instead of a contract to the brokered message it works fine without weird characters. What shall i do to use contract properly?


  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,900 Super User 2024 Season 2 on at
    Wrong contract response
    HI Community User,
     
    You ask a question mentioning Postman and Service bus. This is a Dynamics 365 Finance forum. Your question fits on an Azure Service Bus forum.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans