he created a Consent resource profile through forge, with a test extension that only contains a String value.
When I try to validate the Consent resource, it gives me this error, but I do not know what it means.
Profile:
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Consent" />
<meta>
<lastUpdated value="2017-12-21T17:22:27.087+01:00" />
</meta>
<url value="http://hl7.org/fhir/StructureDefinition/MyConsent" />
<name value="Consent" />
<status value="draft" />
<date value="2017-12-19T09:08:41.006+01:00" />
<description value="prueba
" />
<fhirVersion value="3.0.1" />
<kind value="resource" />
<abstract value="false" />
<type value="Consent" />
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
<derivation value="constraint" />
<differential>
<element id="Consent.extension">
<path value="Consent.extension" />
<slicing>
<discriminator>
<type value="value" />
<path value="url" />
</discriminator>
<rules value="open" />
</slicing>
</element>
<element id="Consent.extension:pruebaExtension">
<path value="Consent.extension" />
<sliceName value="pruebaExtension" />
<min value="1" />
<type>
<code value="Extension" />
<profile value="http://hl7.org/fhir/StructureDefinition/PruebaExtension" />
</type>
</element>
<element id="Consent.identifier">
<path value="Consent.identifier" />
<min value="1" />
</element>
</differential>
</StructureDefinition>
Thanks
Related
My AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10300" android:versionName="1.3.0" package="com.appname.android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:exported="true" android:label="#string/activity_name" android:launchMode="singleTask" android:name="MainActivity" android:theme="#style/Theme.App.SplashScreen" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="MeeBuddy" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="meebuddy.com" android:pathPrefix="/" android:scheme="https" />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
</intent-filter>
</activity>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:exported="true" android:name="com.google.android.gms.ads.AdActivity" android:theme="#android:style/Theme.Translucent" tools:replace="android:exported" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-6001377970808084~7678097359" />
<provider android:authorities="${applicationId}.cordova.plugin.camera.provider" android:exported="false" android:grantUriPermissions="true" android:name="org.apache.cordova.camera.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/camera_provider_paths" />
</provider>
<activity android:exported="true" android:name="com.soundcloud.android.crop.CropImageActivity" />
<receiver android:enabled="true" android:exported="true" android:name="nl.xservices.plugins.ShareChooserPendingIntent">
<intent-filter>
<action android:name="android.intent.action.SEND" />
</intent-filter>
</receiver>
<provider android:authorities="${applicationId}.sharing.provider" android:exported="false" android:grantUriPermissions="true" android:name="nl.xservices.plugins.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/sharing_paths" />
</provider>
<amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false" xmlns:amazon="http://schemas.amazon.com/apk/res/android" />
<service android:exported="false" android:name="com.onesignal.ADMMessageHandler" />
<receiver android:exported="true" android:name="com.onesignal.ADMMessageHandler$Receiver" android:permission="com.amazon.device.messaging.permission.SEND">
<intent-filter>
<action android:name="com.amazon.device.messaging.intent.REGISTRATION" />
<action android:name="com.amazon.device.messaging.intent.RECEIVE" />
<category android:name="com.meebuddy.android" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
<intent>
<action android:name="android.intent.action.PICK" />
</intent>
<intent>
<action android:name="com.android.camera.action.CROP" />
<data android:mimeType="image/*" android:scheme="content" />
</intent>
</queries>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" android:required="true" />
<uses-permission android:name="com.amazon.device.messaging.permission.RECEIVE" />
<permission android:name="com.meebuddy.android.permission.RECEIVE_ADM_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.meebuddy.android.permission.RECEIVE_ADM_MESSAGE" />
</manifest>
APK Generated Successfully but Google playstore giving following error
**You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
**
How to resolve this issue?
Has anyone experienced a white statusbar since this new XCode update?
Before the update this code was working...
statusBar.styleBlackTranslucent();
...now I just get get a white bar with white text. (see screenshot)
For relevant debug info:
statusBar.hide();
is functioning... so I know the cordova-plugin-statusbar is still working on some level.
But when I take out all statusbar code and export from XCode the bar is still white text with a white background.
Of course an update happens on the day I am about to push a Beta.
Here's my config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.XX" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>XX</name>
<description>Create, experience, share.</description>
<author email="XX#XX.com" href="https://XX.com/">Rob Gungor</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="http://ionic.local/*" />
<allow-navigation href="http://192.168.11.58:8100" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="webviewbounce" value="true" />
<preference name="UIWebViewBounce" value="true" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="600" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="FadeSplashScreenDuration" value="950" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="Fullscreen" value="true" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="2732" src="resources/ios/splash/Default#2x~universal~anyany.png" width="2732" />
</platform>
<preference name="GOOGLE_PLUS_CLIENT_ID" value="XX" />
<engine name="android" spec="^6.2.3" />
<engine name="browser" spec="^4.1.0" />
<engine name="ios" spec="^4.4.0" />
<plugin name="com.telerik.plugins.nativepagetransitions" spec="^0.6.5" />
<plugin name="cordova-fabric-plugin" spec="^1.1.9">
<variable name="FABRIC_API_KEY" value="XX" />
<variable name="FABRIC_API_SECRET" value="XX" />
</plugin>
<plugin name="cordova-plugin-admobpro" spec="^2.29.22" />
<plugin name="cordova-plugin-cocoapod-support" spec="^1.3.0" />
<plugin name="cordova-plugin-console" spec="^1.0.7" />
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-facebook4" spec="^1.9.1">
<variable name="APP_ID" value="XX" />
<variable name="APP_NAME" value="
XX" />
</plugin>
<plugin name="cordova-plugin-firebase" spec="^0.1.24" />
<plugin name="cordova-plugin-googleplus" spec="git+https://github.com/mzealey/cordova-plugin-googleplus.git">
<variable name="REVERSED_CLIENT_ID" value="XX" />
</plugin>
<plugin name="cordova-plugin-ionic" spec="^1.1.8">
<variable name="APP_ID" value="XX" />
<variable name="CHANNEL_NAME" value="Master" />
<variable name="UPDATE_METHOD" value="background" />
<variable name="UPDATE_API" value="https://api.ionicjs.com" />
<variable name="MAX_STORE" value="2" />
</plugin>
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="git+https://github.com/apache/cordova-plugin-statusbar.git" />
<plugin name="cordova-plugin-taptic-engine" spec="^2.1.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-wheel-selector-plugin" spec="^1.0.9" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
Here's a screenshot of my info panel in XCode
Thank you sweeties.
xo
rob
Rob's answer is the solution. However, with cordova-plugin-wkwebview-engine, my app just didn't work. Removing the plugin brought the app back to normal and the statusbar problem was all gone. So;
I removed statusbar plugin with:
ionic cordova plugin remove cordova-plugin-statusbar
I installed the three of these plugins:
ionic cordova plugin add cordova-plugin-disable-ios11-statusbar
ionic cordova plugin add cordova-plugin-statusbar
And then called
ionic cordova platform remove ios
ionic cordova platform add ios
Thanks Rob!
Update:
Found a cleaner solution. You only need
cordova-plugin-statusbar
In index.html, just add "viewport-fit=cover" to viewport meta in the head:
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, viewport-fit=cover">
That's all
I installed the three of these plugins:
ionic cordova plugin add cordova-plugin-disable-ios11-statusbar
ionic cordova plugin add cordova-plugin-statusbar
ionic cordova plugin add cordova-plugin-wkwebview-engine
And then called
ionic cordova platform remove ios
ionic cordova platform add ios
And then it worked for me
(don't ask why)
I did following thing and it resolved all design issues related to
ios.
1)Install/upgrade WKWebView
ionic cordova plugin add cordova-plugin-ionic-webview --save
2) Add these line in config.xml
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
3) Add viewport-fit=cover in index.html
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
Please use
StatusBar.styleDefault();
It will change your status bar font color to black
I am using phonegap-version cli-5.2.0 i could not build apk. error is here below
Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: Device
my config.xml
this is my config file my plugins are given below
org.apache.cordova.core.geolocation,Device,Logger,Compass,NetworkStatus,Debug Console,Geolocation,SplashScreen,Battery,Globalization
<?xml version="1.1" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id = "com.test.www" version="1.1" >
<name>test</name>
<description>
test
</description>
<preference name="permissions" value="none"/>
<gap:plugin name="org.apache.cordova.core.geolocation" />
<feature name="Geolocation">
<param name="ios-package" value="CDVLocation" />
</feature>
<plugins>
<plugin name="Device" value="CDVDevice" />
<plugin name="Logger" value="CDVLogger" />
<plugin name="Compass" value="CDVLocation" />
<plugin name="NetworkStatus" value="CDVConnection" />
<plugin name="Debug Console" value="CDVDebugConsole" />
<plugin name="Geolocation" value="CDVLocation" />
<plugin name="SplashScreen" value="CDVSplashScreen" />
<plugin name="Battery" value="CDVBattery" />
<plugin name="Globalization" value="CDVGlobalization" />
</plugins>
<preference name="phonegap-version" value="cli-5.2.0" />
<!--<preference name="android-windowSoftInputMode" value="adjustPan" />-->
<preference name="android-windowSoftInputMode" value="adjustResize" />
<icon src="images/ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="images/mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="images/hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="images/xhdpi.png" gap:platform="android" gap:density="xhdpi" />
<!-- iPhone icons -->
<icon src="images/57.png" gap:platform="ios" width="57" height="57" />
<icon src="images/114.png" gap:platform="ios" width="114" height="114" />
<icon src="images/72.png" gap:platform="ios" width="72" height="72" />
<icon src="images/76.png" gap:platform="ios" width="76" height="76" />
<icon src="images/120.png" gap:platform="ios" width="120" height="120" />
<icon src="images/152.png" gap:platform="ios" width="152" height="152" />
<!-- Android splashes -->
<gap:splash src="images/sldpi.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="images/smdpi.png" gap:platform="android" gap:density="mdpi" />
<gap:splash src="images/shdpi.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="images/sxhdpi.png" gap:platform="android" gap:density="xhdpi" />
<!-- iPhone splashes -->
<gap:splash src="images/320x480.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="images/640x960.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="images/640x1136.png" gap:platform="ios" width="640" height="1136" />
<gap:plugin name="com.devexpress.plugins.devextremeaddon" version="1.0.1" />
<gap:plugin name="com.phonegap.plugin.statusbar" version="1.1.0" />
<gap:plugin name="org.apache.cordova.splashscreen" version="0.3.4" />
<gap:plugin name="org.li8.inappbrowser" version="0.1" />
<gap:plugin name="org.apache.cordova.network-information" version="0.2.12" />
<gap:plugin name="com.danielcwilson.plugins.googleanalytics" version="0.6.1" />
<gap:plugin name="nl.x-services.plugins.socialsharing" version="3.8.1" />
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="8000" />
<access origin="*" />
</widget>
Okay, I've fixed up your config.xml, but you likely have errors in your index.html also. I would suggest you post that as well.
Also, i removed the icons, plugins, preferences, and more, because you can always add those back. This example gets you working.
You should read the Phonegap Build blog for the last 60 days or so, and there are more changes coming in the next 30 days. If you get a chance skim through the Cordova blog as well.
You should also skim this: Top Mistakes by Developers new to Cordova/Phonegap
AND READ these
HOW TO apply the Cordova/Phonegap the whitelist system
Core Plugins Setup
Glossary - deprecated means - considered old, and planned to be phased out, but still available for use.
Your Fixes
NOTE YOUR APP IS NOW INSECURE. IT IS UP TO YOU TO SECURE YOUR APP.
Read: HOW TO apply the Cordova/Phonegap the whitelist system
<?xml version="1.1" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id = "com.appbogoo.www" version="1.1" >
<name>BOGOO</name>
<description>
BOGOO
</description>
<preference name="phonegap-version" value="cli-5.2.0" />
<plugin name="cordova-plugin-geolocation" source="npm" spec="1.0.1" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="1.0.1" />
<plugin name="cordova-plugin-network-information" source="npm" spec="1.0.1" />
<plugin name="cordova-plugin-splashscreen" source="npm" spec="2.1.0" />
<plugin name="cordova-plugin-statusbar" source="npm" spec="1.0.0" />
<!-- No longer available -->
<!-- <gap:plugin name="com.devexpress.plugins.devextremeaddon" version="1.0.1" /> -->
<!-- Deprecated -->
<!-- <gap:plugin name="com.danielcwilson.plugins.googleanalytics" version="0.6.1" /> -->
<plugin name="cordova-plugin-google-analytics source="npm" spec="0.8.1" />
<!-- Deprecated -->
<!-- <gap:plugin name="nl.x-services.plugins.socialsharing" version="3.8.1" /> -->
<plugin name="cordova-plugin-x-socialsharing source="npm" spec="5.0.7" />
<plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" /> <!-- Required for iOS9 -->
</widget>
Change Plugin name and value is the package name of plugin. example:
</description>
<preference name="permissions" value="none"/>
<gap:plugin name="org.apache.cordova.core.geolocation" />
<feature name="Geolocation">
<param name="ios-package" value="CDVLocation" />
</feature>
<plugins>
<plugin name="cordova-plugin-device" value="org.apache.cordova.Device" />
<plugin name="cordova-plugin-network-information" value="CDVConnection" />
<plugin name="Debug Console" value="CDVDebugConsole" />
<plugin name="cordova-plugin-globalization" value="CDVLocation" />
<plugin name="cordova-plugin-splashscreen" value="CDVSplashScreen" />
//etc...
</plugins>
I am working on WSO2 proxy service that invokes a lot of other DSS services. My requirement is to send the response of one of the DSS service on to a jms queue and at the same time continue with the exsiting flow in the proxy service i.e. continue invoking and processing the other DSS services.
I need to get the response of Simple Product Service (sequence key -if4_simpleProduct) and send it back on to the queue, but after that continue with logic that is placed in the proxy service and sequence. I tried using CLONE Mediator for the same. But my prxy service flow stops after coming in to the CLONE Meditaor flow. Below is the snippet for proxy service and sequence.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SPE_Payload"
transports="jms" startOnLoad="true" trace="enable">
<description />
<target>
<inSequence>
<transaction action="new" />
<xslt key="StepToCommon" />
<log level="full" />
<enrich>
<source type="body" clone="true" />
<target type="property" property="MSG_PAYLOAD" />
</enrich>
<sequence key="if4_simpleProduct" />
<filter xpath="boolean (//product/simpleProduct/altPrdCodes/pn_apc_id/text())">
<enrich>
<source clone="true" xpath="//product/simpleProduct/altPrdCodes" />
<target type="property" property="ALT_PRDS" />
</enrich>
<sequence key="if4_alternateProducts" />
</filter>
....
.....
<transaction action="commit" />
</inSequence>
</target>
<parameter name="transport.jms.ContentType">application/xml</parameter>
<parameter name="transport.jms.Destination">test</parameter>
</proxy>
Given below is the code of for sequence while calling Simple Product Service
<sequence xmlns="http://ws.apache.org/ns/synapse" name="if4_simpleProduct"
onError="myErrorHandlerSeq">
<payloadFactory>
<format>
<p:O_SimpleProduct xmlns:p="http://ws.wso2.org/dataservice">
<p:PC_STEP_SKU_ID>$1</p:PC_STEP_SKU_ID>
</p:O_SimpleProduct>
</format>
<args>
<arg xmlns:m="http://wso2.org/services/product" evaluator="xml"
expression="//product/simpleProduct/step_id/text()" />
</args>
</payloadFactory>
<header name="Action" value="urn:O_SimpleProduct" />
<callout serviceURL="local://localhost/services/productEnrichment"
action="urn:O_SimpleProduct" useServerConfig="true">
<source xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
<target xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
</callout>
<clone sequential="false">
<property name="RESPONSE" value="true" />
<header name="To" action="remove" />
<target>
<endpoint>
<address
uri="jms:/step.IF04Output?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue" />
</endpoint>
</target>
<target>
<filter xmlns:ns="http://org.apache.synapse/xsd" xmlns:ds="http://wso2.org/services/product"
source="//ds:result/ds:set/ds:PC_STATUS/text()" regex="0">
<then>
<log level="custom">
<property name="STATUS"
value="************DONE INSERTING SIMPLE ATTRIBUTES***************" />
</log>
</then>
<else>
<log level="full" category="ERROR">
<property name="STATUS"
value="************ERROR OCCURED WHILE INSERTING SIMPLE ATTRIBUTES. ROLLBACKING THE TRANSACTION***************" />
<property name="PC_RP_ID" expression="get-property('GEN_RP_ID')" />
</log>
<transaction action="rollback" />
<drop />
</else>
</filter>
<property xmlns:ds="http://wso2.org/services/product" name="GEN_RP_ID"
expression="//ds:result/ds:set/ds:PC_RP_ID/text()" />
<enrich>
<source type="property" clone="true" property="MSG_PAYLOAD" />
<target type="body" />
</enrich>
</target>
</clone>
</sequence>
I am struggling with the issue since last two days. tried sing Clone meditior in several places. but it does not work. Could you please provide your suggestions soon as I have a demo to go tomorrow and I need to sort it out :(
Cheers,
Aanchal
I think this is the part you are struggling;
<callout serviceURL="local://localhost/services/productEnrichment"
action="urn:O_SimpleProduct" useServerConfig="true">
<source xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
<target xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
</callout>
<clone sequential="false">
<property name="RESPONSE" value="true" />
<header name="To" action="remove" />
<target>
<endpoint>
<address
uri="jms:/step.IF04Output?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue" />
</endpoint>
</target>
Since your requirement is get response form one of the DS service and send that to queue..I think it fails because you are removing "To" header..Use callout mediator inside clone mediator's one of the "Target" configuration after sending to JMS queue drop the message there..In the other target, define your rest of the logic..
My sessions are not being cached. I am using co-located caching on my web role.
I have the following in my web.config:
<configSections>
<section name="cacheDiagnostics" type="Microsoft.ApplicationServer.Caching.AzureCommon.DiagnosticsConfigurationSection, Microsoft.ApplicationServer.Caching.AzureCommon" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
...
<dataCacheClients>
<dataCacheClient name="default">
<autoDiscover isEnabled="true" identifier="Website" />
</dataCacheClient>
</dataCacheClients>
My cloud service definition (.csdef) is as follows:
<ServiceDefinition name="WebCloud.Test" ...>
<WebRole name="Website" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Caching" />
</Imports>
<Startup priority="-2">
<Task commandLine="Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe install" executionContext="elevated" taskType="simple" />
</Startup>
</WebRole>
</ServiceDefinition>
And the following in the ConfigurationSettings of the cscfg file:
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="DefaultEndpointsProtocol=http;AccountName=ACCOUNTNAME;AccountKey=ACCOUNTKEY==" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel" value="1" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="20" />
Can anyone spot why it is not working? Is it perhaps the identifier set in dataCacheClients?
I fixed the issue. The following needs to be included in the web.config:
<sessionState mode="Custom" customProvider="AFCacheSessionStateProvider">
<providers>
<add name="AFCacheSessionStateProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" applicationName="AFCacheSessionState"/>
</providers>
</sessionState>
This stores ASP.NET Session State in the cache.