Consume a web service method with multiple args in Mule esb

前端 未结 2 895
抹茶落季
抹茶落季 2021-01-26 07:52

Hello what I want to apply seems very simple but I don\'t know how, need some clarifications. here is the scenario: I want to call a web service method, this method name is find

相关标签:
2条回答
  • 2021-01-26 08:21

    First, I would not create a custom-transformer for simply instantiating a class, I would just use an expression:

    <expression-transformer
        expression="#[new douane.DouanePK(message.inboundProperties.id,message.inboundProperties.type)]" />
    

    Second, the exception you're getting comes from the inability of mulexml:object-to-xml-transformer to transform a SoapMessage object to XML using XStream (which is kind of expected). It is the responsibility of cxf:jaxws-client to do this unmarshalling in the response phase of the flow.

    So you need to the mulexml:object-to-xml-transformer and the file:outbound-endpoint elements in a response element above the cxf:jaxws-client so they are processed after CXF has unmarshalled the response to the right object.

    0 讨论(0)
  • 2021-01-26 08:21

    xml to object error comes because of SOAP component, in your case, you may avoid it,, and just use and expression tranformer

    0 讨论(0)
提交回复
热议问题