wso2esb

update local entry in wso2 esb via servce

谁都会走 提交于 2019-12-10 22:44:32
问题 Is there any way by which, I can update local entry from esb service. I have to store a token in global variable and need to update it when it is expired. I want to keep it in local entry. Looks like I can not update it from ESB service/sequence. <localEntry key="TestLocalEntry" xmlns="http://ws.apache.org/ns/synapse"><![CDATA[TestValue]]></localEntry> 回答1: If you requirement is to store a global variable and not really update a local entry, you can use esb registry Try this js to create /

wso2 esb - problems with XML to JSON conversion

余生颓废 提交于 2019-12-10 19:36:39
问题 I'm using WSO2 ESB 4.8.0 and I have the following problems converting an xml (from an xslt output) to a json: strings with numbers automatically get converted as integer elements: "orderId": 10000 ( I want it to be string "orderId": "10000" ) xml list come as json object if there is one element and as json array if more than one element is present..How can I tell the converter "this particular item must always be an array" ? I'm using xslt to build the xml (as I have variuos xml to merge from

xml to json conversion in wso2

冷暖自知 提交于 2019-12-10 19:17:13
问题 When I am trying to convert XML to Json using XSLT mediator in wso2 I am getting "Payload could not be written as JSON." error. Can anyone help to me resolve this. Thanks in advance 回答1: Why you do not use payload factory? this is a best way for converting xml to Json. for example: <payloadFactory media-type="json"> <format>{ "error": "0", "message": "$1", "data": $2 }</format> <args> <arg evaluator="json" expression="$.USER.description"/> <arg evaluator="json" expression="$.USER"/> </args> <

In WSO2 ESB 4.7.0 can we do JMS rollback in receiving sequence?

自闭症网瘾萝莉.ら 提交于 2019-12-10 17:56:32
问题 I have configured Apache ActiveMQ with transaction and CLIENT_ACKNOWLEDGE in WSO2 ESB 4.7.0. The axis2.xml config is : <parameter name="transport.jms.SessionTransacted">true</parameter> <parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</parameter> I have a simple passthrough proxy with jms transport which passes the messages in the JMS queue to a jax-rs service. The proxy code is : <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org

'Localhost' used as Common name in the default WSo2 certificate creates No Subject Alternative Name found

孤街浪徒 提交于 2019-12-10 16:48:11
问题 We have used wso2 esb (version 4.0.3) for exposing our webservice. Our webservice is added as a proxy service using the admin console in the wso2. We want to expose/consume our webservice only though the https. After generating the stub we have done the following Create a jks file using the java keytool. Exported the wso2 certificate and imported in the the jks file. Added the following in the code while calling the webservice. System.setProperty("javax.net.ssl.trustStore", "filename");

wso2 Inbound endpoint - Kafka consumer

耗尽温柔 提交于 2019-12-10 12:07:30
问题 I am creating a Kafka consumer. Using this article I Installed Zooker and Kafka. https://dzone.com/articles/running-apache-kafka-on-windows-os Using this documentation I am configuring the Inbound Kafka Endpoint https://docs.wso2.com/display/EI611/Kafka+Inbound+Protocol When I try to deploy the Inbound Endpoint I am getting this error [2017-09-22 12:19:06,161] [] ERROR - KAFKAPollingConsumer Error in Creating Kafka Consumer Connector [2017-09-22 12:19:08,150] [] INFO - KAFKAMessageListener

WSO2 Add BAM Profile in ESB

心已入冬 提交于 2019-12-10 11:28:13
问题 We're having troubles trying to add BAM Profiles to ESB following the manual: http://docs.wso2.org/wiki/display/BAM201/Setting+up+BAM+Mediator#SettingupBAMMediator-ConfigureBAMServerProfilesandStreams BAM 2.0.1 (latest version) ESB 4.5.1 (latest version) p2-repo from http://dist.wso2.org/p2/carbon/releases/p2-repo.zip (15-01-2013) It works if you do it with both WSO2-servers in a single host, but it doesn't if ESB and BAM are running in separate hosts. No logs or traffic found outgoing or

WSO2 how to Integrate ESB with Identity Server

好久不见. 提交于 2019-12-10 11:27:24
问题 Maybe my understanding is wrong, please advice. Requirement: (1) user A, and user B wanna to access a web service SayHello. (2) only user A has permission. (3) SayHello web service simply return a string "hello" Previously: (1) To invoke SayHello, create a client according to SayHello?wsdl. -- Success (2) Create a proxy service SayHelloProxyService through ESB, host this proxy service to SayHello service, create a client according to SayHelloProxyService?wsdl. --Success Now: Add Identity

Loading a registry entry into a wso2 property mediator

女生的网名这么多〃 提交于 2019-12-10 10:40:08
问题 I am currently loading data from a local entry in the wso2 esb using the following satement: <property name="MAPPING" expression="get-property('mapping_id_ep_v1')" /> It loads the following local entry with the name mapping_id_ep_v1: <mappings> <mapping id="ep_1">http://localhost:8280/services/ep_1</mapping> <mapping id="ep_2">http://localhost:8280/services/ep_2</mapping> <mapping id="ep_3">http://localhost:8280/services/ep_3</mapping> <mappings> I would like to load the data from a registry

How to debug WSO2 ESB code

徘徊边缘 提交于 2019-12-10 02:52:05
问题 How do you typically debug the ESB code? I am using log statements but they are kind of lost in system logs. Is there a better mechanism to be used? Thanks, 回答1: You can do remote debugging from your IDE with ESB code. First start the ESB server script with debug option as follows. wso2server.sh -debug 5005 where the number is any port number used for remote debugging from your IDE. Then run debug in your IDE with whatever the port number you assigned. 回答2: First, you have to setup debug