0

http://www.mulesoft.org/connectors/drupal-connectorの Drupal Cloud Connector で例を試してみたいと思います。

しかし、私が行くとき

http://localhost:8081/drupal/node/create?title=test 

新しい記事を作成するには、これがブラウザーでの応答です。

Could not find a transformer to transform "SimpleDataType{type=java.lang.String, mimeType='*/*'}" to "CollectionDataType{type=java.util.List, itemType=java.lang.Object, mimeType='*/*'}".. Message payload is of type: String

MuleStudio コンソールからの出力は次のとおりです。

ERROR 2013-08-03 22:40:54,555 [[drupal-esb].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
********************************************************************************
Message               : Could not find a transformer to transform "SimpleDataType{type=java.lang.String, mimeType='*/*'}" to "CollectionDataType{type=java.util.List, itemType=java.lang.Object, mimeType='*/*'}".
Code                  : MULE_ERROR-236
--------------------------------------------------------------------------------
Exception stack is:
1. Could not find a transformer to transform "SimpleDataType{type=java.lang.String,  mimeType='*/*'}" to "CollectionDataType{type=java.util.List, itemType=java.lang.Object,  mimeType='*/*'}". (org.mule.api.transformer.TransformerException)
  org.mule.registry.MuleRegistryHelper:252     (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.transformer.TransformerException: Could not find a transformer to transform "SimpleDataType{type=java.lang.String, mimeType='*/*'}" to "CollectionDataType{type=java.util.List, itemType=java.lang.Object, mimeType='*/*'}".
at org.mule.registry.MuleRegistryHelper.lookupTransformer(MuleRegistryHelper.java:252)
at org.mule.modules.drupal.processors.AbstractExpressionEvaluator.transform(AbstractExpressionEvaluator.java:329)
at org.mule.modules.drupal.processors.AbstractExpressionEvaluator.evaluateAndTransform(AbstractExpressionEvaluator.java:202)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

WARN  2013-08-03 22:40:54,819 [[drupal-esb].http.request.dispatch.8081.02]   org.mule.transport.http.HttpConnector: No receiver found with secondary lookup on   connector: connector.http.mule.default with URI key: http://localhost:8081/favicon.ico
WARN  2013-08-03 22:40:54,819 [[drupal-esb].http.request.dispatch.8081.02] org.mule.transport.http.HttpConnector: Receivers on connector are: {
http://localhost:8081/drupal/node/create=HttpMessageReceiver{this=1ea6cbb2,   receiverKey=http://localhost:8081/drupal/node/create,    endpoint=http://localhost:8081/drupal/node/create}

}

それは私の構成XMLにあります:

<?xml version="1.0" encoding="UTF-8"?>
<mule ....>
<drupal:config name="Drupal" username="dba" password="****" server="locahost"   apiUrl="/service/rest"    taxonomyTermEndpoint="taxonomy-term" taxonomyVocabularyEndpoint="taxonomy-vocabulary" doc:name="Drupal" >
    <drupal:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</drupal:config>
<flow name="drupal-esbFlow1" doc:name="drupal-esbFlow1">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" path="drupal/node/create"/>
    <drupal:create-node config-ref="Drupal"  doc:name="Drupal" password="****" username="dba">
        <drupal:node   title="#[message.inboundProperties['title']]" type="article">
            <drupal:body>
                <drupal:und ref="#[payload]"/>
            </drupal:body>
        </drupal:node>
    </drupal:create-node>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>

4

1 に答える 1

0

If i remove this part from Configuration

<drupal:body>
    <drupal:und ref="#[payload]"/>
</drupal:body>

it works. But thats kind of tricky because mule add this part to configuration automatically.

Edit: It only works if I dont use authentication for the REST Server, and if I give anonymous users the rights to add a Node. Is this a Bug in Drupal Connector?

于 2013-08-14T16:44:37.183 に答える