Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

SOAP LookUp & Dynamic URL not working !

$
0
0

Hi Experts,

I have a UDF where I make a SOAP LookUp where the URL should be dynamic,but does not work!.

 

My UDF:

 

//put Dynamic URL
String path;
DynamicConfiguration conf = ( DynamicConfiguration ) container.getTransformationParameters().get( StreamTransformationConstants.DYNAMIC_CONFIGURATION );
DynamicConfigurationKey myPostPath = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP","TServerLocation" );
path = URL + ID+ EXTENSION;
conf.put( myPostPath , path );
AbstractTrace trace = container.getTrace();
String result = "";
try {  Channel channel =  LookupService.getChannel(BS,CC);    SystemAccessor accessor = LookupService.getSystemAccessor(channel);  String HTTPxml = "dummy";//obligatory  InputStream inputStream = new ByteArrayInputStream(HTTPxml.getBytes());  XmlPayload payload = LookupService.getXmlPayload(inputStream);    Payload SOAPOutPayload = null;    SOAPOutPayload = accessor.call(payload);     InputStream inp = SOAPOutPayload.getContent();  //Map jpg binary to base64  int len;  byte[] buffer = new byte[1024*5000];  ByteArrayOutputStream baos = new ByteArrayOutputStream();  while ((len = inp.read( buffer)) > 0)  baos.write(buffer, 0, len);  result = Base64.encode(baos.toByteArray());
} catch (Exception e) {    //trace.addWarning("Error" + e);   result = e.getMessage();
}
return result;

CC:

errror1.JPG

error2.JPG

Always uses the "DUMMY" URL, any ideas?.

 

Regards.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>