Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

  • 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 comment
    10|10000 characters needed characters exceeded