On Friday 25 June 2010 12:47:01 pm Andrew Lamb wrote:
> Hello,
> 
> I’m running into an issue using CXF with a legacy Corba application and am
> looking for some advice.

Way cool.   I was actually wondering if someone outside of IONA/Progress's 
customers were using the CORBA binding.    :-)


 
> ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
> factory.getInInterceptors().add(new LoggingInInterceptor());
> factory.getOutInterceptors().add(new LoggingOutInterceptor());
> factory.setServiceClass(HelloWorld.class);
> factory.setAddress("corbaname::localhost:1050#HelloWorld");


I think you need to add the factory.setWsdlLocation(....) call in there to 
give it the location of the WSDL that would have the type mapping and such in 
it.      That alone may solve it.    Let me know how it works out.

Dan


> 
> HelloWorld client = (HelloWorld) factory.create();
> String result = client.greetMe("Hello There");
> 
> 
> Running this, I end up with a NullPointerException:
> 
> Exception in thread "main" java.lang.NullPointerException
>         at
> org.apache.cxf.binding.corba.TypeMapCache.get(TypeMapCache.java:40)
>         at
> org.apache.cxf.binding.corba.CorbaConduit.<init>(CorbaConduit.java:84)
>         at
> org.apache.cxf.binding.corba.CorbaBindingFactory.getConduit(CorbaBindingFac
> tory.java:110) at
> org.apache.cxf.binding.corba.CorbaBindingFactory.getConduit(CorbaBindingFac
> tory.java:105) at
> org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(Abstract
> ConduitSelector.java:78) at
> org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelect
> or.java:61) at
> org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:7
> 43) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
>         at $Proxy38.greetMe(Unknown Source)
>         at cxf.client.Client.main(Client.java:47)
> 
> I’m seeing that DescriptionInfo never gets included as part of the
> ServiceInfo when buildServiceFromClass() is called on
> ReflectionServiceFactoryBean; whereas DescriptionInfo does eventually get
> set if instead buildServiceFromWSDL(…) is called.  It’s the null
> DescriptionInfo that eventually trips things up.
> 
> So in summary: Can someone help me get this running?  Or is there a better
> way to go about pulling host and port values out of my wsdl?  Or is there
> some documentation out there that I’m missing?
> 
> Thanks,
> Andrew

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to