on 07-11-2014 6:51 PM
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:
Always uses the "DUMMY" URL, any ideas?.
Regards.
Were you able to achieve this requirement of setting the SOAP URL Dynamically from a SOAP Lookup UDF? I dont seem to be able to do the same and hence was wondering if this is achievable in the first place?
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just one more thought.
You could use any adapter module in your lookup SOAP channel, for example, this one, written by , for setting Dynamic Configuration value from lookup payload (there is a feature to remove nodes with DC values from payload after setting DC parameters in mentioned module). This might work for your requirement.
Regards, Evgeniy.
Hi Maximiliano,
While connecting to dynamic URL using SOAP Lookup, we need to mention the SOAP Action in our logon communication channel as shown below
Also we need to create Receiver Agreement for the channel with some dummy interface details.
pls let me know in case of any issues.
Thanks,
Prasad Venkata K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Could you please explain how you are testing the interface or lookup ? Is UDF is having below code ?
DynamicConfigurationKey myPostPath =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.