Java Mule—Web应用程序和Mule ESB之间的通信
我的web应用程序位于以下地址:Java Mule—Web应用程序和Mule ESB之间的通信,java,mule,Java,Mule,我的web应用程序位于以下地址: http://localhost:8080/MyProject/page-obj.html 我正在从一个Web应用程序(部署在glassfish上)调用Mule Project,页面中有以下URL: `<form action="http://localhost:28146/CallObject" method="post" id="objform">` 在成功案例中设置Mule flow重定向标题,浏览器应遵循重定向: <flow name
http://localhost:8080/MyProject/page-obj.html
我正在从一个Web应用程序(部署在glassfish上)调用Mule Project,页面中有以下URL:
`<form action="http://localhost:28146/CallObject" method="post" id="objform">`
在成功案例中设置Mule flow重定向标题,浏览器应遵循重定向:
<flow name="Create_Work_Flow" doc:name="Create_Work_Flow">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:28146/CallObject" contentType="text/html" doc:name="Request">
<http:body-to-parameter-map-transformer doc:name="HTMLForm-Parameters-To-Mule"/>
</http:inbound-endpoint>
<logger level="INFO" doc:name="Form-Parameters" message="#[payload]" />
<http:outbound-endpoint exchange-pattern="request-response" method="POST" doc:name="HTTP" ref="Page">
<custom-transformer class="com.ExecuteWorkflow" doc:name="Call-CreateWorkflow"/>
</http:outbound-endpoint>
<set-property propertyName="http.status" value="301"/>
<set-property propertyName="Location" value="http://localhost:8080/MyProject/page-
</flow>
抛出的错误是:属性不允许是HTTP的子元素。我已经更正了我的示例。您应该使用set property元素而不是property。它也可以在没有自定义转换器的情况下工作。我想我应该把它去掉,因为我看不出它有什么用处
<flow name="Create_Work_Flow" doc:name="Create_Work_Flow">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:28146/CallObject" contentType="text/html" doc:name="Request">
<http:body-to-parameter-map-transformer doc:name="HTMLForm-Parameters-To-Mule"/>
</http:inbound-endpoint>
<logger level="INFO" doc:name="Form-Parameters" message="#[payload]" />
<http:outbound-endpoint exchange-pattern="request-response" method="POST" doc:name="HTTP" ref="Page">
<custom-transformer class="com.ExecuteWorkflow" doc:name="Call-CreateWorkflow"/>
</http:outbound-endpoint>
<set-property propertyName="http.status" value="301"/>
<set-property propertyName="Location" value="http://localhost:8080/MyProject/page-
</flow>