Facing issue in mule testing

Facing issue in mule testing

By : user155225
Date : November 22 2020, 10:56 AM
I hope this helps you . Since you call the flow through http protocol, which implicitly transforms the payload type. So the reply in the unit test will not contain a String but a InputStream. This is expected so you should test for a InputStream instead of a String. To get the value as a String you can use the method MuleMessage#getPayload(java.lang.Class) that will transform the payload to a String using the registered transformers.
code :
    public void testGetNegaiveNine() throws Exception {
        MuleClient client = muleContext.getClient();
        MuleMessage reply = client.send ("http://localhost:8081/test", "3", null, 5000);

        assertTrue(reply.getPayload() instanceof InputStream);
        String result = reply.getPayload(String.class);
        assertEquals("-9", result);
"DefaultJavaComponent{muletestFlow1.component.3418143}. Message payload is of type: ContentLengthInputStream"
<flow name="muletestFlow1" doc:name="muletestFlow1">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="test" doc:name="HTTP"/>
        <!-- Ensure that the response is a String -->
        <object-to-string-transformer />
    <!-- Ensure that the incoming request is a String -->
    <object-to-string-transformer />
    <component class="com.org.Square" doc:name="Square"/>
    <component class="com.org.Neg doc:name="Neg"/>

Share : facebook icon twitter icon
Facing issue while inserting lookup type record in salesforce: mule esb

Facing issue while inserting lookup type record in salesforce: mule esb

By : user24293
Date : March 29 2020, 07:55 AM
should help you out I got answer..how to insert lookup data type record in salesforce through mule. Use recordId to store that value...
Facing issue while sending mail in gmail mule esb

Facing issue while sending mail in gmail mule esb

By : vidya
Date : March 29 2020, 07:55 AM
I hope this helps . When i tried to send mail in gmail i got following error. In gmail global connector i add fromAddress,replyToAddress and all.... , can you please check below conditions in the smtp endpoint
Facing issue while convering json data into xml : mule esb

Facing issue while convering json data into xml : mule esb

By : user3198140
Date : March 29 2020, 07:55 AM
wish of those help i can suggest you one thing to make your requirement to work.
if you are want to generate the xml from json.
Facing issue while deploying webapp on tomcat: Mule esb

Facing issue while deploying webapp on tomcat: Mule esb

By : user3279983
Date : March 29 2020, 07:55 AM
Any of those help I tried to deploy my webapp as tomcat service. I follow this link https://github.com/ddossot/mule-in-action/tree/mule-3/chapter07/web-application Following is my web.xml file , The important part of the exception is:
code :
The data mapping graph csv_to_list_transaction_c.grf does not exists
Facing cluster testing issue with ActiveMQ Artemis

Facing cluster testing issue with ActiveMQ Artemis

By : B.Anatoliy
Date : March 29 2020, 07:55 AM
Any of those help The problem is that you're mixing one example (i.e. the JMeter example) with a cluster configuration (i.e. from the clustered-static-discovery example) that really isn't compatible.
The of the cluster is STRICT which means messages will be load-balanced across the cluster regardless of the presence of consumers. Furthermore, the default is -1 meaning the messages sent to the other nodes in the cluster due to the STRICT message-load-balancing type will stay on those nodes and will not be redistributed based on consumer demand.
Related Posts Related Posts :
  • Looking for simplest option to render Razor cshtml pages in a console application without any web server
  • Evaluating variables at a specific time in Modelica
  • When I run the Application, only "web" engine is running in GlassFish. "webservices" is not started
  • How To Set MIME Type Of Google Drive File
  • Remove Missing Values in Weka
  • Reloading a UICollectionView using reloadData method returns immediately before reloading data
  • carrot2 - can I cluster documents from a folder?
  • StreamSocket has no Close Implementation in C#
  • Rails, Foundation 4, Respond.js not working properly in IE8
  • How can i create imagesurface from cairo xlib's Graphics Context using cairo and x11 Api's?
  • CKEditor "overflow: scroll" on parent causes toolbar to freeze at initial position
  • Differences between components and controls in ENYO
  • Photoshop making isometric?
  • Does Intel IPP 8.0 support in-place operations?
  • What is Object dictionary in CANOpen?
  • Example of orbBasic Indexed User Variables
  • convert to ABSOLUTE in logback
  • How to conditionally download file using p:fileDownload
  • Error on pod install
  • Set HTTP GET Parameters in Finagle
  • different attack that uses sql injection
  • How can I change my xampp username not as 'root'
  • AMQP Content header payload structure
  • Apache POI formula evaluation not working for Excel IF
  • How can I trace RESTEasy's dispatch?
  • Map Freezes on iOS 7 with Google Maps SDK 1.4
  • Comparing lists, is the subset list within the first list
  • Non-ascii character highlight in Sublime Text 2
  • Installing Magit in Aquamacs
  • Receiving error - System.Net.Mail.SmtpException: 4.3.2 try again later
  • Coreaudio render callback in monotouch
  • The command 'yarn --v' also initiates 'yarn install' and installs packages automatically. Why is this happening?
  • save multiple matches in a list (grep or awk)
  • Can a number register be used in a groff request?
  • Mapping FAQ with RASA for large dataset (2000+)
  • Fragment not receiving LiveData updates after remove + add
  • FitText.js makes text bigger rather than smaller
  • ARM - Implementing stack with load/store multiple register values
  • How to check if a ChromeCast Session is already in progress
  • ngForm inside a Carousel Slide in UI Bootstrap not working
  • Clearing attributes in Tritium
  • "vagrant up" failing: Vagrant VM failed to remain in the running state
  • ftsearch returning empty docs
  • What are the advantages of setting "hive.exec.parallel" to false in Hive ?
  • Creating a root certificate in FiddlerCore
  • How to access app.config in a blueprint?
  • DB2 RECORDSET table name converted to uppercase
  • Resizing the superview according to the subviews
  • IExpress - Disable Compression
  • Getting InvalidProtocolBufferException while running oozie job
  • What are the differences between Play run and start?
  • How can I share props in ReasonReact?
  • Task.Delay is skipped
  • Parsley.js Password Confirm doesn‘t work
  • How to get all registred 'browser:resource' in Plone
  • Overriding page_list controller inside a package in Concrete5.6.1.2
  • Robolectric 2.x - dependent jars are downloading while running the tests
  • Setting Flyout to Main Frame Navigation(Windows 8.1 app store)
  • Build project - Nuget Error
  • How to recover admin password for SonarQube
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org