[ https://issues.apache.org/jira/browse/CXF-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736833#action_12736833 ]
Daniel Kulp commented on CXF-2199: ---------------------------------- Well, the stack trace shows that its Aegis on the server side. We'd definitely need a test case that shows what the server side is doing to reproduce this. > NullPointerException from MapType > --------------------------------- > > Key: CXF-2199 > URL: https://issues.apache.org/jira/browse/CXF-2199 > Project: CXF > Issue Type: Bug > Affects Versions: 2.2.1 > Environment: Maven version: 2.0.10 > Java version: 1.5.0_16 > OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix" > Reporter: Valerio Schiavoni > Attachments: helloworld.wsdl > > > I'm writing a WSDL-first application. Given this WSDL: > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions name="FcService" > targetNamespace="http://bf.fractal.objectweb.org/" > xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:tns="http://bf.fractal.objectweb.org/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <wsdl:types> > <xsd:schema attributeFormDefault="qualified" > elementFormDefault="qualified" > targetNamespace="http://bf.fractal.objectweb.org" > xmlns:tns="http://bf.fractal.objectweb.org" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:complexType name="HelloWorldException"> > <xsd:sequence /> > </xsd:complexType> > </xsd:schema> > <xsd:schema attributeFormDefault="qualified" > elementFormDefault="qualified" > targetNamespace="http://bf.fractal.objectweb.org/" > xmlns:ns0="http://bf.fractal.objectweb.org" > xmlns:tns="http://bf.fractal.objectweb.org/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:complexType name="anyType2anyTypeMap"> > <xsd:sequence> > <xsd:element maxOccurs="unbounded" > minOccurs="0" name="entry"> > <xsd:complexType> > <xsd:sequence> > <xsd:element minOccurs="0" > name="key" type="xsd:anyType" /> > <xsd:element minOccurs="0" > name="value" type="xsd:anyType" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="print" type="tns:print" /> > <xsd:complexType name="print"> > <xsd:sequence /> > </xsd:complexType> > <xsd:element name="printResponse" type="tns:printResponse" /> > <xsd:complexType name="printResponse"> > <xsd:sequence /> > </xsd:complexType> > <xsd:element name="getBytes" type="tns:getBytes" /> > <xsd:complexType name="getBytes"> > <xsd:sequence> > <xsd:element minOccurs="0" name="arg0" > nillable="true" type="tns:anyType2anyTypeMap" /> > <xsd:element name="arg1" nillable="true" > type="xsd:base64Binary" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="getBytesResponse" type="tns:getBytesResponse" > /> > <xsd:complexType name="getBytesResponse"> > <xsd:sequence> > <xsd:element name="return" nillable="true" > type="xsd:base64Binary" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="printAndAnswer" type="tns:printAndAnswer" /> > <xsd:complexType name="printAndAnswer"> > <xsd:sequence /> > </xsd:complexType> > <xsd:element name="printAndAnswerResponse" > type="tns:printAndAnswerResponse" /> > <xsd:complexType name="printAndAnswerResponse"> > <xsd:sequence> > <xsd:element minOccurs="0" name="return" > nillable="true" type="xsd:string" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="badMethod" type="tns:badMethod" /> > <xsd:complexType name="badMethod"> > <xsd:sequence /> > </xsd:complexType> > <xsd:element name="badMethodResponse" > type="tns:badMethodResponse" /> > <xsd:complexType name="badMethodResponse"> > <xsd:sequence /> > </xsd:complexType> > <xsd:element name="HelloWorldException" > nillable="true" type="ns0:HelloWorldException" /> > </xsd:schema> > </wsdl:types> > <wsdl:message name="badMethod"> > <wsdl:part element="tns:badMethod" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="printAndAnswer"> > <wsdl:part element="tns:printAndAnswer" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="HelloWorldException"> > <wsdl:part element="tns:HelloWorldException" > name="HelloWorldException"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="printAndAnswerResponse"> > <wsdl:part element="tns:printAndAnswerResponse" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="badMethodResponse"> > <wsdl:part element="tns:badMethodResponse" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getBytesResponse"> > <wsdl:part element="tns:getBytesResponse" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="printResponse"> > <wsdl:part element="tns:printResponse" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getBytes"> > <wsdl:part element="tns:getBytes" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="print"> > <wsdl:part element="tns:print" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:portType name="FcServicePortType"> > <wsdl:operation name="print"> > <wsdl:input message="tns:print" name="print"> > </wsdl:input> > <wsdl:output message="tns:printResponse" name="printResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getBytes"> > <wsdl:input message="tns:getBytes" name="getBytes"> > </wsdl:input> > <wsdl:output message="tns:getBytesResponse" > name="getBytesResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="printAndAnswer"> > <wsdl:input message="tns:printAndAnswer" name="printAndAnswer"> > </wsdl:input> > <wsdl:output message="tns:printAndAnswerResponse" > name="printAndAnswerResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="badMethod"> > <wsdl:input message="tns:badMethod" name="badMethod"> > </wsdl:input> > <wsdl:output message="tns:badMethodResponse" > name="badMethodResponse"> > </wsdl:output> > <wsdl:fault message="tns:HelloWorldException" > name="HelloWorldException"> > </wsdl:fault> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="FcServiceSoapBinding" type="tns:FcServicePortType"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="print"> > <soap:operation soapAction="" style="document" /> > <wsdl:input name="print"> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output name="printResponse"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getBytes"> > <soap:operation soapAction="" style="document" /> > <wsdl:input name="getBytes"> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output name="getBytesResponse"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="printAndAnswer"> > <soap:operation soapAction="" style="document" /> > <wsdl:input name="printAndAnswer"> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output name="printAndAnswerResponse"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="badMethod"> > <soap:operation soapAction="" style="document" /> > <wsdl:input name="badMethod"> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output name="badMethodResponse"> > <soap:body use="literal" /> > </wsdl:output> > <wsdl:fault name="HelloWorldException"> > <soap:fault name="HelloWorldException" use="literal" /> > </wsdl:fault> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="FcService"> > <wsdl:port binding="tns:FcServiceSoapBinding" name="FcServicePort"> > <soap:address location="http://localhost:8080/Service" /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > I generate the the stub classes. Then, on the client-side, executing this > code: > private FcServicePortType service ..//initialiation > final AnyType2AnyTypeMap p = new AnyType2AnyTypeMap(); > byte[] b = service.getBytes(p, "hello".getBytes()); > the call to getBytes() throws this NPE on the server-side: > Apr 30, 2009 3:27:56 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept > INFO: Interceptor has thrown exception, unwinding now > org.apache.cxf.interceptor.Fault > at > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:63) > at > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:38) > at > org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:242) > at > org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:120) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) > at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89) > at > org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302) > at > org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:265) > at > org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) > at > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:324) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) > at > org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) > at > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) > Caused by: java.lang.NullPointerException > at java.util.Hashtable.put(Hashtable.java:396) > at > org.apache.cxf.aegis.type.collection.MapType.readObject(MapType.java:87) > at > org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataReader.java:82) > at > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:61) > ... 19 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.