cancel
Showing results for 
Search instead for 
Did you mean: 

how to send exception to soap(third party) through PI .

former_member228109
Participant
0 Kudos

Hello Experts ,

I am having soap to rfc synchronous scenario . I have kept 2 fields mandatory in the rfc as well as in the data type .But when i am testing the scenario from Altova or Soap UI , even if i am sending blank data from those 2 fields we are getting  response .Neither altova nor pi nor rfc giving any error or exception . Why is it so ? Then what is the use of keeping data type as well as rfc fields mandatory ?

If i have kept them mandatory then it should not allow blank data to go ahead .

Please help .

Regards ,

Nikhil Save

Accepted Solutions (0)

Answers (2)

Answers (2)

nitindeshpande
Active Contributor
0 Kudos

Hello Nikhil,

Can you also paste the screenshot of Mapping?

Regards,

Nitin

former_member228109
Participant
0 Kudos

Hi Nitin ,

Regards ,

Nikhil Save

maheswarareddykonda
Active Contributor
0 Kudos

Hi Nikhil,

vishnu already had explained very well , he is correct..

i will explain as per ur screenshot, how we will get exception when target field is mandatory.

if source field(pre_mast_rec_num) itself is not coming in data then the target field(I_ALTKN) will get fail because that filed occurrence is 1..1

and let me tell u wat us null and wat is empty

1.if source field itself not presents in data then its displays "null"

2.if source field is coming with out any data then its shows "[]" mean that is empty

i hope u are testing as like second case that is the reason u are not getting any exception.

BR,

Maheswarareddy

former_member228109
Participant
0 Kudos

Hi Maheswarareddy ,


Thanks for explaining . Now i understood how mandatory field works .


In that case i have used below link to raise custom exception from PI when there will be blank value . I am getting the exception but it is not giving me custom exception message which i have wriiten in the UDF same as below link. It is giving me some standard as below.


<context>XIAdapter</context>
  <code>ADAPTER.JAVA_EXCEPTION</code>
<text><![CDATA[
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Application:EXCEPTION_DURING_EXECUTE:


Kindly help


http://scn.sap.com/thread/3204486

Regards ,

nikhil Save

maheswarareddykonda
Active Contributor
0 Kudos

Nikhil,

wat type of exception you are expecting in mapping level?

do u mean if mandatory not gets value then it should show particular filed in error?

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Nikhil,

I guess the custom exception which you have written in the udf will be there in the trace level.

Can you check the same in the trace tab.

Regards

nitindeshpande
Active Contributor
0 Kudos

Hello Nikhil,

Can you share the detailed error from the Trace in Moni?

May be that will speak about the fields and what is the exact error? Or else please paste the data in Test tab and check if you are facing any error?

Regards,

Nitin

former_member228109
Participant
0 Kudos

Hello All ,

Thanks ,

We want to create exception in PI if mandatory field is sent blank by third party . So we have written below UDF.

And when we are testing in test tab of message mapping , we are getting runtime exception with custom message as expected .

But When we are testing from altova , we are getting below exception which is not having custom message anywhere .

<?xml version="1.0"?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SOAP:Body>

  <SOAP:Fault>

  <faultcode>SOAP:Server</faultcode>

  <faultstring>Server Error</faultstring>

  <detail>

  <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

  <context>XIAdapter</context>

  <code>ADAPTER.JAVA_EXCEPTION</code>

  <text><![CDATA[

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Application:EXCEPTION_DURING_EXECUTE:

  at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:663)

  at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:470)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

  at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:202)

  at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:103)

  at com.sap.engine.services.servlets_jsp.server.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:126)

  at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)

  at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:432)

  at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)

  at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)

  at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)

  at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:276)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)

  at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)

  at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)

  at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)

  at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)

  at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)

  at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)

  at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

  at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

  at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)

  at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)

  at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)

  at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)

  at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)

  at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)

          ]]></text>

  </s:SystemError>

  </detail>

  </SOAP:Fault>

  </SOAP:Body>

</SOAP:Envelope>

Also in moni we cant  see our custom message .

Please advise .

Regards ,

Nikhil Save

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Nikhil,

The custom exception which you wrote in the udf, you can see in the trace level.

Can you refer the below blogs which might help you for your query:

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping



Regards

former_member228109
Participant
0 Kudos

Hi Vishnu ,

Thanks .But what is the use of getting custom message in trace level in moni . Instead it should go to third party , so that they can understand what is the cause . Correct me if i am wrong .

Regards ,

nikhil Save

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Nikhil,

If you referred the blog, and able to see the custom message error in moni, then since this flow is a synchronous scenario, the same error will be sent back to the source.

Can you checked by doing end to end testing.

Since this is a soap sender, you can use SOAP UI tool to trigger the message instead of replying on third party for triggering.

Regards

pvishnuvardan_reddy
Active Contributor
0 Kudos

HI Nikhil,

If the filed is declared as mandatory in the RFC structure, and let's say you have done one to one mapping to the corresponding source field, I assume in your case, the source field is coming with blank value, hence the message is getting failed at runtime.

Below are the representations of the field having blank value.

<Material/>

<Material></Material>



Can you check for the mandatory source field, how exactly it is present in the source data.


Regards

former_member228109
Participant
0 Kudos

Hi Vishnu ,

I am having one to one mapping and it represents the same way as you have shown above. but the strange is i am not getting any failed message at run time. instead it is bringing response even if it is mandatory in rfc as well as data type .

Regards ,

nikhil Save

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Nikhil,

Can you please share the request test file and also share the field screen shots.

Regards

former_member228109
Participant
0 Kudos

Hi Vishnu ,

Please find my request file and rfc fields in screen shot .

Now in screen shot you can see that both the fields are mandatory in rfc . But even if i am sending blank customer number still i am getting response from rfc .

Regards ,

Nikhil Save

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Nikhil,

Blank value does not mean NULL value, hence your mapping is not throwing any error as some value is getting mapped to the customer number which is blank here.

If your RFC is sending some response back, then your RFC is having no issue for this input.

You can check in ECC itself, by executing the RFC and giving this input.

Can you check with the business to validate the response.

Regards

former_member228109
Participant
0 Kudos

Hi Vishnu ,

Thanks .But if blank value is not null value then what is null value ?

Because as per my thinking if sender is not sending any value in the field which is mandatory then rfc and pi both should not allow those field to go ahead .

I have checked in ECC by manually  giving same inputs and it is not allowing me to execute as both fields are mandatory .

Kindly advise .

Regards ,

Nikhil Save