Hi Thishani , Can you please help me with this as i seems to be going nowhere .
Regards, Amit Gupta On Thu, Aug 23, 2018 at 5:05 PM Amit Gupta <[email protected]> wrote: > Hi , > > I do agree that OUT_ONLY should not be used however if i do not use the > property OUT_ONLY then the request is not reaching to the server.I know > that's strange but the request is not landing if we are not using OUT_ONLY. > Should i modify the java code for server side program ? > > Regards, > > Amit Gupta > > On Thu, Aug 23, 2018 at 5:02 PM Thishani Lucas <[email protected]> wrote: > >> Hi Amit, >> >> We should not have the OUT_ONLY property if we're expecting a response >> from the backend. >> >> You can debug through TCPTransportSender [1] code and modify your server >> accordingly. >> >> [1] >> https://github.com/wso2/wso2-axis2-transports/blob/master/modules/tcp/src/org/apache/axis2/transport/tcp/TCPTransportSender.java >> >> Thanks, >> Thishani >> >> On Thu, Aug 23, 2018 at 7:49 PM, Amit Gupta <[email protected]> >> wrote: >> >>> HI , >>> >>> I enabled wire logs and below are the logs. >>> >>> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "GET /scale/scale HTTP/1.1[\r][\n]" >>> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "Accept-Encoding: gzip,deflate[\r][\n]" >>> [2018-08-23 16:16:14,605] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "Host: 192.168.80.87:8280[\r][\n]" >>> [2018-08-23 16:16:14,607] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "Connection: Keep-Alive[\r][\n]" >>> [2018-08-23 16:16:14,608] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]" >>> [2018-08-23 16:16:14,609] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>> >> "[\r][\n]" >>> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >> GET >>> /scale/scale HTTP/1.1 >>> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >> >>> Accept-Encoding: gzip,deflate >>> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> Host: >>> 192.168.80.87:8280 >>> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> >>> Connection: Keep-Alive >>> [2018-08-23 16:16:14,612] [] DEBUG - headers http-incoming-4 >> >>> User-Agent: Apache-HttpClient/4.1.1 (java 1.5) >>> >>> I don't exactly know what is the problem, as i do see that the message >>> is landing on the TCP server and the TCP server is replying however the >>> same i am unable ti get in wso2 esb, is there any property which i need to >>> set so that it works in a synchronous manner. >>> >>> >>> >>> Regards, >>> >>> Amit Gupta >>> >>> On Thu, Aug 23, 2018 at 2:29 PM Amit Gupta <[email protected]> >>> wrote: >>> >>>> Hi , >>>> >>>> I am working on TCP socket communcation with wso2 ESB. >>>> >>>> I was able to send message to TCP server however once the TCP server is >>>> replying back i cannot see the message in wso3 esb, could you please help >>>> me with this. >>>> >>>> API : >>>> >>>> <api xmlns="http://ws.apache.org/ns/synapse" name="ScalesAPI" >>>> context="/scale"> >>>> <resource methods="GET" url-mapping="/scale"> >>>> <inSequence> >>>> <property name="REST_URL_POSTFIX" scope="axis2" >>>> action="remove"/> >>>> <property name="OUT_ONLY" value="true"/> >>>> <payloadFactory media-type="text"> >>>> <format>&lt;RN&gt;</format> >>>> <args/> >>>> </payloadFactory> >>>> <call> >>>> <endpoint> >>>> <address uri="tcp://192.168.80.87:8915"/> >>>> </endpoint> >>>> </call> >>>> <log level="custom"> >>>> <property name="After Call" expression="."/> >>>> </log> >>>> </inSequence> >>>> <outSequence> >>>> <log level="custom"> >>>> <property name="Into Out Sequence" expression="."/> >>>> </log> >>>> </outSequence> >>>> </resource> >>>> </api> >>>> >>>> >>>> >>>> JAVA Code : >>>> public class TCPServer { >>>> >>>> public static void main(String[] args) throws Exception { >>>> String clientSentence; >>>> String name = "Amit"; >>>> String capitalizedSentence = "< 00 23 >"; >>>> ServerSocket welcomeSocket = new ServerSocket(8915); >>>> >>>> while (true) { >>>> Socket connectionSocket = welcomeSocket.accept(); >>>> BufferedReader inFromClient = >>>> new BufferedReader(new >>>> InputStreamReader(connectionSocket.getInputStream())); >>>> DataOutputStream outToClient = new >>>> DataOutputStream(connectionSocket.getOutputStream()); >>>> clientSentence = inFromClient.readLine(); >>>> System.out.println("Received: " + clientSentence); >>>> // capitalizedSentence = clientSentence.toUpperCase() + 'n'; >>>> System.out.println("Received1: " + clientSentence); >>>> //outToClient.writeBytes(capitalizedSentence); >>>> >>>> PrintStream p = new PrintStream(connectionSocket.getOutputStream()); >>>> >>>> p.println(capitalizedSentence); >>>> >>>> outToClient.close(); >>>> System.out.println("Received2: " + clientSentence); >>>> inFromClient.close(); >>>> connectionSocket.close(); >>>> } >>>> >>>> } >>>> >>>> } >>>> >>>> >>>> >>>> Logs : >>>> >>>> [2018-08-23 14:28:54,732] [] INFO - LogMediator After Call = <?xml >>>> version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" >>>> http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><axis2ns43:text >>>> xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload >>>> ">&lt;RN&gt;</axis2ns43:text></soapenv:Body></soapenv:Envelope> >>>> >>>> >>>> >>>> >>>> Regards, >>>> >>>> Amit Gupta >>>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Thishani Lucas* >> *Software Engineer* >> *WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>* >> *lean.enterprise.middle-ware* >> >> *Tel: +94 77 2556931 * >> >> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/ >> <https://www.linkedin.com/in/thishani-lucas/>* >> >> >> <http://wso2.com/signature> >> >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
