Hello everyone, well at least Monday is over, I'm having a problem when I place a String array inside of a complex type. If I just want to send a String Array as a method parameter, it works fine. As soon as I place the array inside of complex type I get a NullPointerException. This is happening before my code is called. Also, if I don't populate the array with any values (xsi:nil="true"), it works fine. Has anyone else had this problem? Any advice you might have would be great. The WSDL is at the bottom of this email, it's auto generated by Axis.
thanks, Bill Heitzeg Request Message: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:impl="http://localhost:8080/BillWebService_axis/services/BillWebService" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns1="urn:prototype:webservices:cruise:sabre:com" xmlns:tns3="http://prototype.webservices.cruise.sabre.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <soap:Body> <tns3:TryoutComplexDataType> <tns3:in0> <tns1:name>Bill Heitzeg</tns1:name> <tns1:phoneNumbers> <impl:item>995-9125</impl:item> <impl:item>995-9131</impl:item> </tns1:phoneNumbers> </tns3:in0> </tns3:TryoutComplexDataType> </soap:Body> </soap:Envelope> Response Message: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.NullPointerException</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> WSDL <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://localhost:8080/BillWebService_axis/services/BillWebService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/BillWebService_axis/services/BillWebService" xmlns:intf="http://localhost:8080/BillWebService_axis/services/BillWebService" xmlns:tns1="urn:prototype:webservices:cruise:sabre:com" xmlns:tns2="http://www.w3.org/1999/XMLSchema" xmlns:tns3="http://prototype.webservices.cruise.sabre.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Apache Axis version: 1.2alpha Built on Dec 01, 2003 (04:33:24 EST)--> <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://localhost:8080/BillWebService_axis/services/BillWebService" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="ArrayOf_xsd_string"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:string"/> </sequence> </complexType> </schema> <schema elementFormDefault="qualified" targetNamespace="urn:prototype:webservices:cruise:sabre:com" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="ComplexDataType"> <sequence> <element name="name" nillable="true" type="xsd:string"/> <element name="phoneNumbers" nillable="true" type="impl:ArrayOf_xsd_string"/> </sequence> </complexType> </schema> <schema elementFormDefault="qualified" targetNamespace="http://prototype.webservices.cruise.sabre.com" xmlns="http://www.w3.org/2001/XMLSchema"> <element name="ReverseArray"> <complexType> <sequence> <element maxOccurs="unbounded" name="in0" type="xsd:string"/> </sequence> </complexType> </element> <element name="ReverseArrayResponse"> <complexType> <sequence> <element maxOccurs="unbounded" name="ReverseArrayReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="TryoutComplexDataType"> <complexType> <sequence> <element name="in0" type="tns1:ComplexDataType"/> </sequence> </complexType> </element> <element name="TryoutComplexDataTypeResponse"> <complexType> <sequence> <element name="TryoutComplexDataTypeReturn" type="tns1:ComplexDataType"/> </sequence> </complexType> </element> </schema> </wsdl:types> <wsdl:message name="ReverseArrayResponse"> <wsdl:part element="tns3:ReverseArrayResponse" name="parameters"/> </wsdl:message> <wsdl:message name="ReverseArrayRequest"> <wsdl:part element="tns3:ReverseArray" name="parameters"/> </wsdl:message> <wsdl:message name="TryoutComplexDataTypeRequest"> <wsdl:part element="tns3:TryoutComplexDataType" name="parameters"/> </wsdl:message> <wsdl:message name="TryoutComplexDataTypeResponse"> <wsdl:part element="tns3:TryoutComplexDataTypeResponse" name="parameters"/> </wsdl:message> <wsdl:portType name="BillWebService"> <wsdl:operation name="ReverseArray" parameterOrder=""> <wsdl:input message="impl:ReverseArrayRequest" name="ReverseArrayRequest"/> <wsdl:output message="impl:ReverseArrayResponse" name="ReverseArrayResponse"/> </wsdl:operation> <wsdl:operation name="TryoutComplexDataType" parameterOrder=""> <wsdl:input message="impl:TryoutComplexDataTypeRequest" name="TryoutComplexDataTypeRequest"/> <wsdl:output message="impl:TryoutComplexDataTypeResponse" name="TryoutComplexDataTypeResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="BillWebServiceSoapBinding" type="impl:BillWebService"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="ReverseArray"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="ReverseArrayRequest"> <wsdlsoap:body namespace="http://prototype.webservices.cruise.sabre.com" use="literal"/> </wsdl:input> <wsdl:output name="ReverseArrayResponse"> <wsdlsoap:body namespace="http://localhost:8080/BillWebService_axis/services/BillWebService" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="TryoutComplexDataType"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="TryoutComplexDataTypeRequest"> <wsdlsoap:body namespace="http://prototype.webservices.cruise.sabre.com" use="literal"/> </wsdl:input> <wsdl:output name="TryoutComplexDataTypeResponse"> <wsdlsoap:body namespace="http://localhost:8080/BillWebService_axis/services/BillWebService" use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="BillWebServiceService"> <wsdl:port binding="impl:BillWebServiceSoapBinding" name="BillWebService"> <wsdlsoap:address location="http://localhost:8080/BillWebService_axis/services/BillWebService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
