Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
581 views
in Technique[技术] by (71.8m points)

olap - C# .NET Core send SoapEnvelope to Analysis Services

I am trying to connect to Annalysis Services from my C# .NET Core 3.1 web project. The Microsoft documentation I could find suggests the Microsoft.AnalysisServices.AdomdClient Nuget package which works fine. However I am using the Telerik PivotGrid JQuery component. This component already sends a complete XMLA envelope to my endpoint. I don't want to deserialize and take apart this envelope to create an AdomdCommand. I would rather send this envelope directly to the Analysis Services. Is there an easy way to send a SoapEnvelope from C# to the Analysis Services ? I want this C# proxy in between because of Authorization.

Example envelopes:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Header />
  <Body>
    <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
      <Command>
        <Statement>SELECT NON EMPTY {} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS FROM [Adventure Works]</Statement>
      </Command>
      <Properties>
        <PropertyList>
          <Catalog>Adventure Works DW 2008R2</Catalog>
          <Format>Multidimensional</Format>
        </PropertyList>
      </Properties>
    </Execute>
  </Body>
</Envelope>

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Header />
  <Body>
    <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
      <RequestType>MDSCHEMA_DIMENSIONS</RequestType>
      <Restrictions>
        <RestrictionList>
          <CATALOG_NAME>Adventure Works DW 2008R2</CATALOG_NAME>
          <CUBE_NAME>Adventure Works</CUBE_NAME>
        </RestrictionList>
      </Restrictions>
      <Properties>
        <PropertyList>
          <Catalog>Adventure Works DW 2008R2</Catalog>
        </PropertyList>
      </Properties>
    </Discover>
  </Body>
</Envelope>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...