XMLA Discover unparse results error (in Mondrian on Windows 7) - mondrian

I setup Mondrian and it is working fine but I am unable to make it the XMLA provider.
ie., http://localhost:8080/mondrian works fine but http://localhost:8080/mondrian/xmla.jsp returns the below error :-
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header></SOAP-ENV:Header>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.00HSBE02</faultcode>
<faultstring>XMLA Discover unparse results error</faultstring>
<faultactor>Mondrian</faultactor>
<detail>
<XA:error>
<code>00HSBE02</code>
<desc>The Mondrian XML: In DataSources: In DataSource: Expected <ProviderName> but found <Catalogs>
</desc>
</XA:error>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Please check your mondrian.properties file or your datasources.xml file, and just add the tag:
<DataSourceName>Provider=Mondrian;DataSource=YourDataSourceName;</DataSourceName>
That's it. Good luck

Related

NoMeasureSelected CampaignPerformanceReportRequest Microsoft Ads

I'm trying to setup Microsoft ads to a project and get CampaignPerformanceReportRequest working on my project but I'm receiving NoMeasureSelected error. Not sure where the issue is.
I added all the columns mention in the documentation to see if the work, but still getting same error. I tested using add dashboard report. It only require Impression and TimePeriod to generate successful report. I make my request to match the request in dashboard, but still get the same error.
Project is based on Ruby on rails.
<env:Body>
<v13:SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<v13:ReportRequest xsi:type="CampaignPerformanceReportRequest">
<v13:ExcludeColumnHeaders>true</v13:ExcludeColumnHeaders>
<v13:ExcludeReportFooter>true</v13:ExcludeReportFooter>
<v13:ExcludeReportHeader>true</v13:ExcludeReportHeader>
<v13:Format>Csv</v13:Format>
<v13:ReportName>Test Report</v13:ReportName>
<v13:ReturnOnlyCompleteData>false</v13:ReturnOnlyCompleteData>
<v13:Aggregation>Summary</v13:Aggregation>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>AccountId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>CampaignId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>Keyword</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>KeywordId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>DeviceType</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>Clicks</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Filter xsi:nil="true"/>
<v13:Scope>
<v13:AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>[REDACTED]</a1:long>
</v13:AccountIds>
</v13:Scope>
<v13:Time>
<v13:CustomDateRangeEnd>
<v13:Day>30</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeEnd>
<v13:CustomDateRangeStart>
<v13:Day>01</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeStart>
</v13:Time>
</v13:ReportRequest>
</v13:SubmitGenerateReportRequest>
</env:Body>
Response:
<s:Body>
<s:Fault>
<faultcode>s:Server</faultcode>
<faultstring>Invalid client data. Check the SOAP fault details for more information. TrackingId: 96ad1b6d-26e2-4b60-91d0-b6a68add6140.</faultstring>
<detail>
<ApiFaultDetail xmlns="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<TrackingId xmlns="https://adapi.microsoft.com">96ad1b6d-26e2-4b60-91d0-b6a68add6140</TrackingId>
<BatchErrors/>
<OperationErrors>
<OperationError>
<Code>2017</Code>
<Details i:nil="true"/>
<ErrorCode>NoMeasureSelected</ErrorCode>
<Message>The specified report request does not specify measurement columns (at least one is required). Please submit a report request with the required columns for this report type, and optionally additional columns that are to be included in the report.</Message>
</OperationError>
</OperationErrors>
</ApiFaultDetail>
</detail>
</s:Fault>
</s:Body>
Does any one know what is the issue here or any one has working SOAP request ?
Looks like your structure around Columns isn't quite right.
I think what the error The specified report request does not specify measurement columns (at least one is required). Please submit a report request with the required columns for this report type, and optionally additional columns that are to be included in the report. refers to is that Columns should have multiple values (i.e. be an 'array') - not itself be repeated like in your example.
I infer this from the reference documentation where Columns is defined with type ArrayOfCampaignPerformanceReportColumn.
<xs:element name="Columns" nillable="true" type="tns:ArrayOfCampaignPerformanceReportColumn" />
For your example, something like this should work:
<env:Body>
<v13:SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<v13:ReportRequest xsi:type="CampaignPerformanceReportRequest">
<v13:ExcludeColumnHeaders>true</v13:ExcludeColumnHeaders>
<v13:ExcludeReportFooter>true</v13:ExcludeReportFooter>
<v13:ExcludeReportHeader>true</v13:ExcludeReportHeader>
<v13:Format>Csv</v13:Format>
<v13:ReportName>Test Report</v13:ReportName>
<v13:ReturnOnlyCompleteData>false</v13:ReturnOnlyCompleteData>
<v13:Aggregation>Summary</v13:Aggregation>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>AccountId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>CampaignId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>Keyword</v13:CampaignPerformanceReportColumn
<v13:CampaignPerformanceReportColumn>KeywordId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>DeviceType</v13:CampaignPerformanceReportColumn
<v13:CampaignPerformanceReportColumn>Clicks</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Filter xsi:nil="true"/>
<v13:Scope>
<v13:AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>[REDACTED]</a1:long>
</v13:AccountIds>
</v13:Scope>
<v13:Time>
<v13:CustomDateRangeEnd>
<v13:Day>30</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeEnd>
<v13:CustomDateRangeStart>
<v13:Day>01</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeStart>
</v13:Time>
</v13:ReportRequest>
</v13:SubmitGenerateReportRequest>
</env:Body>

Problem loading sld raster style in Geoserver 2.15.1

When I try to load mi sld style to a hillshade raster (tif format) it gives me the folllowing message:
line 21: cvc-complex-type.2.1:the element 'sld: normalize' must not have any characters or any [child] element information elements, because the type content type is empty.
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" version="1.0.0" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc">
<UserLayer>
<sld:LayerFeatureConstraints>
<sld:FeatureTypeConstraint/>
</sld:LayerFeatureConstraints>
<sld:UserStyle>
<sld:Name>hill_22</sld:Name>
<sld:FeatureTypeStyle>
<sld:Rule>
<sld:RasterSymbolizer>
<sld:Opacity>0.2</sld:Opacity>
<sld:ChannelSelection>
<sld:GrayChannel>
<sld:SourceChannelName>1</sld:SourceChannelName>
<sld:ContrastEnhancement>
<sld:Normalize>
<sld:VendorOption name="algorithm">StretchToMinimumMaximum</sld:VendorOption>
<sld:VendorOption name="minValue">1</sld:VendorOption>
<sld:VendorOption name="maxValue">181</sld:VendorOption>
</sld:Normalize>
</sld:ContrastEnhancement>
</sld:GrayChannel>
</sld:ChannelSelection>
<sld:ColorMap>
<sld:ColorMapEntry quantity="0" color="#000000"/>
<sld:ColorMapEntry quantity="255" color="#ffffff"/>
</sld:ColorMap>
</sld:RasterSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</UserLayer>
</StyledLayerDescriptor>
This is caused because the GeoServer validator uses the OGC schema to validate the SLD, while specifying optional VendorOptions is not part of the standard. So as you know better than the computer you can ignore it and press apply and all will be fine.
If it really bothers you, you can submit a PR to update the schema used to accept this change.

Replace element by XPath

I try to replace some element of my input XML in Citrus Framework.
My Spring context contains:
<citrus:namespace-context>
<citrus:namespace prefix="def" uri="http://sample.com/xmlns/2005"/>
</citrus:namespace-context>
My input file starts with:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns0:canonicalMessageHeader xmlns:ns0="http://sample.com/xmlns/2005">
<ns0:headerVersion>1.0</ns0:headerVersion>
<ns0:bodyVersion>1.0</ns0:bodyVersion>
<ns0:trackingInfo>
<ns0:eventHandlerInitInfo>
<ns0:processInfo>
<ns0:adapterTrackingId>214F27DF-E1FB-4E84-9122-390C5876ABD2:1</ns0:adapterTrackingId>
...
My endpoint is configured in that way:
<send endpoint="jms:topic:Order.Request?timeout=10000&connectionFactory=DEVconnectionFactoryFrom">
<message>
<resource file="com/sample/citrus/messages/input/SalesOrderTo.xml"/>
<element value="${track}" path="SOAP-ENV:Envelope/SOAP-ENV:Header/def:canonicalMessageHeader/def:trackingInfo/def:eventHandlerInitInfo/def:processInfo/def:adapterTrackingId"/>
I have the following error:
Can not evaluate xpath expression 'SOAP-ENV:Envelope/SOAP-ENV:Header/def:canonicalMessageHeader/def:trackingInfo/def:eventHandlerInitInfo/def:processInfo/def:adapterTrackingId'
at com/sample/citrus/SalesOrderToIT(sequential:45)
at com/sample/citrus/SalesOrderToIT(send:48-82)
Caused by: javax.xml.xpath.XPathExpressionException: org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: def
What's the possible cause of this error?
Best Regards
Global namespace declaration support is missing in Citrus when overwriting message elements in a send operation via XPath. This issue has been tracked: https://github.com/christophd/citrus/issues/331
In the meantime you have to use the exact same namespace prefix as in the message template file - in your case ns0:
Also you could throw away XPath overwrite and use the dot notated Node overwrite like this:
<send endpoint="jms:topic:Order.Request?timeout=10000&connectionFactory=DEVconnectionFactoryFrom">
<message>
<resource file="com/sample/citrus/messages/input/SalesOrderTo.xml"/>
<element value="${track}" path="Envelope.Header.canonicalMessageHeader.trackingInfo.eventHandlerInitInfo.processInfo.adapterTrackingId"/>
</message>
</send>
The dot notation is not based on namespaces but uses the local element names for finding the element in the message template. Obviously not as powerful as XPath but it works with current version of the framework.
You defined nso as namespace prefix in XML but then use def on the XPath, should be nso.

Create Exchange Message Items with EWS and mark them for deletion

I am using EWS to create items in an Exchange mailbox. I am using the CreateItems method. I am also setting an extended property on the items I create so that it is deleted when that date is reached. The items are created correctly, but they are not deleted at the specified date.
I read that there is a timer job in Exchange that does the actual processing based on the extended property set on an item and that I could use "Start-ManagedFolderAssistant -Identity user#example.com" in Powershell to force that job, but this didn't work either.
Here is the message I am sending:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
<m:CreateItem MessageDisposition="SaveOnly">
<m:SavedItemFolderId>
<t:DistinguishedFolderId Id="root" />
</m:SavedItemFolderId>
<m:Items>
<t:Message>
<t:ItemClass>IPM.Blabla</t:ItemClass>
<t:Subject>ToDelete</t:Subject>
<t:Body BodyType="Text">Todelete</t:Body>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertySetId="c11ff724-aa03-4555-9952-8fa248a11c3e"
PropertyName="Expiration Date" PropertyType="String" />
<t:Value>6/4/2015 2:39:04 PM</t:Value>
</t:ExtendedProperty>
</t:Message>
</m:Items>
</m:CreateItem>
</soap:Body>
</soap:Envelope>
Is there something missing with in the message so that the job deletes it? Is there something that I misunderstood in the way the system works?
That property your setting won't do anything it looks like you have pulled the sample from https://msdn.microsoft.com/en-us/library/office/dd633654%28v=exchg.80%29.aspx which is just a sample of creating a custom property for your own use. There is no back-end process that would use this property you just created.
There are two ways of doing expiry in Outlook/Exchange the first is using the PidtagExpirytime https://msdn.microsoft.com/en-us/library/ee237103%28v=exchg.80%29.aspx . This is a client mechanism and there is still no server process to delete the expired messages see http://www.msoutlook.info/question/automatically-delete-message-at-set-date . The Server side method is to stamp the messages with a Retention tag that will specify when the message will be deleted eg http://blogs.msdn.com/b/akashb/archive/2011/08/11/stamping-retention-policy-tag-using-ews-managed-api-1-1-from-powershell-exchange-2010.aspx and in 2013 you can do this via https://msdn.microsoft.com/en-us/library/office/jj220500%28v=exchg.80%29.aspx#ret
Cheers
Glen

Mule - getting primary key back after insert

From the below article, i understand that Mule won't return the auto-generated Primary key after insert statement. Is there any work-around to get the PrimaryKey? I don't prefer going for mybatis as mentioned in this article.
Any help is appreciated!
http://ricston.com/blog/rant-mule-jdbc-transport-introduction-mule-module-mybatis/
try using new DB module availabe in 3.5.0-M4 or wait a few weeks for Mule ESB 3.5.0. Here is a usage example of this new feature:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:db="http://www.mulesoft.org/schema/mule/db"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd">
<flow name="insertWithAutoGeneratedKeys">
<inbound-endpoint address="vm://insertWithAutoGeneratedKeys" exchange-pattern="request-response"/>
<db:insert config-ref="dbConfig" autoGeneratedKeys="true" autoGeneratedKeysColumnIndexes="1">
<db:parameterized-query>INSERT INTO PLANET(POSITION, NAME) VALUES (777, 'Mercury')</db:parameterized-query>
</db:insert>
</flow>
Alternative: Use UUIDs for primary key and generate the UUID in Mule before the insert.

Resources