mediator

WSO2 API PayloadFactory mediator XML array to JSON array

好久不见. 提交于 2019-12-08 05:13:26
I am trying to build a Proxy between a client and a server using WSO2-AM. The ultimate goal is changing the content of the response the server sends to a format that the client understands. Therefore I wrote a custom mediator using a PayloadFactory. This works OK when the server sends just 1 element, but it can be possible that the servers sends multiple elements. I am trying to use an iterator to iterate all the elements and aplying a payloadfactory to each element, but this only returns the first element, or (when the response of the server is enclosed with a root element) the last element.

Sharing Collection between ViewModels

不羁的心 提交于 2019-12-08 04:58:52
问题 I've searched and nothing is helping me get to where I need to get. Description of my problem(s): We have a single dialog window which hosts multiple views (usercontrols). Clicking next and back will move you forward and backwards in this dialog similar to a wizard. Out of the 6 dialogs, 4 of them reference the same core data. For example we will say an ObservableCollection That being the case, I have 4 viewModels which all need to reference this same ObservableCollection. I don't want to

Mediator pattern and creation

烈酒焚心 提交于 2019-12-07 13:10:45
问题 I have several "widgets" involved in a presentation that need to interact with each other, but the interactions have gotten complex enough to warrant a new object to handle the interactions. In trying to work through a Mediator as that object, I am confused as how to construct the participants effectively. The mediator has to know about the widgets, and the widgets have to know about the mediator. Using the toy classes below can someone show me how the constructors would look and in what

how to compare integer properties in filter mediation in wso2 esb?

旧巷老猫 提交于 2019-12-07 11:13:14
问题 i am new in wso2 esb and define 3 service that return integer value and use filter mediator to rout from one to another , but not correct work and in filter mode always return false my source is : <sequence xmlns="http://ws.apache.org/ns/synapse" name="SeqOne"> <log level="full"/> <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:m0="http://tempuri.org/" name="CParam" expression="//m0:SumSerViseResponse/m0:SumSerViseResult" scope="default" type="INTEGER"/> <log level="custom">

WSO2 Python Script Mediator

纵然是瞬间 提交于 2019-12-07 01:43:38
I'm trying to use a Script Mediator in WSO2 that has the following definition: <script xmlns="http://ws.apache.org/ns/synapse" language="py" key="myPythonScript" function="process"/> I had to hard-code the "py" as language since Javascript, Ruby, and Groovy were the only options available in the language drop down list, although the WSO2 ScriptMediator documentation states that Python is supported. When I try to save my proxy changes I get the error "ERROR - ScriptMediator No script engine found for language: py" Is Python, in fact, unsupported in WSO2 in the ScriptMediator? Or do I need to

Mediator pattern and creation

混江龙づ霸主 提交于 2019-12-06 03:26:19
I have several "widgets" involved in a presentation that need to interact with each other, but the interactions have gotten complex enough to warrant a new object to handle the interactions. In trying to work through a Mediator as that object, I am confused as how to construct the participants effectively. The mediator has to know about the widgets, and the widgets have to know about the mediator. Using the toy classes below can someone show me how the constructors would look and in what order they would typically be created? Cheers, Berryl class WidgetOne { Mediator _mediator; } class

MVVM: Communication between the Model and ViewModels

与世无争的帅哥 提交于 2019-12-06 01:37:01
问题 I'm developing a WPF application using the MVVM pattern. I'm using MVVM Light library and I'm also trying to use a dependency injector (I'm considering Ninject and Unity). I've read a lot of blog articles and I'm quite confused about the "proper" way of making my classes communicate with each other. In particular, I don't know when to use Dependency Injection and when to rely on the mediator pattern. Lets consider an example. I have a ViewModel, lets call it DataViewModel, and the Data class

how to compare integer properties in filter mediation in wso2 esb?

折月煮酒 提交于 2019-12-05 16:24:28
i am new in wso2 esb and define 3 service that return integer value and use filter mediator to rout from one to another , but not correct work and in filter mode always return false my source is : <sequence xmlns="http://ws.apache.org/ns/synapse" name="SeqOne"> <log level="full"/> <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:m0="http://tempuri.org/" name="CParam" expression="//m0:SumSerViseResponse/m0:SumSerViseResult" scope="default" type="INTEGER"/> <log level="custom"> <property xmlns:ns="http://org.apache.synapse/xsd" name="CParam" expression="$ctx:CParam"/> </log> <property

MVVM: Communication between the Model and ViewModels

余生颓废 提交于 2019-12-04 06:03:34
I'm developing a WPF application using the MVVM pattern. I'm using MVVM Light library and I'm also trying to use a dependency injector (I'm considering Ninject and Unity). I've read a lot of blog articles and I'm quite confused about the "proper" way of making my classes communicate with each other. In particular, I don't know when to use Dependency Injection and when to rely on the mediator pattern. Lets consider an example. I have a ViewModel, lets call it DataViewModel, and the Data class that provides some kind of data. How is it better to communicate between them: A. Inject a dependency

WSO2 ESB - writing files out of base64

大兔子大兔子 提交于 2019-12-04 05:29:18
问题 I have a proxy which accepts XML files with Base64 encoded files in it. For example the XML looks like: <message> <content>Hello World</content> <attachements> <attachement>*Base64 code here*</attachement> <attachement>*Base64 code here*</attachement> <attachement>*Base64 code here*</attachement> </attachements> </message> My Problem: I like to save the decoded files from the message into a folder of the filesystem of the server running the ESB. But how can I do this? If I encode a simple