Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Element 'return' was not found. Line 1, position 231 | System.Xml.XmlException | ReadStartElement

Hi,

I am using Power BI Desktop Version: 2.121.644.0 32-bit. I was testing to get data from SQL SERVER ANALYSIS SERVICE DATABASE before buying PowerBI license.

I got input request from PowerBI for DISCOVER_PROPERTIES.

And our server returns SOAP request to PowerBI, but it gives the following Error Message:
Element 'return' was not found. Line 1, position 231.

 

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.121.644.0","ModuleName":"Microsoft.PowerBI.AdomdClient.dll","Component":"Microsoft.AnalysisServices.AdomdClient.XmlaReader","Error":"System.Xml.XmlException","MethodDef":"ReadStartElement","ErrorOffset":"28","ErrorCode":""}

 

Stack Trace:
System.Xml.XmlException
at System.Xml.XmlReader.ReadStartElement(String name)

 

Here's the SOAP request that we're returning. Please tell me what response is expected by Power BI :

 

 

 

 

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><m:DiscoverResponse xmlns:m="urn:schemas-microsoft-com:xml-analysis"><m:return xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:EX="urn:schemas-microsoft-com:xml-analysis:exception" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsd:schema elementFormDefault="qualified" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:sql="urn:schemas-microsoft-com:xml-sql">
	<xsd:element name="root">
		<xsd:complexType>
			<xsd:sequence maxOccurs="unbounded" minOccurs="0">
				<xsd:element name="row" type="row"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:simpleType name="uuid">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="xmlDocument">
		<xsd:sequence>
			<xsd:any/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="row">
		<xsd:sequence>
			<xsd:element name="PropertyName" sql:field="PropertyName" type="xsd:string"/>
			<xsd:element minOccurs="0" name="PropertyDescription" sql:field="PropertyDescription" type="xsd:string"/>
			<xsd:element minOccurs="0" name="PropertyType" sql:field="PropertyType" type="xsd:string"/>
			<xsd:element name="PropertyAccessType" sql:field="PropertyAccessType" type="xsd:string"/>
			<xsd:element minOccurs="0" name="IsRequired" sql:field="IsRequired" type="xsd:boolean"/>
			<xsd:element minOccurs="0" name="Value" sql:field="Value" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
<row><PropertyName>Catalog</PropertyName><PropertyDescription>Catalog</PropertyDescription><PropertyType>string</PropertyType><PropertyAccessType>Read</PropertyAccessType><IsRequired>false</IsRequired><Value>D:\Sample_Model_Repository</Value></row><row><PropertyName>ServerName</PropertyName><PropertyDescription>ServerName</PropertyDescription><PropertyType>string</PropertyType><PropertyAccessType>Read</PropertyAccessType><IsRequired>false</IsRequired><Value>INBAWN167196.ad.com</Value></row><row><PropertyName>ProviderVersion</PropertyName><PropertyDescription>ProviderVersion</PropertyDescription><PropertyType>string</PropertyType><PropertyAccessType>Read</PropertyAccessType><IsRequired>false</IsRequired><Value>9.00.1399.06</Value></row><row><PropertyName>MdpropMdxSubqueries</PropertyName><PropertyDescription>MdpropMdxSubqueries</PropertyDescription><PropertyType>boolean</PropertyType><PropertyAccessType>Read</PropertyAccessType><IsRequired>false</IsRequired><Value>true</Value></row></root></m:return></m:DiscoverResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

 

 

 

 

Input Request from PowerBI:

 

 

 

 

 

<?xml version="1.0" encoding="UTF-8"?><Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Header>
    <Version xmlns="http://schemas.microsoft.com/analysisservices/2003/engine/2" Sequence="922"/>
  </Header>
  <Body>
    <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
      <RequestType>DISCOVER_PROPERTIES</RequestType>
      <Restrictions/>
      <Properties>
        <PropertyList>
          <DbpropMsmdSubqueries>2</DbpropMsmdSubqueries>
          <LocaleIdentifier>16393</LocaleIdentifier>
        </PropertyList>
      </Properties>
    </Discover>
  </Body>
</Envelope>

 

 

 

 

 

 

Status: Investigating

Hi  @Sinwan 

PBI Desktop has been updated to 2.121.903.0 64-bit (September 2023) , you can update your Desktop version to the latest version and then test to get data from SQL SERVER ANALYSIS SERVICE DATABASE  .

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Investigating

Hi  @Sinwan 

PBI Desktop has been updated to 2.121.903.0 64-bit (September 2023) , you can update your Desktop version to the latest version and then test to get data from SQL SERVER ANALYSIS SERVICE DATABASE  .

 

Best Regards,
Community Support Team _ Ailsa Tao

Sinwan
Regular Visitor

Hi @v-yetao1-msft ,

 

I have Upgraded to Version: 2.121.903.0 64-bit (September, 2023).

Still facing the same issue. Can you please help me with any other solution? 

 

It works with other data visualization tools other than powerBI.Please let me know If anything else is needed. Attaching error code:

 

Feedback Type:
Frown (Error)

Error Message:
Element 'return' was not found. Line 1, position 231.

Stack Trace:
System.Xml.XmlException
   at System.Xml.XmlReader.ReadStartElement(String name)
   at Microsoft.AnalysisServices.AdomdClient.XmlaReader.ReadStartElement(String name)
   at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SupportsProperties(IList`1 propertyList)
   at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect()
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.AnalysisServices.AdomdQueryExecutor.OpenConnectionAndExecute[T](IAdomdConnectionPool connectionPool, IAdomdConnectionFactory connectionFactory, String connectionString, QueryExecutionOptions executionOptions, IPowerBITelemetryService telemetry, Func`2 execute)
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.AnalysisServices.ASLiveConnectionProperties.ASLiveConnectionPropertiesValidatorInternal.<>c__DisplayClass4_1.<Validate>b__1()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.AnalysisServices.ASLiveConnectionProperties.ASLiveConnectionPropertiesValidatorInternal.<Validate>d__4.MoveNext()

Stack Trace Message:
Element 'return' was not found. Line 1, position 231.

Invocation Stack Trace:
   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
   at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.AnalysisServices.ASLiveConnectionProperties.ASLiveConnectionPropertiesValidatorInternal.<Validate>d__4.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task)
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.LiveConnectionPropertiesValidator.<>c__DisplayClass8_0.<TryGetValidLiveConnectionProperties>b__0()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)
   at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.AllowModalDialogs(Action action)
   at Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.LiveConnectionPropertiesValidator.TryGetValidLiveConnectionProperties(IPowerBIWindowService windowService, ILiveConnectionProperties connectionProperties, Report report, ILiveConnectionCompleter liveConnectionPropertiesCompleter, ILiveConnectionProperties& validLiveConnectionProperties, Boolean& resultIsSameConnection, ValidationStatus& validationStatus)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.AreAnalysisServicesConnectionPropertiesValid(IPowerBIWindowService windowService, Report report, ILiveConnectionProperties connectionProperties, AnalysisServicesConnectionMode connectionMode, ILiveConnectionCompleter completer, ILiveConnectionProperties& validConnectionProperties)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.ValidateAndCreateAnalysisServicesConnection(ILiveConnectionProperties connectionProperties, Boolean addToFormulaHistory, Boolean isExternalDataset)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.TryImportAnalysisServiceLiveConnection(JsonUpdate builderResults, Query query)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.OnQuerySettingsResolved(JsonUpdate builderResults, Query query, String sourceId, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass64_0.<ResolveQuerySettings>b__0(JsonUpdate builderResults, Formula updatedFormula)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.ShowBuilderDialog(PackageReference packageReference, FormulaPath formulaPath, FormulaPartInfo formulaPartInfo, Query query, Action`2 successCallback, Action failureCallback, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.ResolveQuerySettings(Query query, Action`2 successCallback, Action failureCallback, ResolutionSetting resolutionSetting, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.ResolveQuerySettings(Query query, SourceFormula addedFormula, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.TryAddSource(String sourceID, Nullable`1 targetQueryGroupId, Query& newQuery)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.TryAddSource(String sourceID, Nullable`1 targetQueryGroupId, Query& newQuery)
   at Microsoft.Mashup.Client.UI.Shared.ConnectHelper.Connect(IWindowHandle owner, IDataSourceTemplateProvider dataSourceTemplateProvider, ILegacyUIHost uiHost, ITelemetryService telemetryService, DataImporter dataImporter, CommandUIControlBase commandUIControl, String sourceId, Nullable`1 targetQueryGroupId)
   at Microsoft.PowerBI.Client.Windows.Services.QueriesEditorWindowManager.GetData(PowerBIDataImporter dataImporter, String sourceId, Nullable`1 targetQueryGroupId, IDataSourceTemplateProvider dataSourceTemplateProvider, IWindowHandle ownerWindow)
   at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.<Connect>d__47.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.Connect(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, ConnectParameters parameters)
   at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAwaitableAsyncExceptions(IExceptionHandler exceptionHandler, Func`1 asyncFunc)
   at Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand`1.Execute(ICommand command, Object parameter)
   at Microsoft.Practices.Prism.Commands.CompositeCommand.Execute(Object parameter)
   at Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand`1.Execute(T parameter)
   at Microsoft.PowerBI.Client.Windows.PowerBIDataSourceTemplateProvider.ConnectInternal(String formulaId, Nullable`1 targetQueryGroupId)
   at Microsoft.Mashup.Host.Document.DataSourceTemplateProvider.Connect(String formulaId, Nullable`1 targetQueryGroupId)
   at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.SimpleDialog.DataSourceGalleryDialog.<>c__DisplayClass12_0.<ConnectToDataSource>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
   at Microsoft.PowerBI.Client.Program.<>c__DisplayClass6_0.<RunApplication>b__0()
   at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at Microsoft.PowerBI.Client.Program.RunApplication(String[] args)
   at Microsoft.PowerBI.Client.Program.Main(String[] args)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.121.903.0","ModuleName":"Microsoft.PowerBI.AdomdClient.dll","Component":"Microsoft.AnalysisServices.AdomdClient.XmlaReader","Error":"System.Xml.XmlException","MethodDef":"ReadStartElement","ErrorOffset":"28","ErrorCode":""}

Snapshot Trace Logs:
C:\Users\MSinwanbacke\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShotbae97c06-a391-4a21-b6e4-d919765c734b.zip

Model Default Mode:
Empty

Model Version:
PowerBI_V1

Performance Trace Logs:
C:\Users\MSinwanbacke\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_sparklines
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_setLabelOnExportPdf
PBI_dynamicFormatString
PBI_newCard

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_angularRls
PBI_onObject
PBI_oneDriveSave
PBI_oneDriveShare
PBI_gitIntegration

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

PowerBIUserFeedbackServices_IsReported:
True

Formulas:


section Section1;

 

Thanks,

Sinwan