Programmatically sending mule message (formerly: Accessing mule http endpoint from java) -
scroll towards end solution topic's problem. original question asking different thing.
as part of larger process, need fetch , link 2 related sets of data together. way data retrieved(dynamics crm, n:n relationships..) forces retrieve second set of data again have necessary information. during part of larger transformation of data, access http endpoint used fetch data crm, retrieve second set of data , process it. can endpoint through defaultendpointfactory so:
defaultendpointfactory def = new defaultendpointfactory(); def.getinboundendpoint("uri").getconnector;
but there no method send mulemessage.
solved: the problem can not set inbound properties on mulemessage, , flow depending on of function(path, query params etc).
it seems able inbound scoped properties this:
m.setproperty("test", (object)"test", propertyscope.inbound);
is there way make approach work, or alternative way access flow? tried using mulecontext flow:
mulecontext.getregistry().lookupflowconstruct("myflow");
but did not contain looked useful.
solution: david dossot suggested in comment of answer, able solve muleclients request
method.
mulecontext.getclient().request(url, timeout);
then constructing url usual parameters etc.
i'm not 100% sure you're trying achieve anyway, correct way of using mule transports java code use muleclient, can access mulecontext.getclient()
.
for example, send
method allow pass properties map automatically added inbound scope. behind scene, mule takes care of creating endpoint needed operation.
regarding flow: trying it? invoke it?
Comments
Post a Comment