cancel
Showing results for 
Search instead for 
Did you mean: 

MESSAGE FROM JAVA PROXY NOT RECEIVED IN XI

Former Member
0 Kudos

Hi,

I am sending message from Java Proxy using one jsp(which sends data to application class).

But when I click on send button all the values in input box gets cleared but the message is not posted to XI as I can not see any message in moni.

What should be the problem?

I am using following code:

p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");

p.put(Context.PROVIDER_URL, "xiserver:50004");

p.put(Context.SECURITY_PRINCIPAL, "xiuser");

p.put(Context.SECURITY_CREDENTIALS, "pwd");

I just want to know whether server and user here should be from XI or what and whether this user should have administrator rights?

Thanks.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Stefan,

I checked in adapter monitoring ,message is not there.

I guess there is not connection establishment in j2ee and XI ,hoe to resolve it?

Am I doing anything wrong in my coding?

Can you give me stepwise procedure for calling ejb from jsp and then that ejb will hit XI?

Thanks.

stefan_grube
Active Contributor
0 Kudos

Check these articles:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-connectivity_adapters_integration/java%20proxies%20and%20sap%20xi%20-%20the%20inside%20story,%20Part%201.pdf">Java Proxies and SAP XI - The Inside Story, Part 1</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-connectivity_adapters_integration/java%20proxies%20and%20sap%20xi%20-%20the%20inside%20story,%20Part%20II.pdf">Java Proxies and SAP XI - The Inside Story, Part 2</a>

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

I have done same coding in my application class and in my web.xml also.

But still not getting message.

stefan_grube
Active Contributor
0 Kudos

When no message appears in SXMB_MONI, then first check the message monitor of the adapter framework (in runtime work bench) if there are messages available.

Is there any exception in the Java code itself? Check the stack trace.

Regards

Stefan

stefan_grube
Active Contributor
0 Kudos

When you call the Java Proxy Bean from a JSP which runs on the same J2EE server, the call has to be like this:

Context ctx = new InitialContext();
FlightBookHome queryOutHome = (FlightBookHome) ctx.lookup("java:comp/env/ejb/FlightBookBean");
FlightBook queryOutRemote = queryOutHome.create();

The variable ejb/FlightBookBean has to be maintained in the descriptor web.xml

You should do any error handling and write the exceptions to the output of your JSP.

Regards

Stefan

Former Member
0 Kudos

Hi,

Open the Web Application Server console to check for any exceptions. In jsp page you cannot see any errors.

Check if your able to make InitialContext and lookup the bean.

Regards,

Uma

Former Member
0 Kudos

Hi,

The username used should have the J2EE admin rights and XIAPPLUSER rights.

Just check whether u can login to J2EE Visual admin using that username and Password.

Regards,

P.Venkat

Shabarish_Nair
Active Contributor
0 Kudos

check if the user provided by you has the rights and roles as defined in this link - http://help.sap.com/saphelp_nw04s/helpdata/en/d4/d12940cbf2195de10000000a1550b0/content.htm