Loading...

SiListView and Web Services [QWP 5.7 and SP2010 Enterprise]

SiListView and Web Services [QWP 5.7 and SP2010 Enterprise]

  • This topic is empty.
Viewing 12 reply threads
  • Author
    Posts
    • #5314
      Anonymous
      Anonymous
      Participant

      Hi John

      In this particular instance, the Web service methods is named "RetrieveMultiple" and according to Microsoft documentation (http://msdn.microsoft.com/en-us/library/bb928434.aspx) refers to an API that uses strongly typed object so XML construct for the parameter will not work.

      SI Web Parts were tested with "FetchXml" method exposed by Microsoft Dynmaic CRM 3.0. I believe CRM 4.0 continue to support this API, which allows you to construct XML parameter. It executes slower than "RetrieveMultiple" due to extra parsing but will definitely work for you. The "FetchXML" parameter is typically used in "Fetch" method which appears to be not available in that WSDL service. Any idea why it is not there?

      Other than that, your constructed fetchXML string seems to be valid according to their documentation and should bring data back.

    • #5724
      Anonymous
      Anonymous
      Participant

      How do you set this xml in the SiListView when source is set to 'XML'. See above.

      I am looking for information on how to configure the Quest web part to return this XML as a query over the service. At the moment all I get are errors!!!

    • #5723
      Anonymous
      Anonymous
      Participant

      You need CRM 4.0 Fetch method that takes "fetchXML" as the single parameter of an XML string to execute the query. The XML parameter you constructed builds the right fetch xml string as illustrated in your screen shot. This string will be passed to Fetch method of the Web services to obtain a result back. Both parameter and return result will be taken care of by SI Web Parts.

      The issue at hand and why you are receiving error is that "RetrieveMultiple" does not accept an XML string parameter as "FetchXML". You would need to find the "Fetch" method exposed by CRM services and construct it. Otherwise, you would have to work with a strongly typed object as parameter to "RetreiveMultiple". From WSDL, the specific info on this type is not well known. We only know about its base type. It is not advised to use this method in SI Catalog definition unless you are well around CRM object API.

      Make sure when you define Operation, from the method drop down list, you find "fetch" as I believe that is for "fetchXml" that allows you to construct an XML query parameter without knowing specific parameter type and shall work the best for you.

    • #5722
      Anonymous
      Anonymous
      Participant

      These are the only Methods avalable. No Fetch Method. It is my understanding that 'RetreiveMultiple' method supports "fetchXML'

      Screen Shot 2012-12-13 at 8.52.51 AM.png

    • #5721
      Anonymous
      Anonymous
      Participant

      Please refer to my previous post and the link I provided from Microsoft. RetrieveMultiple is not using "fetchXml" where Fetch is.

    • #5720
      Anonymous
      Anonymous
      Participant

      Hi , we have switched from the /2011/Organization.svc?wsdl service to the …. mscrmservices/2007/CrmServiceWsdl.aspx This web service has the 'Fetch' method.

      Here is the test xml.

      <fetch mapping='logical'>

         <entity name='account'>

            <attribute name='accountid'/>

            <attribute name='name'/>

         </entity>

      </fetch>

      Here is a copy of the catalog. Looks OK to me.

      <Catalog>

        <Entity System="CRM" Service="CRM 2007" Name="2007">

          <Operation Method="Fetch" Name="Fetch">

            <Parameter Name="fetchXml" Type="System.String" Usage="In" Source="XML">

              <Element Name="fetch mapping" Source="FixedValue" Type="System.String" Value="logical">

                <Element Name="enitity name" Source="FixedValue" Type="System.String" Value="account">

                  <Attribute Name="attribute name" Source="FixedValue" Type="System.String" Value="name" />

                  <Attribute Name="attribute name" Source="FixedValue" Type="System.String" Value="accountid" />

                </Element>

              </Element>

            </Parameter>

          </Operation>

        </Entity>

      </Catalog>

      Still getting this error.

      Screen Shot 2012-12-14 at 7.19.40 AM.png

      Any ideas on how to fix this? Thanks for your input thus far.

    • #5719
      Anonymous
      Anonymous
      Participant

      Hello, can anyone respond to this?

    • #5718
      Anonymous
      Anonymous
      Participant

      Should not you be suppling the value to th fetch query string for accountid and/or name? Like building the final parameter as XML string. The error seems to indicate that CRM server side does not like the request parameter. The ULS log may reveal more about the parameter being missing or something.

      <fetch mapping='logical'>

      <entity name='account'>

      <attribute name='accountid'>123</attribute>

      <attribute name='name'>SomeName</attribute>

      </entity>

      </fetch>

    • #5717
      Anonymous
      Anonymous
      Participant

      I thought the fetch query was intended to return a number of records from an 'Entity' in this case the 'account' entity. The atributes define the columns returned such as 'accountid, 'accountname' etc. Is this not correct?

      How do you enable logging in the SI web parts? Where are the log files generated?

    • #4277
      Anonymous
      Anonymous
      Participant

      We need to build a query in the SiListView to pass back over a web service. We have been tyring to configure the query in the panel that manages xml but we are not sure how it works.

      This is some test xml that we have been trying to configure but we are not sure how to set this in the web part.

      <fetch mapping=’logical’>

         <entity name=’account’>

            <attribute name=’accountid’/>

            <attribute name=’name’/>

         </entity>

      </fetch> 

      Screen Shot 2012-12-13 at 7.44.46 AM.png

      Here is our configuration in the XML Editor. This is one of many attempts to replicate the query.

      Should Type = ‘System.String’??

      The XML highlighted in Red doesn’t seem to be properly formatted.

      Screen Shot 2012-12-13 at 7.44.57 AM.png

      Screen Shot 2012-12-13 at 7.45.07 AM.png

      Screen Shot 2012-12-13 at 7.45.17 AM.png

      Here is the error we get.

      Screen Shot 2012-12-13 at 7.45.30 AM.png

      Could someone from Quest please review the above and offer some ideas/comments. Any help would be appreciated.

    • #5716
      Anonymous
      Anonymous
      Participant

      Hi , Can you respond to the question regarding the fetch query? Thanks

    • #5332
      Anonymous
      Anonymous
      Participant

      I was able to dig out some configuration strings I used when connecting to Dynamic CRM 3.0. I hope this can be of help with your issue.

      Fetch string: "<fetch mapping=\"logical\"><entity name=\"account\"><all-attribute></all-attribute></entity></fetch>"

      <Catalog>
        <Entity System="WA Dynamics CRM" Service="CRMService" Name="Accounts" Default="true">
          <Operation Method="Fetch" Name="GetAccounts">
            <Parameter Name="fetchXml" Type="System.String" Usage="In" Source="XML" >
               <Element Name="fetch" >
                 <Attribute Source="FixedValue" Name="mapping" Value="logical"/>
                 <Element Name="entity">
                         <Attribute Source="HttpRequest" SourceName="Entity" Name="name" Value="account"/>
                         <Element Name="all-attributes"/>
                 </Element>
             </Element>
           </Parameter>
          </Operation>
        </Entity>
      </Catalog>

      <Catalog>

      <Entity Name="Account" System="WA Dynamics CRM" Service="CRMService">

        <Operation Name="GetList" >

            <Parameter Source="FixedValue" Type="System.String" Name="FetchXml" Value="&lt;fetch mapping=’logical’ &gt;&lt;entity name=’account’&gt;&lt;all-attribute/&gt;&lt;/entity&gt;&lt;/fetch&gt;"/>

            <Parameter Source="Return" Type="System.Data.DataSet, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" SourceName="result" />

        </Operation>

        <Operation Name="DeleteCustomer">

            <Parameter Source="HTTPParameter" SourceName="UserID" Type="int" Name="UserID"/>

            <Parameter Source="Session" SourceName="UserName" Type="System.String" Name="UserName"/>

            <Parameter Source="RowConsumer" SourceName="UserSession" Type="System.Ojbect" Name="ListViewUser"/>

            <Parameter Source="FilterConsumer" SourceName="UserFilterSession" Type="System.String" Name="ListViewUserFilter"/>

        </Operation>

        <Operation Name="UpdateCustomer">

            <Parameter Source="Input" SourceName="FirstName" Type="System.String" Name="First Name" Value=""/>

            <Parameter Source="Input" SourceName="LastName" Type="System.String" Name="Last Name"/>

            <Parameter Source="RowConsumer" SourceName="AgeSession" Type="System.Integer" Name="Age" Value="ListView"/>

        </Operation>

      </Entity>

      <Entity Name="Payment" System="WA Dynamics CRM" Service="CRMService">

        <Operation name="GetPaymentByCustomer">

            <Parameter Source="Input" SourceName="UserID" Type="System.String" Name="UserID" Usage="In" />

        </Operation>

      </Entity>

      <EntityRelations>

        <EntityRelation SourceEntity="Customer" SourceEntityColumn="UserID" DestinationEntity="Payment" DestinationEntityColumn="UserID"/>

      </EntityRelations>

      </Catalog>

      <Catalog>

        <Entity Name="Account" System="WA Dynamics CRM" Service="CRMService" Default="true">

          <Operation Name="GetList" Default="true" Method="Fetch">

            <Parameter Source="FixedValue" Type="System.String" Name="FetchXml" Value="&lt;fetch mapping=&quot;logical&quot;&gt;&lt;entity name=&quot;account&quot;&gt;&lt;all-attributes/&gt;&lt;/entity&gt;&lt;/fetch&gt;" Usage="In" />

          </Operation>

          <Operation Name="DeleteCustomer">

            <Parameter Source="HTTPParameter" SourceName="UserID" Type="int" Name="UserID" />

            <Parameter Source="Session" SourceName="UserName" Type="System.String" Name="UserName" />

            <Parameter Source="RowConsumer" SourceName="UserSession" Type="System.Ojbect" Name="ListViewUser" />

            <Parameter Source="FilterConsumer" SourceName="UserFilterSession" Type="System.String" Name="ListViewUserFilter" />

          </Operation>

          <Operation Name="UpdateCustomer">

            <Parameter Source="Input" SourceName="FirstName" Type="System.String" Name="First Name" Value="" />

            <Parameter Source="Input" SourceName="LastName" Type="System.String" Name="Last Name" />

            <Parameter Source="RowConsumer" SourceName="AgeSession" Type="System.Integer" Name="Age" Value="ListView" />

          </Operation>

        </Entity>

        <Entity Name="Payment" System="WA Dynamics CRM" Service="CRMService">

          <Operation name="GetPaymentByCustomer">

            <Parameter Source="Input" SourceName="UserID" Type="System.String" Name="UserID" Usage="In" />

          </Operation>

        </Entity>

        <EntityRelations>

          <EntityRelation SourceEntity="Customer" SourceEntityColumn="UserID" DestinationEntity="Payment" DestinationEntityColumn="UserID" />

        </EntityRelations>

      </Catalog>

    • #5743
      Anonymous
      Anonymous
      Participant

      Hi , thanks for this. JA

Viewing 12 reply threads

You must be logged in to reply to this topic.