xml - Jaxb unmarshalling only works with specific java 8 version -


i using spring boot + spring web services data soap service. setup works on machine java 1.8.0_92-b14 installed can't figure out why.

i deployed on docker container uses openjdk:8-jdk (resolves java 1.8.0_121) in our test environment , locally null pointer exceptions after unmarshalling.

i set logging trace , see i'm getting xml response server correctly, can't unmarshall list<property> reason. know why it's null?

configuration :

@bean public jaxb2marshaller jaxb2marshaller() {      jaxb2marshaller jaxb2marshaller = new jaxb2marshaller();     jaxb2marshaller.setcontextpath("org.tempuri.ysi_interfaces_webservices.itfservicerequests");     jaxb2marshaller.setcheckforxmlrootelement(true);     jaxb2marshaller.setsupportjaxbelementclass(true);     jaxb2marshaller.setprocessexternalentities(true);     return jaxb2marshaller; }  @bean public webservicetemplate webservicetemplate() {      webservicetemplate webservicetemplate = new webservicetemplate();     webservicetemplate.setmarshaller(jaxb2marshaller());     webservicetemplate.setunmarshaller(jaxb2marshaller());     webservicetemplate.setmessagefactory(messagefactory());     webservicetemplate.setdefaulturi("https://www.yardiaspcn6.com/37345olymbec/webservices/itfservicerequests.asmx");      return webservicetemplate; }  @bean public saajsoapmessagefactory messagefactory() {     saajsoapmessagefactory messagefactory = new saajsoapmessagefactory();     messagefactory.setsoapversion(soapversion.soap_12);     return messagefactory; } 

maven jaxb plugin setup:

<plugin>             <groupid>org.jvnet.jaxb2.maven2</groupid>             <artifactid>maven-jaxb2-plugin</artifactid>             <version>0.13.1</version>             <executions>                 <execution>                     <goals>                         <goal>generate</goal>                     </goals>                 </execution>             </executions>             <configuration>                 <schemadirectory>${project.basedir}/src/main/resources/wsdl/</schemadirectory>                 <schemaincludes>                     <include>*.wsdl</include>                 </schemaincludes>             </configuration>         </plugin>         <plugin>             <groupid>org.jvnet.jaxb2_commons</groupid>             <artifactid>jaxb2-basics-annotate</artifactid>             <version>0.6.2</version>         </plugin> 

my wsdl:

<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textmatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/xmlschema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetnamespace="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests"> <wsdl:types>     <s:schema elementformdefault="qualified" targetnamespace="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests">         <s:element name="getpropertyconfigurations">             <s:complextype>                 <s:sequence>                     <s:element minoccurs="0" maxoccurs="1" name="username" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="password" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="servername" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="database" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="platform" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="interfaceentity" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="interfacelicense" type="s:string"/>                 </s:sequence>             </s:complextype>         </s:element>         <s:element name="getpropertyconfigurationsresponse">             <s:complextype>                 <s:sequence>                     <s:element name="getpropertyconfigurationsresult">                         <s:complextype>                             <s:sequence>                                 <s:element name="properties">                                     <s:complextype>                                         <s:sequence>                                             <s:element name="property" minoccurs="0" maxoccurs="unbounded">                                                 <s:complextype>                                                     <s:sequence>                                                         <s:element name="code" type="s:int"></s:element>                                                         <s:element name="marketingname" type="s:string"></s:element>                                                         <s:element name="addressline1"></s:element>                                                         <s:element name="addressline2"></s:element>                                                         <s:element name="addressline3"></s:element>                                                         <s:element name="city" type="s:string"></s:element>                                                         <s:element name="state" type="s:string"></s:element>                                                         <s:element name="postalcode" type="s:string"></s:element>                                                     </s:sequence>                                                 </s:complextype>                                             </s:element>                                         </s:sequence>                                     </s:complextype>                                 </s:element>                             </s:sequence>                         </s:complextype>                     </s:element>                 </s:sequence>             </s:complextype>         </s:element>         <s:element name="getservicerequest_search">             <s:complextype>                 <s:sequence>                     <s:element minoccurs="0" maxoccurs="1" name="username" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="password" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="servername" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="database" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="platform" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="yardipropertyid" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="interfaceentity" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="interfacelicense" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="unitcode" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="residentcode" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="name" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="address" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="phonenumber" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="status" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="openorclosed" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="fromdate" type="s:string"/>                     <s:element minoccurs="0" maxoccurs="1" name="todate" type="s:string"/>                 </s:sequence>             </s:complextype>         </s:element>         <s:element name="getservicerequest_searchresponse">             <s:complextype name="getservicerequest_searchresponse">                 <s:sequence>                     <s:element minoccurs="0" maxoccurs="1" name="getservicerequest_searchresult">                         <s:complextype name="getservicerequest_searchresult">                             <s:sequence>                                 <s:element name="servicerequests">                                     <s:complextype name="servicerequests">                                         <s:sequence>                                             <s:element name="servicerequest" maxoccurs="unbounded" minoccurs="0">                                                 <s:complextype name="servicerequest">                                                     <s:sequence>                                                         <s:element type="s:byte" name="servicerequestid"/>                                                         <s:element type="s:short" name="propertycode"/>                                                         <s:element type="s:short" name="unitcode"/>                                                         <s:element type="s:string" name="tenantcode"/>                                                         <s:element type="s:string" name="servicerequestbriefdescription"/>                                                         <s:element type="s:string" name="category" minoccurs="0"/>                                                         <s:element type="s:string" name="haspermissiontoenter"/>                                                         <s:element type="s:string" name="accessnotes" minoccurs="0"/>                                                         <s:element type="s:string" name="problemdescriptionnotes" minoccurs="0"/>                                                         <s:element type="s:string" name="tenantcaused"/>                                                         <s:element type="s:string" name="requestorname"/>                                                         <s:element type="s:long" name="requestorphonenumber"/>                                                         <s:element type="s:date" name="servicerequestdate"/>                                                         <s:element type="s:string" name="createdby"/>                                                         <s:element type="s:datetime" name="updatedate"/>                                                         <s:element type="s:string" name="updatedby"/>                                                         <s:element type="s:string" name="currentstatus"/>                                                         <s:element type="s:string" name="statushistory"/>                                                     </s:sequence>                                                 </s:complextype>                                             </s:element>                                         </s:sequence>                                     </s:complextype>                                 </s:element>                             </s:sequence>                         </s:complextype>                     </s:element>                 </s:sequence>             </s:complextype>         </s:element>     </s:schema> </wsdl:types> <wsdl:message name="getpropertyconfigurationssoapin">     <wsdl:part name="parameters" element="tns:getpropertyconfigurations"/> </wsdl:message> <wsdl:message name="getpropertyconfigurationssoapout">     <wsdl:part name="parameters" element="tns:getpropertyconfigurationsresponse"/> </wsdl:message> <wsdl:message name="getservicerequest_searchsoapin">     <wsdl:part name="parameters" element="tns:getservicerequest_search"/> </wsdl:message> <wsdl:message name="getservicerequest_searchsoapout">     <wsdl:part name="parameters" element="tns:getservicerequest_searchresponse"/> </wsdl:message> <wsdl:porttype name="itfservicerequestssoap">     <wsdl:operation name="getpropertyconfigurations">         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">             allows export of list of properties yardi voyager database associated agency service requests.         </wsdl:documentation>         <wsdl:input message="tns:getpropertyconfigurationssoapin"/>         <wsdl:output message="tns:getpropertyconfigurationssoapout"/>     </wsdl:operation>     <wsdl:operation name="getservicerequest_search">         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">             searches work orders given search criteria determined web method parameters. method allow service request search based on of following: 1)unit code 2)resident code 3)resident name 4)unit address 5)resident phone number 6)current status 7)open or closed 8)date last modified date(mm/dd/yyyy) 9)date last modified date(mm/dd/yyyy).         </wsdl:documentation>         <wsdl:input message="tns:getservicerequest_searchsoapin"/>         <wsdl:output message="tns:getservicerequest_searchsoapout"/>     </wsdl:operation> </wsdl:porttype> <wsdl:binding name="itfservicerequestssoap" type="tns:itfservicerequestssoap">     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>     <wsdl:operation name="getpropertyconfigurations">         <soap:operation soapaction="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests/getpropertyconfigurations" style="document"/>         <wsdl:input>             <soap:body use="literal"/>         </wsdl:input>         <wsdl:output>             <soap:body use="literal"/>         </wsdl:output>     </wsdl:operation>     <wsdl:operation name="getservicerequest_search">         <soap:operation soapaction="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests/getservicerequest_search" style="document"/>         <wsdl:input>             <soap:body use="literal"/>         </wsdl:input>         <wsdl:output>             <soap:body use="literal"/>         </wsdl:output>     </wsdl:operation> </wsdl:binding> <wsdl:binding name="itfservicerequestssoap12" type="tns:itfservicerequestssoap">     <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>     <wsdl:operation name="getpropertyconfigurations">         <soap12:operation soapaction="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests/getpropertyconfigurations" style="document"/>         <wsdl:input>             <soap12:body use="literal"/>         </wsdl:input>         <wsdl:output>             <soap12:body use="literal"/>         </wsdl:output>     </wsdl:operation>     <wsdl:operation name="getservicerequest_search">         <soap12:operation soapaction="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests/getservicerequest_search" style="document"/>         <wsdl:input>             <soap12:body use="literal"/>         </wsdl:input>         <wsdl:output>             <soap12:body use="literal"/>         </wsdl:output>     </wsdl:operation> </wsdl:binding> <wsdl:service name="itfservicerequests">     <wsdl:port name="itfservicerequestssoap" binding="tns:itfservicerequestssoap">         <soap:address location="https://www.yardiaspcn6.com/37345olymbec/webservices/itfservicerequests.asmx"/>     </wsdl:port>     <wsdl:port name="itfservicerequestssoap12" binding="tns:itfservicerequestssoap12">         <soap12:address location="https://www.yardiaspcn6.com/37345olymbec/webservices/itfservicerequests.asmx"/>     </wsdl:port> </wsdl:service> 

generated java class:

    @xmlaccessortype(xmlaccesstype.field) @xmltype(name = "", proporder = {     "getpropertyconfigurationsresult" }) @xmlrootelement(name = "getpropertyconfigurationsresponse") public class getpropertyconfigurationsresponse {      @xmlelement(name = "getpropertyconfigurationsresult", required = true)     protected getpropertyconfigurationsresponse.getpropertyconfigurationsresult getpropertyconfigurationsresult;      public getpropertyconfigurationsresponse.getpropertyconfigurationsresult getgetpropertyconfigurationsresult() {         return getpropertyconfigurationsresult;     }      public void setgetpropertyconfigurationsresult(getpropertyconfigurationsresponse.getpropertyconfigurationsresult value) {         this.getpropertyconfigurationsresult = value;     }      @xmlaccessortype(xmlaccesstype.field)     @xmltype(name = "", proporder = {         "properties"     })     public static class getpropertyconfigurationsresult {          @xmlelement(name = "properties", required = true)         protected getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties properties;          public getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties getproperties() {             return properties;         }          public void setproperties(getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties value) {             this.properties = value;         }          @xmlaccessortype(xmlaccesstype.field)         @xmltype(name = "", proporder = {             "property"         })         public static class properties {              @xmlelement(name = "property")             protected list<getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties.property> property;              public list<getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties.property> getproperty() {                 if (property == null) {                     property = new arraylist<getpropertyconfigurationsresponse.getpropertyconfigurationsresult.properties.property>();                 }                 return this.property;             }              @xmlaccessortype(xmlaccesstype.field)             @xmltype(name = "", proporder = {                 "code",                 "marketingname",                 "addressline1",                 "addressline2",                 "addressline3",                 "city",                 "state",                 "postalcode"             })             public static class property {                  @xmlelement(name = "code")                 protected int code;                 @xmlelement(name = "marketingname", required = true)                 protected string marketingname;                 @xmlelement(name = "addressline1", required = true)                 protected object addressline1;                 @xmlelement(name = "addressline2", required = true)                 protected object addressline2;                 @xmlelement(name = "addressline3", required = true)                 protected object addressline3;                 @xmlelement(name = "city", required = true)                 protected string city;                 @xmlelement(name = "state", required = true)                 protected string state;                 @xmlelement(name = "postalcode", required = true)                 protected string postalcode;                  // getters setters             }         }     } } 

response jaxb receives :

    <soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">    <soap:body>       <getpropertyconfigurationsresponse xmlns="http://tempuri.org/ysi.interfaces.webservices/itfservicerequests">          <getpropertyconfigurationsresult>             <properties xmlns="">                <property>                   <code>1234</code>                   <marketingname>some name</marketingname>                   <addressline1/>                   <addressline2/>                   <addressline3/>                   <city>asdad</city>                   <state>asd</state>                   <postalcode>asdasd</postalcode>                </property>                <property>                   <code>2568</code>                   <marketingname>some other name</marketingname>                   <addressline1/>                   <addressline2/>                   <addressline3/>                   <city>asdasd</city>                   <state>ads</state>                   <postalcode>adsasdsda</postalcode>                </property>             </properties>          </getpropertyconfigurationsresult>       </getpropertyconfigurationsresponse>    </soap:body> </soap:envelope> 


Comments