on 12-13-2013 7:52 AM
Dear Experts,
I have a file to RFC Scenario in PI 7.0. where i have to call a webservice (passing 2 parameters) from mapping and
get the values from webservice.
Now for testing purpose i am using a webservice (add function).
According to a thread i have created a UDF and while executing its working fine but not getting the output.
Please see the Screen shot
UDF
AbstractTrace trace = container.getTrace();
String add = "";
try {
Channel channel = LookupService.getChannel("BS_SOAPLOOKUP","CC_SoapLook_receiver");
SystemAccessor accessor = LookupService.getSystemAccessor(channel);
String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:SendDataToStorage xmlns:ns0=\"http://Test.Service.SchemaIn\"> <NUMBER1>"
+num1
+ "</NUMBER1><NUMBER2>"
+num2
+ "</NUMBER2></ns0:SendDataToStorage>";
InputStream inputStream =new ByteArrayInputStream(SOAPxml.getBytes());
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload SOAPOutPayload = null;
SOAPOutPayload = accessor.call(payload);
InputStream inp = SOAPOutPayload.getContent();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(inp);
NodeList list = document.getElementsByTagName("Response");
Node node = list.item(0);
if (node != null) {
node = node.getFirstChild();
if (node != null) {
add = node.getNodeValue();
}
}
} catch (Exception e) {
trace.addWarning("Error" + e);
}
return add;
I have created a receiver CC and Dummy Receiver Agreement.
In the CC Monitoring showing some processing errors.
Please suggest
Regards,
Anirban
Hi Anirban,
Am facing same issue, am not getting anything in response but when i use same channel in synchronous call am getting response back from soap receiver channel.
Can you please help me here ,how did you resolved your issue?
With Many Thanks.
Monica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Experts,
Soap Receiver CC is working fine.
But getting no O/P in message mapping.
Please help me.
Regards,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anirban,
First of all, did you check if the web service works correctly when called from an external tool like SOAP UI? If yes, then add some logic to your UDF to write processing details to log and then test again. Currently your code only supports a "happy flow". In case one of the checks e.g. if not null, is not true, your code doesn't return any value.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Aniban,
kindly have a look on this below blog for your issue.
Best Regards,
Monikandan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.