Soap lookup
Dear experts,
The scenario is file to file with a soap lookup. certain records are inserted using lookup in mapping.
The records which can not be inserted, along with the error code from the webservice response has to be sent to a database table. Please suggest the options .
Thanks ,
Aju
hi,
generelly lookup is used to find the value which was not present in the sender structure ,and u need to find that, based on some field value in sender side from another system/server.
in youe case make sych soap message interface.
generate the soap request which used to fatch the value from other system .
if system not get any value for that it will return the error message.
map the responce message with the requird target field value.
please find the link for jdbc lookup
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
regards,
navneet
Similar Messages
-
Soap lookup in PI7.31 message mapping
Hi All,
I have a soap lookup created in UDF in PI message mapping
I am taking material id from the source structure and use it as input parameter for the lookup webservice
Here is the UDF code which takes material number and returns the internal id
AbstractTrace trace = container.getTrace();
String matintid = "";
try {
//instance the channel to invoke the service.
Channel channel = LookupService.getChannel("BS_Bus","CC_SearchLookup");
SystemAccessor accessor = LookupService.getSystemAccessor(channel);
// The Request message in XML. THIS IS THE LOOKUP SERVICE
String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><searchTM_MATERIAL>xmlns:ns0=\"MDM_MAT_Search_MDM"><query><criteria><fTX_MATERIAL><constraint><value>"
+a
+ "</value><expressionOperator>equals</expressionOperator></constraint></fTX_MATERIAL></criteria></query><reposInfo><repositoryName>REP_MATERIALS</repositoryName><serverName>mdm6765</serverName></reposInfo></searchTM_MATERIAL>";
InputStream inputStream =new ByteArrayInputStream(SOAPxml.getBytes());
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload SOAPOutPayload = null;
//The response will be a Payload. Parse this to get the response field out.
SOAPOutPayload = accessor.call(payload);
/* Parse the SOAPPayload to get the SOAP Response back. */
InputStream inp = SOAPOutPayload.getContent();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
/* Create DOM structure from input XML */
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(inp);
NodeList matlist = document.getElementsByTagName("tM_MATERIAL");
Element material = (Element) matlist.item(0);
NodeList recidlist = material.getElementsByTagName("recordIdentification");
Element recidnode = (Element)recidlist.item(0);
matintid = recidnode.getNodeValue();
trace.addInfo("matnid is" + matintid);
} catch (Exception e) {
trace.addWarning("Error" + e); }
trace.addInfo("Service XXX success executed");
return matintid;
This is giving a java null point error
Errorjava.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Element.getElementsByTagName(java.lang.String) of a null object loaded from a local variable at slot 16
Any idea whats going on? I am able to get response for the webservice using SOAP UI
And here is the soap input and output in SOAP UI execution
Input
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:MDM_MAT_Search_MDM" xmlns:urn1="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:urn2="urn:com.sap.mdm.ws.beans" xmlns:urn3="urn:com.sap.mdm.core.beans">
<soapenv:Header/>
<soapenv:Body>
<urn:searchTM_MATERIAL>
<urn:query>
<!--Optional:-->
<urn1:criteria>
<!--Optional:-->
<urn1:fTX_MATERIAL>
<urn2:constraint>
<!--Optional:-->
<urn2:value>12345</urn2:value>
<!--Optional:-->
<urn2:expressionOperator>equals</urn2:expressionOperator>
</urn2:constraint>
</urn1:fTX_MATERIAL>
</urn1:criteria>
</urn:query>
<urn:reposInfo>
<urn3:repositoryName>REP_MATERIALS</urn3:repositoryName>
<urn3:serverName>mdm1234</urn3:serverName>
</urn:reposInfo>
</urn:searchTM_MATERIAL>
</soapenv:Body>
</soapenv:Envelope>
Output:
<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 xmlns:rpl="urn:MDM_MAT_Search_MDM">
<rpl:searchTM_MATERIALResponse xmlns:rn0="java:sap/standard" xmlns:rn1="urn:com.sap.mdm.ws.beans" xmlns:rn2="http://schemas.xmlsoap.org/soap/encoding/" xmlns:rn3="urn:com.sap.mdm.core.base" xmlns:rn4="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:rn5="urn:com.sap.mdm.core.beans">
<rpl:Response>
<rn1:executionStatus>
<rn1:status>OK</rn1:status>
<rn1:description>Search/Retrieve done successfully</rn1:description>
<rn1:dataObject>Records 1..1 of 1 found</rn1:dataObject>
</rn1:executionStatus>
<rn4:tM_MATERIAL>
<rn4:fTX_MATERIAL>12345</rn4:fTX_MATERIAL>
<rn4:recordIdentification>
<rn4:internalID>1267</rn4:internalID>
</rn4:recordIdentification>
</rn4:tM_MATERIAL>
</rpl:Response>
</rpl:searchTM_MATERIALResponse>
Thx
mikeHi Mike,
What I suspect is, you get a null pointer exception because the XML tag name which you are trying to retrieve, has a namespace. Could you please instead try to use:
getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
Let us know if it works.
Regards,
Shweta -
SOAP Lookup with username and password
I am doing a lookup using a Java UDF from PI message mapping using a SOAP receiver channel by passing a username and password to get a value from a webservice. This is passed to a field in the target side. Everything works fine.
But I want to avoid hardcoding the username and password sent in the XML for the lookup in the UDF. Anyone has any suggestions?
Thank you.Hi Param,
Are you passing the userid and password in url of SOAP Lookup? You can try using value mapping to get the password for a given username..
Else maintain it in SOAP channels and for each user id try selecting a different SOAP channel.. HEre also you can use value mapping for userid = soapchannel relationship.
Regards
Suraj -
Hi,
I am trying to use the SOAP lookup within an UDF. The example in Bhavesh blog worked great and when I plug in my web service lookup I have run into all sorts of issues.
My response message from the webservice looks like this:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<GetMappedToValueByIDOutput xmlns:ns1="http://www.abc.com/mappedvalue/output" xmlns=" http://www.abc.com/mappedvalue/output ">
<ns1:OutputData>
<ns1:MapValue>This is the mapping lookup result </ns1:MapValue>
<ns1:MapID/>
</ns1:OutputData>
</GetMappedToValueByIDOutput>
</env:Body>
</env:Envelope>
But I am getting the following error after I plug in the UDF into the message mapping and testing with the integration mapping.
Parsing Error: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.'. Cause Exception: 'java.io.IOException: Parsing Error: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.'.
Anything that I am missing here?
TeresaHi Teresa,
Check this links
http://commons.apache.org/jelly/apidocs/org/apache/commons/jelly/parser/XMLParser.html (for checking your code)
http://wiki.sdn.sap.com/wiki/display/Snippets/JavaSAXParser
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID0472795050DB10618552826614657928End?blog=/pub/wlg/9618
Regards
Ramesh -
SOAP Lookup in PO 7.30 Single Stack.
Hi,
I am creating a scenario from HTTP to File . In between Message Mapping has SOAP Lookup .
But While I executing the Sceanrio, I am facing some error .
Now While reading lots of Blogs over Internet , Some of them pointed towards Creating a Dummy ICO (mandatory in PI 7.30 ) for SOAP Lookup.
So Now my Question are :
1. Why are we creating this Dummy ICO ?? what is the purpose ??
2. How do we create it ?? - Need to know abt Sender Service Interface , Sender Communication channel , Receiver Service Interface ??? What would be these values while creating a Dummy ICO ???
Regards
PSHi, the dummy ICO is actually not needed for the lookup, but may fix a bug as stated in your previous thread http://scn.sap.com/message/14054811#14054811 as well as it is meant to test and verify that your SOAP receiver actually works.
Did you follow SAP Help Using the Lookup API in a Message Mapping, especially using a mapping parameter of type Adapter and using the parameter as demonstrated in Implementing Lookups Using SystemAccessor?
I see in your previous thread Error while SOAP LookUp in PI 7.3 Single Stack. that you hardcoded the channel name and business component to retrieve the channel
Channel channel = LookupService.getChannel("BC_Successfactors_Two_D","CC_SOAP_Receive_SessionCreate");
Implement as recommended by SAP Help (above links) may be it solves your problem. -
Viewing SOAP Lookup Payloads in PI 7.1
Hi All,
I'm performing a SOAP lookup in my message mapping using a UDF and the SystemAccessor api.
However, in RWB I'm unable to view the payload under the SOAP channel.
I get a 404 resource not found error when i click on the payload link.
Here is what I've tried so far:
1) Set Logging_Sync to 1 in SXMB_ADM for Runtime.
2) Set messaging.syncMessageRemover.removeBody to false in NWA.
What am I missing?
Thanks,
HarshHi Shabarish!
How are things?
Under conversions I see only JDBC and RFC Lookups!
Am I missing something?
/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
Thanks,
Harsh -
Hi,
I'm perforing a SOAP Lookup as explained in the Blog: Webservice Calls From a User Defined Function.
However when i am testing it in Test Tab in message mapping it is showing an error "com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel SOAP_RECV (Party: , Service: AA_BS_RECV, Object ID: 4fb8e1fbeb0e3213a3381de6f63d9542) XI AF API call failed. Module exception: 'com.sap.aii.af.ra.ms.api.RecoverableException: Connection timed out:could be due to invalid address: java.net.SocketException: Connection timed out:could be due to invalid address'. Cause Exception: 'Connection timed out:could be due to invalid address'."
When i test it end to end teh Look up is not returning any Value
Can you please let me know what could be the Error.
Thanks,
BhargavHi Chirag,
I have checked the Target URL and it is correct.
There are no proxy settings so i have not given any authentication details
Thanks,
Bhargav -
Where is the node function:SOAP Lookup
Hi:
I can see the SOAP Lookup exists in SAP BASIS 7.11 when i define parameter in Operation Mapping.
But in Message Mapping,i can just find node functions of JDBC Lookup and RFC Lookup without SOAP Lookup,it can only be
used in UDF?
regards
Yu MingI think you are right, I could not find node function for SOAP lookup in PI 7.1.
I recently need to do SOAP lookup, so need to go for UDF only to create SOAP req message and parsing SOAP response and mapped to target field.
Divyesh Vasani -
Acessing Raw content through SOAP lookup
Hi All,
I have been using Bhavesh's Blog about SOAP Lookup
/people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
I have been able to make successful conenction and See the payload. But we have session ID, thats part of Raw Header response. Can some one help me how to access Raw header data?
Thanks for your support
-Kulwant
Edited by: Kulwant Bhatia on Feb 14, 2011 5:17 PMHi Sabarish,
Thanks for replying.
I tried option of Keep Headers, but no use. Mine is SOAP Receiver Com Channel.
May be i didn't put my question correctly. What i need to access is Set-Cookie Parameter from Response. I am not getting this at all back
HTTP/1.1 200 OK
Date: Tue, 15 Feb 2011 15:49:29 GMT
Server: SecureTransport/4.9.2
Set-Cookie: FDX=75583253754e37667433656373764c683349507135513d3d; path=/; Secure
Accept-Ranges: bytes
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Features: CHPWD;RTCK;STCK;ASC;DNDISP
Content-Length: 31
Content-Type: text/plain; charset=UTF-8
Please suggest.
Another thing. I am doing this to Connect to a MFT server. Which requires first to Get Session-Cookie and then use this session cookie in it next action. Do you have any suggestion for connection PI to MFT servers
Edited by: Kulwant Bhatia on Feb 15, 2011 4:51 PM -
Third Party WebService call: SOAP Lookup vs SOAP Adapter Scenario.
Hello Experts,
What are the pros and cons of using SOAP Look up in Message Mapping for webService call.
Previously my scenario was a standard SOAP Adapter Scenario. But it had BPM, so I have designed it via SOAP look up in Message Map to avoid BPM.
I want to know what are the merits and demerits (In terms of Performance - Payload size:Runtime, Maintanence, Configurability,etc) of using SOAP Look up instead of standard SOAP Scenario.
Regards,
Sudharshan N AHI,
I am assuming that you migth have visted this link
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
SOAP Look-ups are very much possible and performance wise also its preferrable as compare to BPM.
Its pretty much simple and easy way to handle it with UDFs.
The performance could also depend upon what kind of things you need to achive or replacing with BPM.
If you will be dealing with too many resources in BPM then that creates the performance overloaded issues.
UDFs also have the performance problems nased on the payload size but very minimal.
Thanks
swarup -
hi gurus,
i am trying soap lookup and getting the following error.
"Exception during processing the payload.Problem when calling an adapter by using communication channel soap2_chl (Party: , Service: soap2_buss, Object ID: 1ac84b69a3b73e25a0352aab3e1598d4) null" .
but i checked the channel, everything is ok. what may be the problem?
help me.
Thanks in advance.can you share the code which you are using in the UDF and also the exact names of the business service and communicatio channel. From the error msg looks like XI not able to detect your service or channel.
Cheer's -
SOAP lookups from withing message mapping
Hi
We are doing a call to a webservice from within a udf in a message mapping using the SOAP API described in one of the blogs in SDN. We are using a soap receiver communication channel to make this webservice call -
We see activity on the communication channel monitoring - indicating that there is a call going out and a response coming back from the webservice. But there are no details shown on the payload in communication channel monitoring. We do not see this webservice lookup as a message on the adapter engine either ?
Is there any place from within XI runtime environment we can get a hold of the message going out to webservice call and the return from webservice ? We are facing problems in the webservice not doing the required action desired and hence this question on visibility of the call to the webservice.
Thanks in advance for your time.My udf is basically makes a call to the webserservice lookup method ( line - CallCentralMonitoring.LogToCentralMonitoring( "IN130.10", "COMPLETED"); ) - the definition of CallCentralMonitoring class is given below after the udf
UDF
String adapter = "RECEIVE_FusionDBLookUpRequest";
Channel channel = null;
boolean retry = false;
int noOfRetries = 0;
String sqlQuery = new String("");
DataBaseAccessor accessor = null;
DataBaseResult resultSet = null;
String parameterValue = new String("");
MappingTrace trace = container.getTrace();
// Build the Query String
//sqlQuery = "select * from CTL_BusinessRules with (nolock) where parameter_key = '" + parameterKey + "'";
sqlQuery = "exec uspCTL_GetBusinessRule '" + parameterKey + "'";
do
try
//trace.addInfo( "SQL query is: " + sqlQuery);
// Determine a channel, as created in the Configuration
channel = LookupService.getChannel(businessService,adapter);
// Get a system accessor for the channel. As the call is being made to a DB, a DatabaseAccessor is obtained.
accessor = LookupService.getDataBaseAccessor(channel);
//trace.addInfo( "Successfully obtained the system accessor..." );
// Execute Query and get the values in resultset
resultSet = accessor.execute(sqlQuery);
Iterator rows = resultSet.getRows();
//trace.addInfo( "Executed query successfully..." );
while( rows.hasNext() )
Map rowMap = (Map)rows.next();
parameterValue = rowMap.get("CHARACTER_VALUE").toString();
//trace.addInfo( "Parameter Value is: " + parameterValue );
retry = false;
CallCentralMonitoring.LogToCentralMonitoring( "IN130.10", "COMPLETED");
return parameterValue;
catch( Exception ex )
//trace.addInfo( ex.toString() );
if ( noOfRetries < 3 )
retry = true;
noOfRetries++;
else
retry = false;
CallCentralMonitoring.LogToCentralMonitoring( "SD152.01", "Error");
ExceptionThrower.fire( "Database connectivity error: " + ex.toString() );
finally
try
if ( accessor != null ) accessor.close();
catch( Exception e )
ExceptionThrower.fire("Error closing accesor: " + e.getMessage() );
//return e.getMessage();
} while( retry );
return null;
Class CallCentralMonitoring
package com.xxxxx.xi.mapping.udf;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import com.sap.aii.mapping.lookup.Channel;
import com.sap.aii.mapping.lookup.LookupException;
import com.sap.aii.mapping.lookup.LookupService;
import com.sap.aii.mapping.lookup.Payload;
import com.sap.aii.mapping.lookup.SystemAccessor;
import com.sap.aii.mapping.lookup.XmlPayload;
public class CallCentralMonitoring {
public static void LogToCentralMonitoring (String MON_EISLDCTLID, String MON_MsgStatus) {
String soapXML = new String("");
/* Pass the Business System and Communication Channel as input to the getChannel().
/* BS_SOAPLOOKUP Business System*CC_Webservice_SOAP_CURRENCY_CONVERTOR Receiver SOAP Adapter */
Channel channel = null;
try {
channel = LookupService.getChannel( "EI_CentralMonitoringServives", "Receive_SOAP_TrackingServiceWS" );
} catch (LookupException e) {
// TODO Auto-generated catch block
e.printStackTrace();
SystemAccessor accessor = null;
try {
accessor = LookupService.getSystemAccessor(channel);
} catch (LookupException e) {
// TODO Auto-generated catch block
e.printStackTrace();
/* Construct the SOAP Request Message using the InputParameters */
soapXML = "<LogToCentralMonitoring xmlns=\"http://xxxxx.EI.CentralMonitoring\"> <loggingData> <MON_EISLDCTLID>"
+ MON_EISLDCTLID
+ "</MON_EISLDCTLID><MON_ProgramID>"
+ MON_EISLDCTLID
+ "</MON_ProgramID><MON_ProcessID>"
+ MON_EISLDCTLID
+ "</MON_ProcessID><MON_ClientAlert>"
+ "N"
+ "</MON_ClientAlert><MON_MsgStartTimeStamp>"
+ "03/30/2007 10:00:00"
+ "</MON_MsgStartTimeStamp><MON_MsgEndTimeStamp>"
+ "03/30/2007 10:00:01"
+ "</MON_MsgEndTimeStamp><MON_MsgStatus>"
+ MON_MsgStatus
+ "</MON_MsgStatus><MON_MsgStatusDescription>"
+ MON_MsgStatus
+ "</MON_MsgStatusDescription> </loggingData> </LogToCentralMonitoring>";
InputStream inputStream = new ByteArrayInputStream(soapXML.getBytes());
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload soapOutPayload = null;
/The SOAP call is made here and the response obtained is in the soapOutPayload./
try {
soapOutPayload = accessor.call(payload);
} catch (LookupException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}//end LogToCentralMonitoring
}//end class -
Exception when calling SOAP Lookup-API async
Hello,
i'm calling a SOAP-Comunication Channel (Lookup-API) out of my MessageMapping. The WebService Called is <u>asynchron</u> because i just send some data and i don't care about the result. The WebService itselfs is implemented on our XI. In other words: we call us self.
In order to call my WebService asynchronous, i added <i>&QualityOfService=ExactlyOnce</i> at the end of the URL. The SOAP-Action is:
<i>http://sap.com/xi/WebService/soap1.1</i>
The problem is: the WebService works perfekt! But: in my mapping i get
nevertheless the following exception:
Errorcom.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.af.service.api.AFException at com.sap.aii.af.service.api.AdapterAccess.call(AdapterAccess.java:122) at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:87) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)The problem is: i don't know how to check for the HTTP-Header, because
my call
<i>SOAPOutPayload = accessor.call(payload);</i>
throws the mentioned exception, even though it works behind the scene.
Is it possible to check for the HTTP-Response-Code in the catch block?
We want to avoid an synchronous scenario because we don't need the result and the WebService is rather slow. -
hi,
i am tring to use soap inside udf for lookup api. i am looking at class com.sap.aii.mapping.lookup.SystemAccessor.
is this class for soap lookup?
i am not clear on soap lookup since i have not created any message interface for jdbc, rfc lookup. if i am on right way to use this class for soap lookup, do i have to create dt, mt, mi? please guide me!! how to deal with wsdl for lookup and necessary things.
// 1. Get a system accessor for a channel.
SystemAccessor accessor = LookupService.getSystemAccessor(channel);
try{
// 2. Create a payload according to the data type.
// Use service.getBinaryPayload() for binary payload,
// or service.getTextPayload() for text payloads.
Payload payload = LookupService.getXmlPayload(inputStream);
// 3. Set the operation name and namespace; optional step, only necessary if the
// used adapter needs these parameters.
accessor.setOperationName(interfaceName);
accessor.setOperationNamespace(interfaceNS);
// 4. Execute lookup.
Payload result = accessor.call(payload);
// Steps 2. and 4. can be executed several times.
}finally{
// 5. close the accessor in order to free resources.
if (accessor!=null) accessor.close();
thanks
venjaminOk, I found the missing things, because I had to add to the xml tags the input fields
from my soap lookup (like <Street>"+Street+"</Street>)
The UDF Soap lookup is now running, but I have a problem with the special characters
like the German ü, ä …
I set the encoding UTF-8 in the first tag of the payload
String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
But the SOAP Receiver Adapter don´t care about this setting and the ü will be send as an ? to the target system. In my scenario I do a UDF soap lookup inside the graphical mapping to an webservice and the interface after the mapping will also call the same webservice with another operation. I use 2 communication channels. 1 for the UDF Lookup with an URL and an action. The
second CC I use for the normal interface call after the mapping with the same URL and another action.
In my normal graphical mapping I have also fields with special character an these fields arrive correctly in the target system. Only the fields with special character in the UDF are not
correct, but there is no different in these 2 CC.
Any idea?
Kind regards
Christoph -
PI 7.11 mapping lookup - data enrichment - appropriate approach?
Hi guys,
we just upgraded from PI 7.0 to PI 7.11.
Now I´m facing a new scenario where an incoming order have to be processed.
(HTTP to RFC)
Furthermore each item of the order have to be enriched by data looked up in a SAP ERP 6.0 system.
the lookup functionality could be accessed during RFC or ABAP Proxy
With the new PI release we have several possibilities to implement this scenario, which are ...
(1) graphical RFC Lookup in message mapping
(2) ccBPM
(3) using of the lookup API in java mapping
(4) message mapping RFC Lookup in a UDF
Because of performance reason I prefer to make use of the Advanced Adapter Engine, if this is possible.
Further there should only one lookup request for all items of the order instead of each order item.
I tried to implement possiblity (1), but it seems to be hard to fill the request table structure of the RFC function module. All examples in SDN only uses simple (single) input parameters instead of tables. Parsing the result table of the RFC seems to be tricky as well.
Afterwards I tried to implement approach (3) using an SOAP adapter as Proxy with the protocol XI 3.0.
(new functionality in PI 7.11)
But this ends up in a crazy error message so it seems that SOAP adapter could not used as proxy adapter in this case.
ccBPM seems also be an good and transparent approach, because there is no need of complex java code or lookup api.
So the choice is not so easy.
What´s the best approach for this scenario??
Are my notes to the approach correct or do I use/interpret it wrong?
Any help, ideas appreciated
Kind regards
JochenHi,
the error while trying to use the soap channel for proxy communication is ....
com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload. Error when calling an adapter by using the communication channel SOAP_RCV_QMD_100_Proxy (Party: , Service: SAP_QMD_MDT100_BS, Object ID: 579b14b4c36c3ca281f634e20b4dcf78) XI AF API call failed. Module exception: 'com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: Unexpected length of element <sap:Error><sap:Code> = XIProxy; HTTP 200 OK'. Cause Exception: 'java.io.IOException: Unexpected length of element <sap:Error><sap:Code> = XIProxy; HTTP 200 OK'.
so this feature seems not to work for soap lookups, isn´t it.
Kind regards
Jochen
Maybe you are looking for
-
IOS 3.1.1 Software Update for iPod touch 1st generation failed.
The downloading process was stucked in the Thank You screen ("Your update is downloading... ") for more than 2 hours and not going anywhere, nothing was downloaded at the end. Anybody has the same issue before? Reported to the help desk for more tha
-
Hello. I'm in the process of putting some indexes on tables for performance improvement of queries run. eg the foll query - SELECT MPH_ENTITY_ID, MPH_PRICE_DT, MPH_STCK_EXCHNG_ID, BPT_BP_SHRT_NM, MPH_SEC_ID, SEC_SEC_NM, NMS_SEC_NUM, MPH_PRICE_TYP, MP
-
am not able to buy stuff because it asks me for some questions when i put my password but i forgot what i put for the questions it ask me
-
Mis match in Types Conversion.
Hi All, I'm stuck at this following logic implementation. The fields For Action reason and Text, In Query Sheet it was mention to use the following Logic. 1) from table /BI0/SEMPLOYEE, input the employee number and output the SID 2)
-
Screen/Display Issues with Aperture 3.6 & iPhoto 9.6 on Yosemite
When I open Aperture or iPhoto, my screen goes all wonky. I have an early 2011 MacBook Pro with 8 GB Ram with the Intel HD Graphics 3000 512 MB. What is it doing this? How can I fix it?