0

首先完整的错误日志:

******************************************************************************** Message               : wrong number of arguments. 
Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostRequest 
Type                  : org.mule.api.transport.DispatchException 
Code                  : MULE_ERROR--2 
Payload               : pl.test.integration.axpppk.ws.client.PostRequest@2132040d 
JavaDoc      : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html
******************************************************************************** 

Exception stack is:
1. wrong number of arguments (java.lang.IllegalArgumentException)   sun.reflect.NativeMethodAccessorImpl:-2 (null)
2. wrong number of arguments. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostRequest (org.mule.api.transport.DispatchException)   org.mule.module.cxf.CxfOutboundMessageProcessor:146 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
******************************************************************************** 

Root Exception stack trace: java.lang.IllegalArgumentException: wrong number of arguments   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
 java.lang.reflect.Method.invoke(Method.java:606)   
at org.mule.module.cxf.CxfOutboundMessageProcessor.doSendWithProxy(CxfOutboundMessageProcessor.java:185)    
at org.mule.module.cxf.CxfOutboundMessageProcessor.process(CxfOutboundMessageProcessor.java:127)    
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)    
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)  
at org.mule.processor.AbstractResponseMessageProcessor.process(AbstractResponseMessageProcessor.java:17)   
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   at
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)  
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:97)     
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.construct.DynamicPipelineMessageProcessor.process(DynamicPipelineMessageProcessor.java:54)     
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:51)   
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:40)     
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.construct.AbstractPipeline$1.process(AbstractPipeline.java:109)    
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)     
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)   
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)     
at org.mule.construct.AbstractPipeline$3.process(AbstractPipeline.java:207)    
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24...
********************************************************************************

这是 WSDL 文件:wsdl 文件 和我的流程(非常基本):

<flow doc:name="PostRequest" name="PostRequest">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="getPostRequest" doc:name="HTTP" contentType="text/plain" >
    <http:body-to-parameter-map-transformer />
    </http:inbound-endpoint>

    <expression-component doc:name="Args2SOAP">
    <![CDATA[
        import java.util.HashMap;
        import java.text.SimpleDateFormat;
        import java.util.Date;
        import java.util.GregorianCalendar;
        import javax.xml.datatype.XMLGregorianCalendar;
        import javax.xml.datatype.DatatypeFactory;
        import pl.test.integration.axpppk.ws.client.Argument;
        import pl.test.integration.axpppk.ws.client.ArrayOfArgument;
        import pl.test.integration.axpppk.ws.client.PostRequest;

        PostRequest pr = new PostRequest();
        pr.setRequestCode("TEST");


        ArrayOfArgument aa = new ArrayOfArgument();

        Argument ar1 = new Argument();
        ar1.setName("XMLDocumentTime");
        ar1.setValue("00043280");

        Argument ar2 = new Argument();
        ar2.setName("CustAccount");
        ar2.setValue("00043280");

        aa.getArgument().add(ar1);
        aa.getArgument().add(ar2);

        pr.setArguments(aa);
            /*
            payload = [
                    pr
            ];
            */
            payload = pr;


          ]]>
        </expression-component> 

    <logger message="Current payload is #[payload]" level="INFO" doc:name="Logger"/>

    <response>
        <object-to-string-transformer doc:name="Object to String"/>
    </response>

    <cxf:jaxws-client doc:name="SOAP"
            clientClass="pl.test.integration.axpppk.ws.client.XISGateway"
            port="XISGatewaySoap"
            operation="PostRequest" 
            />

     <logger level="INFO" message="Came here....... #[message.payload]" doc:name="Logger"/>
     <http:outbound-endpoint address="http://localhost:8889/Service/XISGateway.asmx" doc:name="HTTP" exchange-pattern="request-response" method="POST"/>
</flow>

我不知道我在做什么错流程看起来不错有人可以帮忙吗?

4

1 回答 1

0

配置wsdlLocationon cxf:jaxws-client,因为它是必需的属性。

请参阅文档: http: //www.mulesoft.org/documentation/display/current/Consuming+Web+Services+with+CXF#ConsumingWebServiceswithCXF-WSDLFirstJAX-WSClient

于 2014-08-26T16:14:21.553 回答