Hi Rajjaz,

In your blog [1] it says"connector integration test do is it will sent the
request through the ESB and send request to API directly and compare both
results".

1.What is meant by "sent request to API directly and compare both results"?

What IBM MQ connector does is get the payload from MessageContext and place
it on the MQ message queue.So I have a proxy configuration as follows.

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="ibmmqtest"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
    <target>
        <inSequence>
            <ibmmq.init>
                <username>mqm</username>
                <password>upgs5423</password>
                <port>1414</port>
                <host>127.0.0.1</host>
                <qmanager>qmanager</qmanager>
                <queue>myqueue</queue>
                <reconnectTimeout>10000</reconnectTimeout>
                <messageType>MQMT_DATAGRAM</messageType>
                <islistenerEnabled>true</islistenerEnabled>
                <channel>PASSWORD.SVRCONN</channel>
                <messageID>MessageID@IBMMQ1234</messageID>
                <correlationID>CorrelationID@IBMMQ1234</correlationID>
                <transportType>1</transportType>
                <timeOut>360000</timeOut>
                <replyTimeout>5</replyTimeout>
                <sslEnable>false</sslEnable>
            </ibmmq.init>
            <ibmmq.queue/>
        </inSequence>
    </target>
    <description/>
</proxy>

The operation can be explained as follows.

When i send a request to this proxy with a payload , using the <ibmmq.init>
parameters it creates a connection with the queue manger(in IBM websphere
MQ) "<qmanager>qmanager</qmanager>".

After I invoke the "<ibmmq.queue/>" it places the message in the IBM MQ
queue specified at " <queue>myqueue</queue>"

So according to my knowledge what I need to in the integration test is to,
write a sample json/xml (SampleRequest.json) and test it with
the sampleProxy.xml.

Is this correct? or could you please guide me on writing integration test
for above scenario?

[1].
http://rajjazhm.blogspot.com/2015/11/WSO2-ESB-Connector-Integration-Tes.html

-- 
*D.M.Hasitha Nadishan Jayasundara*
*Department of Electronic and Telecommunication Engineering*
University of Moratuwa
*mobile:* *+94711959266*
*blogspot*: learnjavawithisla.blogspot.com/  *email:*
[email protected]
<https://www.facebook.com/hasitha.nadishan.3>
<https://twitter.com/HNadishan>
<https://lk.linkedin.com/in/hasithajayasundara>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to