logo
down
shadow

Mule - exception in Outbound endpoint Message payload is of type: byte[]


Mule - exception in Outbound endpoint Message payload is of type: byte[]

By : vcsabbi
Date : November 22 2020, 10:56 AM
wish helps you The problem is the aggregation strategy. Since you did not define any custom strategy, Mule uses the default one (and the default aggregator CollectAllAggregationStrategy does not handle byte[] payloads)
If you do not need any information from the scattered messages, just implement a dummy aggregator strategy to create a mule event:
code :
<scatter-gather doc:name="Scatter-Gather">
            <custom-aggregation-strategy class="org.myproject.DummyAggregationStrategy" /> 
            <processor-chain>
                <logger message="Just before calling https" level="INFO" doc:name="Logger"/>
                <set-property propertyName="Content-Type" value="text/xml" doc:name="Property"/>
                <https:outbound-endpoint exchange-pattern="request-response" host:"localhost" port:"8080" path="test" method="POST" connector-ref="IPS-HTTPS-TwoWaySSL-Connector" tracking:enable-default-events="true"  doc:name="HTTPS" encoding="UTF-8" mimeType="text/xml" contentType="text/xml"/>
            </processor-chain>
            <vm:outbound-endpoint exchange-pattern="one-way"
                 doc:name="Logger In Queue" path="FlowIn"/>
        </scatter-gather>
public class DummyAggregationStrategy implements AggregationStrategy {

    @Override
    public MuleEvent aggregate(AggregationContext context) throws MuleException {
        if(context.collectEventsWithoutExceptions().isEmpty())
            return new DefaultMuleMessage();
        else
            return DefaultMuleEvent.copy(context.collectEventsWithoutExceptions().get(0));
    }
}


Share : facebook icon twitter icon
Using a enricher on a Mule outbound endpoint so that the message properties context is not lost

Using a enricher on a Mule outbound endpoint so that the message properties context is not lost


By : Par
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Yes, you can use an enricher to preserve your original message and put the return value of the web service into a variable. It works like this:
code :
<enricher source="#[payload]" target="#[variable:myVal]">
    <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:28081/MyWebService" responseTimeout="100000" doc:name="HTTP" >
        <cxf:jaxws-client operation="helloWorld" serviceClass="com.xxx.xxx.service.MyWebService" enableMuleSoapHeaders="true" doc:name="SOAP"/>
    </http:outbound-endpoint>
</enricher>
<logger message="#[variable:myVal]" level="INFO"/>
Mule - testing a flow that has an inbound/outbound endpoint with a Mule property as the file path

Mule - testing a flow that has an inbound/outbound endpoint with a Mule property as the file path


By : Xian Wang
Date : March 29 2020, 07:55 AM
I wish did fix the issue. After observing your test classes and code I could see that you want to dynamically create temp folders place files in them. And the flow should read the files from Temp Directory and write output to another Temp directory. Point to be noted is that Mule's Endpoints are created when the configuration is loaded. So the ${inbound} and ${outbound} should be provided to the mule flow by the time they are provided.
So one option can be to create a dummy flow pointing to the temp folders for testing. or Create a test properties file pointing to the temp folders and load that to your flow config, so that your flow endpoints will get the temp folder paths.
Mule: sending an input stream payload (from file) along with file metadata to http outbound endpoint

Mule: sending an input stream payload (from file) along with file metadata to http outbound endpoint


By : Philip Marianovits
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Basically what you want is to have inbound properties available as outbound so that they are send along with the message payload.
You may copy individual property if you just care about some like
code :
 <set-property propertyName="originalFilename"  value="#[message.inboundProperties.originalFilename]"/>
<copy-properties propertyName="http.*" doc:name="Copy All HTTP Headers"/>
How to get payload values from byte[] message in Spring Integration int-http:outbound-gateway?

How to get payload values from byte[] message in Spring Integration int-http:outbound-gateway?


By : Mohammed Hajkhalaf
Date : March 29 2020, 07:55 AM
seems to work fine Exactly what are you expecting payload.get('myParam') and payload.get('path') to do when the payload is a byte[].
Clearly, a byte[] does not have a get(String) method.
How to Solve Message payload is of type: BufferInputStream Exception in Mule

How to Solve Message payload is of type: BufferInputStream Exception in Mule


By : Rakshak Agrawal
Date : March 29 2020, 07:55 AM
I wish this help you It seems you are getting a 400 status code from the HTTP request which is causing an exception before even reaching the transformer. Try adding a success-status-code-validator that covers all of the cases (you can choose which ones to consider later):
Related Posts Related Posts :
  • Forcefully terminating a thread I didn't write in Java
  • Issue with ojdbc jar in Maven
  • String array length java
  • Java basic compilation error
  • Inquiry about writing a Char via ByteBuffer
  • Getting unexpected results when type casting between long and double
  • Variable throws variable might not have been initialized error
  • Start/stop java application from an external script
  • Confusion in declaring String Objects
  • What are some ways to do multi-core programming on Android, not just multi-thread?
  • hibernate - process scoped identity
  • Null Pointer Exception on getGraphics()
  • Can we print a java message on console without using main method, static variable and static method?
  • sending text from editText to ListView (2 activities)
  • Transfer value from JList to another class in Java
  • Creating 2 streams with one socket
  • How measure time stolen from virtual machine, in Scala/Java?
  • How can I programmatically generate keypress events?
  • org.apache.commons.net.ssh documentation
  • Implementation of Dijkstra`s Algorithm - Stuck in an infinite loop
  • Should I throw IllegalArgmentException when 'user of given id not exist'?
  • In Nimbus, how to paint TextField when MouseOver?
  • why won't checkforWin(File f) return true when it is true?
  • Android: Cursor is always returning null even if the database is not empty
  • Repeating for loop in menu
  • Can Java garbage collector randomly delete objects in the On-Heap tier?
  • Apache CXF Exception: SSL connection unexpectedly closed
  • Add properties to ArrayList<Object> in Java
  • Multiple Adapters or One Adapter for different lists and objects - Code Performance
  • Is it good practice in Java for a class's method to redundantly return a modified global field of the class?
  • How to change the color of the background in libgdx labels?
  • direct file path not working
  • ClassFileTransformer + Javassist: no such field
  • How do I change and instance variable for an object which the user selects from a combobox?
  • reading and updating a large xml file in java
  • ActionListener and Thread.sleep
  • What is the maximum of number of arguments for varargs in java?
  • When I compile I get an error as "ask" cannot be resolved or is not a field"
  • What is the best way to check if 4 integer variables are equal to 0?
  • Storing constant webdriver elements in an enum
  • Java: Why main class does not extend Thread class
  • Java - how to find out if a directory is being used by another process?
  • How can I get a method to print?
  • Java unknown exceptions
  • BufferedReader,StreamWriter crash
  • found raw type: JComboBox
  • Java Generics -> Function return type
  • how to refresh contents of jtable on event of action listener?
  • Why does List interface extend Collection interface?
  • Pros and Cons of Clojure http client libraries
  • use final inside a for each loop
  • Convert java data object to service object
  • Unsupported major.minor version 51.0 while executing JSP
  • How do I display a word diagonally in Java?
  • making sure one task completes before another starts in java
  • My program gives an index out of bounds error
  • Removing duplicate characters in a String (user inputted keyword)
  • Jersey 2.0 Content-Length not set
  • AWS.SimpleQueueService.NonExistentQueue Exception thrown when Accessing Existing SQS queue
  • Where can I find the source code for the com.sun.jdi package?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org