cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP LookUp & Dynamic URL not working !

asdasd_asdasd
Active Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Bhavesh

I come accross the lookup topic recently and also tried dynamic configuration usage.

For my understanding it is not working in context of lookup.

Therefore I choose "no soap" mode in SOAP adapter to meet my requirement.

Best regards

Jochen

former_member190293
Active Contributor
0 Kudos

I agree with Bhavesh!

Setting Dynamic configuration value for incoming message flow doesn't affect by any way the message that is sended via SOAP lookup. It's two different messages.

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

former_member190624
Active Contributor
0 Kudos

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.

asdasd_asdasd
Active Participant
0 Kudos

Hari,

Outbound proxy --> graphical mapping(where I use the UDF) --> Inbound proxy,

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Maximiliano,

Please correct me if I'm wrong, but based on your screenshot, both the sender/receiver system are the same. Why not make it Proxy <-> PI <-> WS (SOAP Adapter) for more end-to-end visibility?

Regards,

Mark