OSB business service processing the body variable without the xml tag - osb

How to pass the body without the tag to a Business service from proxy service route.. Just wanted the message to be routed to the JMS queue via business service. please advise.

You can use an XQuery transformation which will return the text message (without <soap:body>) that you wish to send to the queue. Have a replace activity (with replace entire node) using this transformation in your routing.

Related

How to read azure service queue message in Logic apps?

I am trying to create small Azure Logic app which will have some order flows.I will get the message in service bus queue. I need to get the message in logic app and based upon the message content, I need to follow the further steps. The message will contain the order data as well. There will be conditional logic, let's suppose, if order type is "new", I need to call HTTP request where I need to pass the message data as body content in POST request.
I have create a service bus queue and in logic apps, added service bus trigger which will be called when message will be received in service bus queue(automatically).
I need to able to implement conditional logic but as i am newbie in this, i am not sure how to pass this data in condtional logic from message.
You just need to mention the condition in the block and design the flow that we require. If the condition is true I have added the HTTP action mentioning the required details. For understanding purpose I have mentioned the other condition to trigger an email.
Here the flow of my logic app
If you want to continue the flow just click Add an action in True Connector.
REFERENCES:
Get started with Azure Service Bus queues (Azure.Messaging.ServiceBus) - Azure Service Bus | Microsoft Docs

Use inbound operation for outbound in OSB proxy

I have created business and proxy services based on same wsdl file, and the wsdl has 4 methods for which i have created the branch node to call 4 methods, and in each branch node, i just used routing with option "Use inbound operation for outbound", as there is no data enrichment needed in OSB.
So this flow will accept the request and send the same request to my business service which i have created using same wsdl?
or
Do we need to modify the request and response XML to make this flow work?
If your osb architecture have only 1 layer based on same wsdl file, you don't need modify anything and that will work like simple pass route.
Option Use inbound operation for outbound means that your osb engine will use same operation in your business service.
The same result will be achieved when the checkbox is unchecked and the corresponding operation will be selected.

For Apache Camel, is it possible to have half of a route synchronous and the second half async?

I currently have a camel route that exposes a cxf endpoint. When a messages comes through the endpoint I would first enrich that message with some information from another webservice and then do more processing afterwards. However, I want make the first half of this route synchronous so I can send back a response to whomever called my exposed cxf endpoint.
The route looks something like this:
from(cxf:CxfEndpoint)
.process(someProcessing)
.to(cxf:ExternalCxfEndpoint)
.to(activemq:queue:somequeue)
//return a response back to caller here
from(activemq:queue:somequeue)
... //additional processing here
...
The reason for this is because when a message comes via my exposed cxf endpoint I don't know if it's a valid message. I need to first validate it with the message enrichment. Once the message is enriched, I want let whomever sent the message know that their message is accepted but don't want them to wait for the message to make it through the whole route as that could take hours.
Does anyone know how this would work?
Thanks in advance!
I believe all you need to do is set exchangePattern to InOnly a.k.a. make it an Event Message. This should have your route not wait for a reply from ActiveMQ. Camel exchange will default to InOut when it's originating from a web service, as in your case.
A related question with an answer from a Camel dev here.
Also see this one for some details on the behavior when your broker is down.
Yes definitely , 100% possible. A simple example would be this :
From cxf endpoint
Store your request in a camel property or header
To xslt - generate xslt for cxf endpoint - Synchronous flow
Reset your original payload using set body.
Wiretap Endpoint - to any endpoint downstream or even a route , this becomes asynchronous . This won't take part in the above sync response .
Note- step 2 & 4 may not be required, it depends on your use case .
There are whole lots of things you can do, I just gave a very simple example . It doesn't need to be wiretap as well, but wiretap helps us not to write any additional custom exceptional handling.

Is it possible to update an AngularJS expression via an API call through a Service?

I'm looking for a way (and not even sure if this is possible) to update an Angular expression on my HTML page when data is sent to an API.
For example, say I have $scope.message on my .html page. Is there a way I can send a message to an API (e.g. http://...?message=foo) and have my page update with the message sent?
Also, I need the $scope.message to be updated in an Angular Service so it is available to multiple pages within my website.
I am wanting this to be a live update, but if not, I am happy with some code executing on a timer or something similar.
Any suggestions appreciated.
UPDATE
I'm guessing it may not be possible, but just in case I haven't explained it correctly, I'll try and simplify it.
I can only find information about using AngularJS to send GET commands OUT to a URL and receive data back. I need to send a JSON string TO my Angular site to update a variable. So basically as a field updates in my database, I want another server application to send an alert to my Angular site to update the status of this value live. I don't really want to run a constant check of the database if I don't have to.
I am open to any other suggestions on how to achieve this.
if you don't care about old school browsers, you can try using WebSocket, it is similar to a TCP socket, which allows you to push from server to client. I would create a service that manages the websocket connection, and update scope when receiving message. Hope this help. More info here: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API

Rest web service consumes XML with other parameters as well

Would it be possible to consume an XML request along with other parameters as well?
These params are not Form Params.
The client would pass these params with XML.
Actually when you talk about REST web service, you talk in terms of GET, POST, DELETE and PUT.
If you talk about the client only then POST and PUT will allow you to pass the user object, where as others will may ask for the id to perform the specific operation.
So, in a web service you have the parameter, ID, and it could be pathparam/formparam/queryparam and you have a #consume tag as well. But I have never seen a client that would pass these parameters with XML, because the URL path is not affected.

Resources