Using AS Java Destination configuration we are able to make HTTP call successfully. But problem is to get the input stream back.
This problem occurs only when we use SAP service DestinationService. Code works perfectly when we make direct HTTP call without using destination. But second option can not be used as in this approach passing password will be problem.
Using Net weaver Destination service, it does not return the input stream response of HTTP call, though it makes the HTTP call and returns the response code 200 and message. The highlighted line gives Stream closed IO exception.
Code Using Destination |
---|
Context ctx = new InitialContext(); StringBuffer inputLine1 = new StringBuffer(); |
Second Approach without destination Works.
Code without using destination |
---|
URL url = new URL("http://msplsa101.corp.medtronic.com:52000/XMII/Runner?Transaction=Default/Soumen/SendFile&FileName=abc.txt&FilePath=&OutputParameter=OutputXML"); inputLine2.append(input2); } |
Can some one tell me, why HTTP call using destination does not work? Is it making asynchronous call?
Thanks,
Soumen