What happens if you use an FMEServerNotifier with the json sent as the content, instead of writing it to a text file?
What happens if you use an FMEServerNotifier with the json sent as the content, instead of writing it to a text file?
@jdh I tried the FMEServerNotifier transformer with JSON output and got the same results.
@jdh I tried the FMEServerNotifier transformer with JSON output and got the same results.
The slashes are to escape the the quotes, that means it's not recognizing the subscriber content as JSON.
Can you try running it through a JSONValidator, to see if it reports any errors?  is a Byte Order Mark, so there is probably some encoding issues going on.
The slashes are to escape the the quotes, that means it's not recognizing the subscriber content as JSON.
Can you try running it through a JSONValidator, to see if it reports any errors?  is a Byte Order Mark, so there is probably some encoding issues going on.
Everything passed in the JSONValidator. Here's a sample of what I am trying to pass thru as a message:
{"Title":"Test WARS JSON Message","Message":"Simple Message","ActivityCode":u{"ActivityUID":"M336_45684_458_15864IN084","ActivityCode":"M336","RouteID":"15864IN084","RouteName":"I-84","BeginMile":"25.5","EndMile":"33.5","PassMiles":"2"},{"ActivityUID":"M336_45684_458_15847US021","ActivityCode":"M334","RouteID":"15847US021","RouteName":"US 21","BeginMile":"18","EndMile":"35","PassMiles":"1"}]}
The extra characters only come after I attempt to pass an 'application\\json' MIME type Text File via a FME Server Automation HTTP Request external action.
Here is the 'subscriber_content' that the client machine is receiving:
\\"subscriber_content\\": \\"{\\\\"Title\\\\":\\\\"Test WARS JSON Message\\\\",\\\\"Message\\\\":\\\\"Simple Message\\\\",\\\\"ActivityCode\\\\":\{\\\\"ActivityUID\\\\":\\\\"M336_45684_458_15864IN084\\\\",\\\\"ActivityCode\\\\":\\\\"M336\\\\",\\\\"RouteID\\\\":\\\\"15864IN084\\\\",\\\\"RouteName\\\\":\\\\"I-84\\\\",\\\\"BeginMile\\\\":\\\\"25.5\\\\",\\\\"EndMile\\\\":\\\\"33.5\\\\",\\\\"PassMiles\\\\":\\\\"2\\\\"},{\\\\"ActivityUID\\\\":\\\\"M336_45684_458_15847US021\\\\",\\\\"ActivityCode\\\\":\\\\"M334\\\\",\\\\"RouteID\\\\":\\\\"15847US021\\\\",\\\\"RouteName\\\\":\\\\"US 21\\\\",\\\\"BeginMile\\\\":\\\\"18\\\\",\\\\"EndMile\\\\":\\\\"35\\\\",\\\\"PassMiles\\\\":\\\\"1\\\\"}]}\\r\\n{\\\\"Title\\\\":\\\\"Test WARS JSON Message\\\\",\\\\"Message\\\\":\\\\"Simple Message\\\\",\\\\"ActivityCode\\\\":\{\\\\"ActivityUID\\\\":\\\\"M336_45684_458_15864IN084\\\\",\\\\"ActivityCode\\\\":\\\\"M336\\\\",\\\\"RouteID\\\\":\\\\"15864IN084\\\\",\\\\"RouteName\\\\":\\\\"I-84\\\\",\\\\"BeginMile\\\\":\\\\"25.5\\\\",\\\\"EndMile\\\\":\\\\"33.5\\\\",\\\\"PassMiles\\\\":\\\\"2\\\\"},{\\\\"ActivityUID\\\\":\\\\"M336_45684_458_15847US021\\\\",\\\\"ActivityCode\\\\":\\\\"M334\\\\",\\\\"RouteID\\\\":\\\\"15847US021\\\\",\\\\"RouteName\\\\":\\\\"US 21\\\\",\\\\"BeginMile\\\\":\\\\"18\\\\",\\\\"EndMile\\\\":\\\\"35\\\\",\\\\"PassMiles\\\\":\\\\"1\\\\"}]}\\r\\n\\",
What's the default encoding of the client machine and the machine running the workspace?
On the text writer, what is the character encoding set to?
It seems to me that the Byte Order Mark  is being added to your string to specify the character code set, and the notification service is then not recognizing the subscriber_content as valid JSON, so it is then escaping all the characters that actually mean something in JSON.
We decided to just use a HTTPCaller inside the workbench vs. using a FME Server Automation Notification. Couldn't resolve this issue and moved on. If anyone at Safe wants to look into this, I can send over log files.
We decided to just use a HTTPCaller inside the workbench vs. using a FME Server Automation Notification. Couldn't resolve this issue and moved on. If anyone at Safe wants to look into this, I can send over log files.
Hi @mmccart,
I'm sorry you ran into this issue, I also see the same behaviour so have filed a bug (internal reference: FMESERVER-13681) requesting this fix. I will update this post once this has been resolved.
Hi @mmccart,
I'm sorry you ran into this issue, I also see the same behaviour so have filed a bug (internal reference: FMESERVER-13681) requesting this fix. I will update this post once this has been resolved.
Hi @mmccart,
We have made a decision not to pursue this issue as our main focus is now on Automations.
After further investigation it appears this is an issue with how topic monitoring is parsing through the incoming topic message, and the message here is going to vary depending on how you are sending it to the topic. Therefore to look at the topic message going forward, I'd instead recommend viewing the raw json file which will present the subscriber_content accurately. This is located in Resources > System > temp > engineresults.