Any chance I can get the IDL for that simple service in the tar. I'd like to create a pure CORBA client and server for it like we have for the CORBA demos. That should help narrow down where the problem is. If the client can talk to the pure CORBA server, we know the problem is in the reading/unmarshalling. If the pure CORBA client can talk to the CXF server, we know the unmarshalling is OK. If nothing can talk to anything, we're really screwed. :-)
At the very least, it would help narrow down where the problem is. Dan On Friday 06 August 2010 2:12:41 pm Andrew Lamb wrote: > Hello, > > I’ve put together a fairly simple derivative of the “Hello World CORBA > Demo” (specifically “Use Case 3 - CXF/JAX-WS Server, CXF/JAX-WS Client”) > which may be showing a defect. > > This began as a rather large, complicated corba idl from an external vender > which I converted to wsdl using the cxf idl2wsdl utility. Testing this > using a simple CXF/JAX-WS Server and CXF/JAX-WS Client, one particular > operation produced the exception “org.apache.cxf.interceptor.Fault: > Unmarshalling Error: null” on the server. After verifying that all objects > were getting fully initialized by the client without any nulls, I began > paring away everything from the wsdl that wasn’t pertinent to this > particular scenario. > > What I’ve found is that given the following types, a HelloWorld message > works if the inparameter is of type “MyItem” but not for “MyItemVector”. > > <xs:complexType name="MyItem"> > <xs:sequence> > <xs:element name="newMyString" type=" xs:string"></xs:element> > </xs:sequence> > </xs:complexType> > > <xs:complexType name="MyItemVector"> > <xs:sequence> > <xs:element maxOccurs="1000" minOccurs="0" name="item" > type="MyItem"></xs:element> > </xs:sequence> > </xs:complexType> > > > So based upon these findings, I’ve attached a HelloWorld project that > hopefully will make reproducing this behavior fairly easy. (Note: I’ve > only included the wsdl—not the original idl. I can produce that as well > if this would help.) I’ve reproduced this on XP as well as HPUX and using > both cxf-2.2.9 and the cxf-2.3.0-SNAPSHOT and I’ve been using java6 and > Sun’s orbd. > > To reproduce > 1. Untar ApacheCxfProblem.tar > http://cxf.547215.n5.nabble.com/file/n2266930/ApacheCxfProblem.tar > ApacheCxfProblem.tar > 2. Configure ApacheCxfProblem/config/.profile > > export PROJECT_HOME=<full path>/ApacheCxfProblem > export CXF_HOME=<full path>/apache-cxf-2.2.9 > > 3. From the ApacheCxfProblem/bin directory execute > > . ../config/.profile > ./runns.sh > ./runserver.sh > ./runclient.sh > > Thanks, > Andrew > > > > Here is a snippet of my client code: > > SayingHelloCORBAService s = new SayingHelloCORBAService(); > SayingHello client = s.getSayingHelloCORBAPort(); > > MyItem item = new MyItem(); > item.setNewMyString( "6010" ); > > MyItemVector vector = new MyItemVector(); > vector.getItem().add( item ); > > System.out.println("Invoking greetMe... "); > String result = client.helloWorld( vector ); > System.out.println("greetMe.result=" + result); > > > And resulting stack trace on the server: > > org.apache.cxf.interceptor.Fault: Unmarshalling Error: null > at > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:7 > 80) at > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:6 > 24) at > org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128) > at > org.apache.cxf.interceptor.BareInInterceptor.handleMessage(BareInIntercepto > r.java:138) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:243) at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO > bserver.java:110) at > org.apache.cxf.binding.corba.runtime.CorbaDSIServant.invoke(CorbaDSIServant > .java:175) at > com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToS > ervant(CorbaServerRequestDispatcherImpl.java:626) at > com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Co > rbaServerRequestDispatcherImpl.java:189) at > com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestReques > t(CorbaMessageMediatorImpl.java:1682) at > com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Corba > MessageMediatorImpl.java:1540) at > com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMe > ssageMediatorImpl.java:922) at > com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(R > equestMessage_1_2.java:181) at > com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Corba > MessageMediatorImpl.java:694) at > com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Sock > etOrChannelConnectionImpl.java:451) at > com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Socket > OrChannelConnectionImpl.java:1213) at > com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.perfor > mWork(ThreadPoolImpl.java:471) at > com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Th > readPoolImpl.java:500) Caused by: java.lang.NullPointerException > at > org.apache.cxf.binding.corba.runtime.CorbaStreamReader.getTextCharacters(Co > rbaStreamReader.java:49) at > com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleCharacte > rs(StAXStreamConnector.java:323) at > com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStr > eamConnector.java:187) at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmars > hallerImpl.java:360) at > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmarsh > allerImpl.java:339) at > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:7 > 55) ... 17 more -- Daniel Kulp dk...@apache.org http://dankulp.com/blog