Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Wrong contract response
Finance forum
Unanswered

Wrong contract response

Posted on by 248
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 228,493 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 248 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,524 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans