나는 다음과 같은 흐름이 있습니다뮬 - 선택 요소로 요청을 얻을하는 HTTP를 테스트
<flow name="SOAPWebService" doc:name="SOAPWebService">
<http:inbound-endpoint address="http://localhost:8088/esb/" exchange-pattern="request-response" doc:name="HTTP">
</http:inbound-endpoint>
<choice doc:name="Choice">
<when expression="#[payload.contains('c22')]">
<set-variable variableName="paramCtr" value="#[message.inboundProperties['ctr']]" doc:name="conteneur"/>
<set-variable variableName="paramC" value="#[message.inboundProperties['c']]" doc:name="critere"/>
<component class="com.example.components.SampleComponent" doc:name="Java"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\MuleStudio\SandBox\resources\PrepareRequestXMLPort.xsl" doc:name="XSLT">
<mulexml:context-property key="paramCtr" value="#[flowVars['paramCtr']]"/>
<mulexml:context-property key="paramC" value="#[flowVars['paramC']]"/>
</mulexml:xslt-transformer>
<cxf:proxy-client payload="body" enableMuleSoapHeaders="true" doc:name="SOAP"/>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8080/ClientsDB/port" doc:name="PortWS"/>
</when>
<otherwise>
<set-variable variableName="paramCtr" value="#[message.inboundProperties['ctr']]" doc:name="conteneur"/>
<set-variable variableName="paramC" value="#[message.inboundProperties['c']]" doc:name="critere"/>
<component class="com.example.components.SampleComponent" doc:name="Java"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\MuleStudio\SandBox\resources\PrepareRequestXMLDouane.xsl" doc:name="XSLT">
<mulexml:context-property key="paramCtr" value="#[flowVars['paramCtr']]"/>
<mulexml:context-property key="paramC" value="#[flowVars['paramC']]"/>
</mulexml:xslt-transformer>
<cxf:proxy-client payload="body" enableMuleSoapHeaders="true" doc:name="SOAP"/>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8080/ClientsDB/douane" doc:name="DouaneWS"/>
</otherwise>
</choice>
<byte-array-to-string-transformer doc:name="Byte Array to String" />
<file:outbound-endpoint path="C:\MuleStudio\SandBox\output" outputPattern="#[function:datestamp:dd-MM-yy]_#[function:systime].xml " responseTimeout="10000" doc:name="Outgoing File"/>
내가 http://localhost:8088/esb/?type=xxxx&id=1234
같은 HTTP 요청이는 방식으로 문자열 xxxx
포함 된 경우 경우 테스트 할을 요청을 원하는 웹 서비스 프록시로 라우팅합니다. 나는 표현식 expression="#[string.contains['xxxxx']]"
을 시도했지만 작동하지 않는 것 같습니다.
어떤 아이디어가 있습니까?
감사합니다.
답변 해 주셔서 감사합니다. 귀하의 첫 번째 해결책을 얻지 못했습니다. 두 번째 것은 출력으로 제공됩니다. [email protected] –
예외는이 선택 라우터와 관련이 없습니다. 로거를 시험해보고,이 예외가 던져지는 곳을 정확하게 보았는가? 전체 흐름을 제공 할 수 있습니까? – user1760178
위의 전체 흐름을 게시했습니다. 감사합니다. –