Skip to Content
author's profile photo Former Member
Former Member

Call Client Java Proxy from Server Java Proxy

Hi Gurus!!

I'm trying to call a Client Java Proxy from a Server Java Proxy.

Is possible to do this? I think must be possible.

I have called this Client Java Proxy from another application, and run ok.

I have tried to call it following the Guide to call Java Client Proxies:

es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortTypeHome queryOutHome = null;

es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortTypeRemote queryOutRemote = null;

try {

// Get naming context

Properties p = new Properties();

p.put(

Context.INITIAL_CONTEXT_FACTORY,

"com.sap.engine.services.jndi.InitialContextFactoryImpl");

p.put(Context.PROVIDER_URL, "myurl:50104");

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

p.put(Context.SECURITY_CREDENTIALS, mypasswrod);

Context ctx = new InitialContext(p);

Object ref = ctx.lookup("RobotOut");

// Look up jndi name of proxy bean

try {

queryOutHome =

(MIRobotOut_PortTypeHome) PortableRemoteObject.narrow(

ref,

MIRobotOut_PortTypeHome.class);

} catch (Exception e) {

throw new RuntimeException(e + "1");

}

// Get Remote interface

queryOutRemote = queryOutHome.create();

} catch (Exception e) {

throw new RuntimeException(e + "2");

}

but I get this error

"com.sap.aii.af.ra.ms.api.DeliveryException: Error invoking method mIRobotIn of proxy bean $Proxy351: es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortTypeHome: com.sap.aii.proxy.xiruntime.core.XmlInboundException: Error invoking method mIRobotIn of proxy bean $Proxy351: es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortTypeHome"

es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortTypeHome is the corresponding PortTypeHome to the Client Java Proxy.

I have tried to call too calling directly from the server Java Proxy to the method correcponding to the Client Java Proxy. The error I get is:

"com.sap.aii.af.ra.ms.api.DeliveryException: Error invoking method mIRobotIn of proxy bean $Proxy351: es/navantia/xi/mm/dispositivosRobotizadosKasto/DTRobot_Type: com.sap.aii.proxy.xiruntime.core.XmlInboundException: Error invoking method mIRobotIn of proxy bean $Proxy351: es/navantia/xi/mm/dispositivosRobotizadosKasto/DTRobot_Type"

Tha call to the client is:

es.navantia.xi.mm.dispositivosRobotizadosKasto.MIRobotOut_PortType clase = null;

es.navantia.xi.mm.dispositivosRobotizadosKasto.DTRobot_Type client_req = null;

es.navantia.xi.mm.dispositivosRobotizadosKasto.DTRobotResponse_Type client_res = null;

client_res = clase.mIRobotOut(client_req);

Please, any help will be useful.

Thanks and regards,

Manuel Míguez.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 10, 2008 at 08:43 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2008 at 10:36 PM

    hi,

    >I'm trying to call a Client Java Proxy from a Server Java Proxy.

    >Is possible to do this? I think must be possible.

    I'll just answer the first part 😊

    yes of course it's possible - this is a typical scenario actually

    when we need to do something "sync" but we want to use asyn interface

    with java proxies

    Regards,

    Michal Krawczyk

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.