Hi,
I'm using camel 2.3 to communicate with a CORBA server. I have generated a
WSDL from the IDLs and then the java stubs from the WSDL and I ran the
generated client without a problem. The client simply attempt to create a
session from and after receiving a session object it uses it to invoke some
operations. Here is the CXF code:
ECITECITSessionCORBAService ecitSessionService = new
ECITECITSessionCORBAService(wsdlURL, ECIT_SERVICE_NAME);
ECITECITSession ecitSession =
ecitSessionService.getECITECITSessionCORBAPort();
java.lang.String _createSession_aInterface = "intf1";
java.lang.String _createSession_aUsername = "user1";
java.lang.String _createSession_aPassword = "password";
try {
javax.xml.ws.wsaddressing.W3CEndpointReference
_createSession__return = null;
_createSession__return = ecitSession.createSession("ECIT",
_createSession_aUsername,
_createSession_aPassword);
ECITECITSession ecitSessionRet =
ecitSessionService.getPort(_createSession__return,ECITECITSession.class);
System.out.println("Result: "+_createSession__return);
javax.xml.ws.wsaddressing.W3CEndpointReference epr =
ecitSessionRet.newTransaction("774", 150L, "524", "015");
ECIECITransactionController transController =
eciTransControllerService.getPort(epr,ECIECITransactionController.class);
and Here is how I tried to port this code to camel:
String cxfSessionFactory = "cxf://corbaname::"+confBean.getEmIP()+":"+
confBean.getEmPort()+ "#ECISessionFactory?"+
"serviceClass="+ cxf.ECITECITSession.class.getName()+
"&dataFormat=POJO"+
"&portName={http://www.its.ws}ECIT.ECITSessionCORBAPort"+
"&serviceName={http://www.its.ws}ECIT.ECITSessionCORBAService"+
"&wsdlURL="+confBean.getEmWSDL();
String cxfNewTransaction = "cxf://corbaname::"+confBean.getEmIP()+":"+
confBean.getEmPort()+ "#ECISessionFactory?"+
"serviceClass="+ cxf.ECITECITSession.class.getName()+
"&dataFormat=POJO"+
"&portName={http://www.its.ws}ECIT.ECITSessionCORBAPort"+
"&serviceName={http://www.its.ws}ECIT.ECITSessionCORBAService"+
"&wsdlURL="+confBean.getEmWSDL();
from("direct:processEmRequests")
.routeId("Em sub route")
.unmarshal(jaxbUrrFinalApi)
.choice()
.when(bean("EmLoginBean","isLoggedIn").isNotEqualTo(constant(true)))
.doTry()
.process(new EmLoginProcessor())
.to(cxfSessionFactory)
.process(new UrrXmlReqToEmProcessor())
.to(cxfNewTransaction )
.to("direct:processEmResp")
.doCatch(ECIEPermissionDenied.class,ECIESystemDown.class)
.process(new ExceptionProcessorHandler())
.end()
.end();
As you notice I'm using the "cxf://corbaname?" to refer to the name of the
CORBA object that I want to get a reference of e.g when creating a session I
use "ECISessionFactory". In both the cxf and Camel I'm able to invoke
createSession operation and get the return value successfully. However, the
problem here is that in camel after I get the session and try to invoke
newTransaction I get the following CORBA exception:
org.omg.CORBA.BAD_OPERATION: vmcid: 0x45520000 minor code: 4 completed:
No
I used WireShark to sniff the GIOP packet try to know the reason and I found
that in Camel's case instead of calling the operation "newTransaction"
directly, a call to "_is_a" then a call to "resolve_str" then finally a call
to "newTransaction" which fails giving the above CORBA exception. I'm not
sure what is the problem here. Can anyone help?
Thanks,
--
View this message in context:
http://camel.465427.n5.nabble.com/CXF-CORBA-binding-problem-tp2638356p2638356.html
Sent from the Camel - Users mailing list archive at Nabble.com.