2013-05-03 5 views
2

Я играю с коннектором Google Task и закончилась с ошибкой при слеженииGoogle Task/Календарь

The content of element 'google-tasks:config-with-oauth' is not complete. One of '{" http://www.mulesoft.org/schema/mule/core ":annotations, " http://www.mulesoft.org/schema/mule/google-tasks ":oauth-callback-config}' is expected.

Вот моя конфигурация

<google-tasks:config-with-oauth name="Google_Tasks" 
consumerKey="sagitec.mygbiz.com" 
consumerSecret="oeX9wb_GhldQJYjHKLDqC-EB" doc:name="Google Tasks"/> 
    <flow name="google_taskFlow1" doc:name="google_taskFlow1"> 
     <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/> 
     <google-tasks:authorize config-ref="Google_Tasks" accessTokenUrl="https://accounts.google.com/o/oauth2/token" 
authorizationUrl="https://accounts.google.com/o/oauth2/auth" 
access_type="online" force_prompt="auto" doc:name="Google Tasks"/> 
     <logger level="INFO" doc:name="Logger" message="#[payload]"/> </flow> 

Если я ввести "локальный" в домене (который указан как необязательный) под вкладкой Oauth для google-tasks:config-with-oauth, я не получаю никакой ошибки сборки.

Итак, мой первый вопрос: какое значение я должен ввести в домене и где я могу его получить.

2) В чем разница между потребительским ключом/секретом и ClientKey/secret.

3) в одном из образцов, я видел ${google.apiKey}. Что это такое, и если это переменная, wgere и как объявить ее.

Это будет очень хорошо, если предоставлен какой-либо образец.

Спасибо заранее, Kannan

ответ

0

здесь я добавил пример выборки для проверки подлинности каландра Google, используя разъем Google

ваш

идентификатор клиента >> consumerKey

клиент секрет >> consumerSecret

$ {google.apiKey} >> ваше глобальное имя конфигурации календаря Google, т.е. nam e = "Google_Calendars" в потоке ниже

<?xml version="1.0" encoding="UTF-8"?> 

    <mule xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data- mapper" xmlns:json="http://www.mulesoft.org/schema/mule/json" 
    xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 
    xmlns:objectstore="http://www.mulesoft.org/schema/mule/objectstore" 
    xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xmlns:google-calendars="http://www.mulesoft.org/schema/mule/google-calendars" 
    xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/google-calendars http://www.mulesoft.org/schema/mule/google-calendars/1.0/mule-google-calendars.xsd 
http://www.mulesoft.org/schema/mule/objectstore http://www.mulesoft.org/schema/mule/objectstore/1.0/mule-objectstore.xsd 
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd 
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd 
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd"> 

    <google-calendars:config-with-oauth 
     name="Google_Calendars" 
     consumerKey="${consumer-key}" 
     consumerSecret="${consumer-secret}" doc:name="Google Calendars" 
     applicationName="test"> 
     <google-calendars:oauth-callback-config 
      domain="localhost" localPort="8083" path="list" 
      remotePort="8083" /> 
     <google-calendars:oauth-store-config objectStore-ref="ObjectStoreBean" /> 
    </google-calendars:config-with-oauth> 


    <spring:beans> 
     <spring:bean id="ObjectStoreBean" name="ObjectStoreBean" 
      class="org.mule.util.store.SimpleMemoryObjectStore" /> 
    </spring:beans> 
    <flow name="authorizationAndAuthenticationFlow" doc:name="authorizationAndAuthenticationFlow"> 
     <http:inbound-endpoint host="localhost" port="8080" 
      path="oauth-authorize" doc:name="HTTP" /> 
     <google-calendars:authorize config-ref="Google_Calendars" 
      doc:name="Google Calendars" /> 
     <http:response-builder status="200" 
      doc:name="HTTP Response Builder"> 
      <set-payload value="You have successfully authorized the connector" /> 
     </http:response-builder> 
     <catch-exception-strategy doc:name="Catch Exception Strategy"> 
      <http:response-builder status="404" 
       doc:name="HTTP Response Builder"> 
       <set-payload value="An error has occurred authorizing the connector" /> 
      </http:response-builder> 
     </catch-exception-strategy> 
    </flow>  

</mule>