Logic App send Event to Event Hub - Status 404 - azure-logic-apps

I try to get familiar with Azure logic apps therefor I try some simple things like receive request connect to database and / or event hub.
In case of send an event to an event hub I get the following error
{"statusCode":"BadRequest","body":{"code":"ServiceProviderActionFailed","message":"The service provider action failed with error code 'BadRequest' and error message 'Put token failed. status-code: 404, status-description: The messaging entity 'sb://eventhubXX.servicebus.windows.net/eventhubXX/myeventhub' could not be found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:1234567-1234-1245-1254-1234562345_G15, SystemTracker:evneventhub01.servicebus.windows.net:eventhubxx/myeventhub, Timestamp:2021-09-15T08:41:35.'."}}
I copied the Connectionstring from the EventHub and pasted it into the Logic App.
and I can't figure out what the problem is.
Please help and/or give me a hint.
Thx!

According to Serkant Karaca, 'eventhubXX/myeventhub' is not a valid eventhub name. Eventhub name should not include '/'.
To get the connection string from the Azure Event Hubs, refer this MsftDocumentationSteps
For more details on how to send/receive events from and to the event hubs - refer this # Send events to and receive events from Azure Event Hubs

Related

sending service bus message with custom property

I'm using the azure service bus component and sending and receiving is working fine. However I need to set a custom property (like you set when sending message in azure portal) to fix the internal routing in service bus.
How do I do this?
azure portal send message
Thanks

UNAUTHORIZED_CLIENT ABP Framework

My client site is broadcasting from 10.0.0.70. api broadcasts from localhost:44376 on the same machine.
10.0.0.70:4200 opens but when I click login it leads to http://localhost:44376/account/login site but 500
Internal Server Error
I am getting an UNAUTHORIZED_CLIENT error.
Probably you changed the appsettings endpoints to 10.0.x from localhost after running dbmigrator causing your client still registered with localhost:4200 redirect uri.
That's why you're getting UNAUTHORIZED_CLIENT error. I assume you are at the beginning of the project; you can delete your db and run db migrator again with your updated settings.
You can also check application logs for exact error messages; identityserver errors are logged detailed in log file.
This usually happens when CORS URL defined in the ClientCorsOrign database table is not valid. eg https:///www.domain.co.za is valid while https:///www.domain.co.za/app is not valid. So to accurate identitify cause of this error, open Logs in Identity api, in my case the CORS url was invalid..

Failed to Send error when sharing notes and pics

I have a mirror-api application i'm writing that takes notes, pictures and video from the users timeline and stores them. For some reason every note and picture I take and send to a contact i inserted through mirror has "Failed to Send" posted on the timeline card in glass. The app however still receives the timeline item. Anyone else having this issue?
You need to setup the timeline subscription (https://developers.google.com/glass/v1/reference/subscriptions/insert) with "UPDATE" item included in the "operation" list.
Mirror API will sending POST queries with the shared card info to your callbackURL endpoint. Accordingly your service should return HTTP Status 200 in response.
The endpoint should have HTTPS connection. To solve this - use ngrok (https://ngrok.com/) if you're developing on localhost or Google's subscription proxy (just google it, i can post more than 2 links now)

Obtaining a previous message within an Apache Camel route

I'm pretty new to camel so perhaps I'm going about this the wrong way but I'm routing messages from one endpoint to another and transforming them on the way. However the next stage is to add authentication to the pipeline. I have a service that tracks authenticated users. My plan is to, in the first stage of the route, to add a filter that checks to see if the current user is authenticated. If the user is not I want to transform the message into an authentication request and send that to my endpoint. All good so far, however, after authentication (if successful) I want to send the original message down the pipeline. Is this something that can be done?
A simplified version of my route would be:
from("seda:in").
filter(method(Authentication.class, "isNotAuthenticated")).
bean(AuthenticationTransformer.class)
to("cxfbean:out")
.end()
.bean(RequestTransformer.class)
.to("cxfbean:out")
The same message would be sent to both transformer beans.
You should preserve the message in the Exchange property setProperty("originalMessage", body()) before transforming it. Afterwards you can access that property using getProperty("originalMessage")

Force.com callout: Is there a way to get the full response from the target server

When calling a web service from Force.com, I am getting:
System.CalloutException: Web service callout failed: Unexpected
element. Parser was expecting element
'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'
The network guys at the other end has asked to see the full response that Salesforce is getting from their server.
Is there a way to achieve that? I have tried running with debug level 'Finest' from execute anonymous, but that yields the same little message with no further detail.
The message you are getting is because an error is generated as Saleforce is trying to parse the response is and it isn't logged unfortunately.
The parsing error is happening because instead of a SOAP message response you are getting an HTML page. This usually happens when you are accessing a service that is protected behind a firewall. Which means you may be able to see the service when browsing on your computer but remember that Salesforce is outside of your firewall and thus any communication by Salesforce to your service will be blocked.
Couple of ways to address this but this wiki topic from Salesforce best covers the options:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_om_outboundmessaging_security.htm
The above is specific to outbound messaging but essentially the technology issues are the same.
Don't forget that Apex includes an HttpRequest Class that works as a lower layer than the SOAP APIs. You should be able to write up a test method that sends a hard-coded XML request to the server and dumps the HttpResponse so you can see it.
Adding my own best answer, based on some internet research:
You can use an external tool like Runscope as a webservice proxy to automatically forward requests and pass through responses and view the XML SOAP messages. This is not a native solution on SFDC but it does do the job.
https://www.runscope.com/
The issue is that Force.com is trying to parse a SOAP response that's actually just HTML. This happens sometimes when an error occurred server-side and the response is meant for a browser to display, rather than sending back an exception report via a properly formatted SOAP response.
If they can't figure out why they are not sending back a consumable SOAP response, then you can try using other tools (outside of Force.com) to make the same webservice call from your browser and then see what the HTML actually says on return.

Resources