Friday, September 24, 2010

Invoking MSCRM service from any client like Java Client(Sun Microsystem)

Below is the Soap request we execute from SOAP UI tool we have to just pass UId , pwd, domain from left side screen which comes in SOAP UI tool and we will get the response . WE don't need WSE Security required for interpolation among webservices.



<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://schemas.microsoft.com/crm/2007/WebServices" xmlns:cor="http://schemas.microsoft.com/crm/2007/CoreTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <soap:Header>
     <web:CrmAuthenticationToken>
         <cor:AuthenticationType>0</cor:AuthenticationType>
         <!--Optional:-->
       <cor:OrganizationName>Ath</cor:OrganizationName>
       <cor:CallerId>00000000-0000-0000-0000-000000000000</cor:CallerId>
    </web:CrmAuthenticationToken>
 </soap:Header>
   <soap:Body>
      <web:RetrieveMultiple>
         <!--Optional:-->
        <web:query xmlns:q1="http://schemas.microsoft.com/crm/2006/Query" xsi:type="q1:QueryExpression">
                 <q1:EntityName>contact</q1:EntityName>
                 <q1:ColumnSet xsi:type="q1:ColumnSet">
                                <q1:Attributes>
                                <q1:Attribute>fullname</q1:Attribute>
                                                <q1:Attribute>createdon</q1:Attribute>
                                </q1:Attributes>
                 </q1:ColumnSet>
                 <q1:Distinct>false</q1:Distinct>
                 <q1:Criteria>
                                <q1:FilterOperator>And</q1:FilterOperator>
                                <q1:Conditions>
                                                <q1:Condition>
                                                                <q1:AttributeName>createdon</q1:AttributeName>
                                                                <q1:Operator>ThisWeek</q1:Operator>
                                                </q1:Condition>
                                </q1:Conditions>
                <q1:Conditions>
                                                <q1:Condition>
                                                                <q1:AttributeName>fullname</q1:AttributeName>
                                                                <q1:Operator>Equal</q1:Operator>
                                <q1:Values>
                                                                                <q1:Value xsi:type="xsd:string">Jesper Aaberg</q1:Value>
                                                                </q1:Values>
                                                </q1:Condition>
                                </q1:Conditions>
                </q1:Criteria>
                <q1:Orders>
                                <q1:Order>
                                                <q1:AttributeName>fullname</q1:AttributeName>
                                                <q1:OrderType>Descending</q1:OrderType>
                                </q1:Order>
                </q1:Orders>
</web:query>
      </web:RetrieveMultiple>
   </soap:Body>
</soap:Envelope>

No comments:

Post a Comment