on 07-13-2017 6:53 AM
Hello Experts,
I am working on SAP PO 7.5 and trying to use SOAP lookup functionality in message mapping. I followed the following blog to create a UDF for this:
https://blogs.sap.com/2013/08/07/how-to-soap-lookup/
https://blogs.sap.com/2006/11/20/webservice-calls-from-a-user-defined-function/
I created a BRM Decision table with single input and output, created a wsdl for same, tested the web service created in Single Service Administration in NWA and it works fine.
For SOAP Lookup I created a SOAP Receiver channel referring to the created web service url, but when I test/execute the mapping, I do not get any output from the UDF.
The SOAP Channel shows the error attached.
I have tried testing it from SOAP UI and it works perfectly fine there. I have also tried setting up the trace but dont see anything in the popup.
Also, I have created a dummy ICO using the SOAP Receiver channel but that too does not helps.
Any suggestion on what could be done to resolve this? please help!
Hi Faisal!
First, try to send the request message prepared for SOAP lookup using SOAP UI to be sure that your request structure is correct.
If it works as axpected, try to set operation name before performing lookup.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Evgeniy,
I have tried sending the request message from SOAP UI and I am getting the output value in the SOAP response.
Also, I have set the operation name in the UDF code as follows:
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload SOAPOutPayload = null;
accessor.setOperationName("DummySOAPLookupReceiver"); accessor.setOperationNamespace("http://namespace.com");
Please advise.
Enable HTTP Trace in your lookup channel and see what eaxctly is happeneing.
Hi Faisal!
Did you send exactly the same message (I mean copy-paste it) that is composed in your code before lookup?
Regards, Evgeniy.
Hello All,
I tried the following:
1. Manually created an xml as given below, executed the mapping, but no output.
2. Took complete SOAP envelope from SOAP UI(after testing the webservice successfully with endpoint as configured in channel), put that in UDF:
in both the cases, I did not get any output. But got the following logs in NWA with HTTP Trace enabled in channel:
NWA Log:
CLIENT: 58877 RESPONSE: - 1575 bytes:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>com.sap.SOA.wsr.030106 - No operation found using soap keys [http://schemas.xmlsoap.org/soap/envelope/], [Envelope], []. InterfaceMapping Object class: com.sap.engine.services.webservices.espbase.mappings.InterfaceMapping mappings: {SoapVersion=SOAP11, PortTypeQName={http://www.sap.com}prftcntrPortType, BindingType=Soap, BindingQName={http://www.sap.com}prftcntrPortTypeBinding, Interface_SDO=true, InterfaceMappingID=-4be7dff9:15d1be8c509:-7fcf, SEIName=PrftcntrPortType}.</faultstring><detail><yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException xmlns:yq1='http://sap-j2ee-engine/client-runtime-error'>com.sap.SOA.wsr.030106 - No operation found using soap keys [http://schemas.xmlsoap.org/soap/envelope/], [Envelope], []. InterfaceMapping Object class: com.sap.engine.services.webservices.espbase.mappings.InterfaceMapping mappings: {SoapVersion=SOAP11, PortTypeQName={http://www.sap.com}prftcntrPortType, BindingType=Soap, BindingQName={http://www.sap.com}prftcntrPortTypeBinding, Interface_SDO=true, InterfaceMappingID=-4be7dff9:15d1be8c509:-7fcf, SEIName=PrftcntrPortType}.</yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
I have tried removing the operation name from UDF but still it did not work. please help.
Hi Faisal!
First, from SOAP UI you take just message part, without SOAP Envelope tags since the message wrapped with SOAP Envelope by default.
Second, In your examples I see different messages types. So please take exactly the message part from exactly the same request and put it in your UDF.
Regards, Evgeniy.
Hello Evgeniy,
This has finally worked. 🙂
The below segment was missing from my Request xml(as compared to request in SOAP UI):
<sap:Request-demo.sap.com-prftcntr-prftcntr-prftcntr>
I changed my xml accordingly and now I can see the output now.
Thank you very much everyone for all your help and guidance!
Regards,
Faisal Jamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ur checking add soap enevelope option in soap chjannel?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you check the endpoint maintained in the soap receiver channel.
Even you can check the BRM using SOAP UI and see if its fetching correct values.
One more suggestion instead of Soap look, you can follow the below approach which will take less time for calling the BRM.
https://blogs.sap.com/2017/05/10/access-brm-decision-table-from-pi-message-mapping/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.