我已经尝试创建Megento连接器视频链接中给出的Megento连接器示例程序。 http://www.youtube.com/watch?v=GCbuqHLCiOgMagento Connector Mule 3.5
我的流程为:
<magento:config name="MagentoConnector" username="${magento.username}" password="${magento.password}" address="${magento.address}" doc:name="Magento">
<magento:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</magento:config>
<flow name="ShoppingCartOPerations" doc:name="ShoppingCartOPerations">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="shoppingCartOperation" doc:name="HTTP"/>
<flow-ref name="CreateProduct" doc:name="Flow Reference"/>
<set-payload value="Product Id is #[groovy:message.getProperty('productId')]" doc:name="Set Payload"/>
</flow>
<sub-flow name="CreateProduct" doc:name="CreateProduct">
<magento:create-product config-ref="MagentoConnector" type="simple" set="1" sku="simple_sku" storeViewIdOrCode="4" doc:name="Create Product" address="https://sashistore.gostorego.com/api/v2_soap" password="gdskey" username="gdssrao">
<magento:attributes name="SampleProduct" description="TestProduct" short_description="creating sample product" weight="100" status="1" visibility="4" price="100" tax_class_id="1"/>
</magento:create-product>
<set-property propertyName="productId" value="#[payload]" doc:name="Store Product id"/>
<magento:update-inventory-stock-item config-ref="MagentoConnector" productId="#[groovy:message.getProperty('productId')]" doc:name="Update Stock">
<magento:catalog-inventory-stock-item qty="33" is_in_stock="100" min_qty="10"/>
</magento:update-inventory-stock-item>
</sub-flow>
ERROR 2014年1月29日23:48:48521 [[magentotest] .connector.http.mule.default.receiver.02 ] org.mule.retry.notifiers.ConnectNotifier:无法连接/重新连接:工作描述符。根异常是:null。类型:class org.mule.api.ConnectionException 错误2014-01-29 23:48:48,524 [[magentotest] .connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy:
酷!它使用这个URL。您能否请我提供如何找到正确的URL。旧的URL也在Magento连接创建中工作,但在调用操作时失败? – GDSSRAO
没有魔力,我只是检查了你的服务的WSDL,如Magento文档(https://www.magentocommerce.com/api/soap/introduction.html)中所述。 WSDL定义了一个“端口”(通常使用一个URL)在哪里发送SOAP调用。 –