2013-12-09 1 views
0

나는이 인터페이스를 구현하는 자바 컴포넌트 1과 인터페이스를 구현하는 soap 컴포넌트와 http 엔드 포인트로 시작하는 메인 플로우를 가지고있다. 이제 flow ref를 추가하고 동일한 인터페이스를 구현하는 Java 컴포넌트 2를 추가하려고합니다. "엔트리 포인트를 찾을 수 없습니다"라는 문제가 발생했습니다.이 튜토리얼을 지금 따르고 있습니다. blogs.mulesoft.org/mule-school-invoking-component-method-using-entry-point-resolvers/자바 컴포넌트 뮬에 대한 플로우 레퍼런스를 연결한다.

다음은 다음과 같습니다. 내 흐름.

<flow name="CreateAccountFlow1" doc:name="CreateAccountFlow1"> 
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" 
      doc:name="HTTP" path="bank"/> 
    <cxf:jaxws-service doc:name="SOAP" serviceClass="com.essai2.AccountService"/> 
    <component class="com.essai2.AccountRequest" doc:name="Java"/> 
    <logger level="INFO" doc:name="Logger"/> 
    <flow-ref name="Projet2Flow1" doc:name="Flow Reference"/> 
    <component class="com.essai2.AccountResponse" doc:name="Java"/> 
    <logger level="INFO" doc:name="Logger"/> 
</flow> 

아무도 도와 줄 수 있습니까?

+1

더 많은 도움을 받으려면 노새 설정과 Java 구성 요소를 추가하십시오. – user1760178

+0
+0

이것은 XML 구성 흐름입니다 – user3079285

답변

0
In mule there are many ways to invoke a Java component. 

1. Entry point resolver 
2. Implemnt mule Life Cycle API i.e callable 
3. Invoke component. 

when ever Mule finds Java component as message processors in a flow, tries to execute above three methods . 

In the java component if you have created any methods with param same as mule message payload , Entry Point resolver is used. 

eg : class XYZ{ 
     method1(String s1){ 

     } 
     method2(List<String> S2){ 
     } 
} 

If Mule Message Payload has type String then method1 is invoked, if message payload has List of String , method2 is invoked during run time. 

2. If you can invoke the Java component in the flow irrespective of type of the payload, should implement Callable interface which overrides onCall() method. 

for eg : class XYS implements Callable{ 
    @override 
    onCall(MuleEventConext muleEventConext){ 

} 

using MuleEvent Conext you can extract the payload and process it. 

3. Using Invoke component, you can create the object of the Class and invoke explicitly the method with appropriate Parameters passed.