cancel
Showing results for 
Search instead for 
Did you mean: 

Error in while calling a Soap Adapter using the UDF

Former Member
0 Kudos

hi,

i am trying to make a call to Soap Adapter using a UDF.

The code of the UDF is as follows :

InputStream isPayloadStream = null;

AbstractTrace trace= container.getTrace();

String sService="Business Component";

String sChannelName="Soap Channel(Sender)";

SystemAccessor accessor=null;

trace.addInfo("entered UDF");

StringBuffer sb = new StringBuffer(" ");

trace.addInfo("creating the reference file");

sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");

sb.append("<ns0:MT_123082_UDF xmlns:ns0=\"http//infosys.com/pi/projects/png/n1\">\n");

sb.append("<INTERCHANGECONTRLNOS>" + var1 + "</INTERCHANGECONTRLNOS>");

sb.append("<PGPARTNERID>"var2"</PGPARTNERID>""\n""</ns0:MT_123082_UDF>");

trace.addInfo("trigerring the SOAP channel ");

try{

Channel channel = LookupService.getChannel(sService,sChannelName);

accessor = LookupService.getSystemAccessor(channel);

isPayloadStream = new ByteArrayInputStream((sb.toString()).getBytes());

trace.addInfo("creating the xml payload ");

XmlPayload payload = LookupService.getXmlPayload(isPayloadStream);

Payload result=accessor.call(payload);

}

catch (Exception e){

trace.addInfo(e.getMessage());

}

finally{

if ( accessor !=null) {

accessor.close();

}

}

return " ";

The above code is throwing an error while end to end testing.

the scenario is such,while graphical mapping a UDF will be used, which will create an Xml payload, and send this payload to another SOAP to file scenario.

The error in the sxmb_moni is: "Error when calling an adapter by using the communication channel CC_123085_UDF_SOAP_OUT (Party: , Service: BC_123082_REMADV_D96A, Object ID: fa9c6ee15efc30c68ec34b08034d87d1) XI AF API call failed. Module exception: 'failed to set up the channel fa9c6ee15efc30c68ec34b08034d87d1'. Cause Exception: 'Channel stopped by administrative task.'."

Please can anyone suggest how this error can be rectified.

regards,

Meenakshi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

i have checked the communication channel and the XML. The following error occurs everytime i try to run the scenario.

Error:

Error when calling an adapter by using the communication channel CC_123082_UDFRECEIVER_SOAP_IN (Party: , Service: BC_123082_REMADV_D96A, Object ID: 2a895589066d30d4b2686e9d3a8d4c8d) XI AF API call failed. Module exception: 'SOAP Error'. Cause Exception: 'SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request'

Please let me know how this error can be resolved.

Regards,

Meenakshi

Former Member
0 Kudos

hi,

the SOAP Communication channel is active.

but still getting the error.

the error is as follows:

Error when calling an adapter by using the communication channel CC_123085_UDF_SOAP_OUT (Party: , Service: BC_123082_REMADV_D96A, Object ID: fa9c6ee15efc30c68ec34b08034d87d1) XI AF API call failed. Module exception: 'com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Cannot invoke call from within a transactional context.'. Cause Exception: 'com.sap.engine.interfaces.messaging.api.exception.MessagingException: Cannot invoke call from within a transactional context.'

regards,

Meenakshi

Former Member
0 Kudos

Hi Meenakshi,

If your communication channel is configured correctly then kindly look into the xml structure which you are passing to soap sender cc. And check whether the channel name and service name mentioned in the code are correct.

Regards,

Nutan

Former Member
0 Kudos

Can you tell us more about the context of this UDF ? What kind of scenario are you implementing (JAVA proxy ? etc) ?

Former Member
0 Kudos

Hi,

According to the err msg, I'd say channel has been stopped ! Could you check this in the Comm. Chann. Monitoring tool ?

Rgds

Chris