I am a newbie in Mule.
I try to create a simple login flow with SOAP that will return XML Response. My method is send the data with XML and then i save the login data in the transformation code, after save the data, the return data will be generated to xml response. but i have errors with " There are two transformers that are an exact match for input". I dont understand why it happen. Please Help me to solve this problems.
This is my flow code :
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0"
port="8081" doc:name="HTTP Listener Configuration"/>
<cxf:configuration name="CXF_Configuration" enableMuleSoapHeaders="true" initializeStaticBusInstance="true" doc:name="CXF Configuration"/>
<mulexml:jaxb-context name="myJaxb" packageNames="com.test.service" doc:name="JAXB Context"/>
<flow name="LoginFlow" initialState="started">
<http:listener config-ref="HTTP_Listener_Configuration" path="/Login" doc:name="HTTP"/>
<cxf:proxy-service configuration-ref="CXF_Configuration" doc:name="CXF" namespace="http://www.test.co.id/SOA/service/1.0" payload="body" port="LoginPort" service="LoginService" wsdlLocation="service/login-test.wsdl"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<mulexml:dom-to-xml-transformer returnClass="java.lang.String" doc:name="DOM to XML"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<custom-transformer class="com.test.transform.XMLTransform" doc:name="XML To Java" returnClass="com.test.service.LoginResponse"/>
<mulexml:jaxb-object-to-xml-transformer jaxbContext-ref="myJaxb" doc:name="JAXB Object to XML"/>
<mulexml:xml-to-dom-transformer doc:name="XML to DOM"/>
</flow>
Error Stack :
1. There are two transformers that are an exact match for input: "class org.mule.module.cxf.CxfInboundMessageProcessor$1", output: "class [B". Transformers are: "XmlToByteArray(class org.mule.module.xml.transformer.XmlToDomDocument)" and "_ObjectToByteArray(class org.mule.transformer.simple.ObjectToByteArray)" (org.mule.api.registry.ResolverException)
org.mule.registry.TypeBasedTransformerResolver:166 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/registry/ResolverException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.registry.ResolverException: There are two transformers that are an exact match for input: "class org.mule.module.cxf.CxfInboundMessageProcessor$1", output: "class [B". Transformers are: "XmlToByteArray(class org.mule.module.xml.transformer.XmlToDomDocument)" and "_ObjectToByteArray(class org.mule.transformer.simple.ObjectToByteArray)"
at org.mule.registry.TypeBasedTransformerResolver.getNearestTransformerMatch(TypeBasedTransformerResolver.java:166)
at org.mule.registry.TypeBasedTransformerResolver.resolve(TypeBasedTransformerResolver.java:100)
at org.mule.registry.MuleRegistryHelper.resolveTransformer(MuleRegistryHelper.java:283)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
Thanks for the answers. :)
i suspect this is due to DOM-to-XML component at the end. can you remove this and try because you have Jaxb-to-xml component before DOM-to-XML
had the same error message and I fixed it by setting the mime type of the object-to-json transformer before a dataweave that was generating the issue in Munit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With