I am trying to call a .NET web service and am running into some issues.  I am getting the following error:

 
Server was unable to process request. ---> Object reference not set to an instance of an object.

 

The WSDL for the service is as follows:

 

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 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://www.relius.net/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.relius.net/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.relius.net/">
      <s:element name="GetPlanCounts">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="PlansToCheck" type="tns:ArrayOfPlanInfo" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfPlanInfo">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="PlanInfo" nillable="true" type="tns:PlanInfo" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="PlanInfo">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="PlanId" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="Year" type="s:int" />
        </s:sequence>
      </s:complexType>
      <s:element name="GetPlanCountsResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetPlanCountsResult" type="tns:ArrayOfNotice" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfNotice">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="Notice" nillable="true" type="tns:Notice" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="Notice">
        <s:attribute name="Type" type="s:string" />
        <s:attribute name="Number" type="s:int" use="required" />
      </s:complexType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetPlanCountsSoapIn">
    <wsdl:part name="parameters" element="tns:GetPlanCounts" />
  </wsdl:message>
  <wsdl:message name="GetPlanCountsSoapOut">
    <wsdl:part name="parameters" element="tns:GetPlanCountsResponse" />
  </wsdl:message>
  <wsdl:portType name="CrefServicesSoap">
    <wsdl:operation name="GetPlanCounts">
      <wsdl:input message="tns:GetPlanCountsSoapIn" />
      <wsdl:output message="tns:GetPlanCountsSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="CrefServicesSoap" type="tns:CrefServicesSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetPlanCounts">
      <soap:operation soapAction="http://www.relius.net/GetPlanCounts" 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="CrefServicesSoap12" type="tns:CrefServicesSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetPlanCounts">
      <soap12:operation soapAction="http://www.relius.net/GetPlanCounts" 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="CrefServices">
    <wsdl:port name="CrefServicesSoap" binding="tns:CrefServicesSoap">
      <soap:address location="http://chast1reliuswc1/RWCRelius5500/crefservices.asmx" />
    </wsdl:port>
    <wsdl:port name="CrefServicesSoap12" binding="tns:CrefServicesSoap12">
      <soap12:address location="http://chast1reliuswc1/RWCRelius5500/crefservices.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 

I am sending the following request to the web service using the Axis client:

POST /RWCRelius5500/crefservices.asmx?WSDL HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.2.1

Host: chast1reliuswc1:9001

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: "http://www.relius.net/GetPlanCounts"

Content-Length: 679

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <soapenv:Body>

        <GetPlanCounts xmlns="http://www.relius.net/">

            <PlansToCheck>

                <PlanInfo>

                    <PlanId>Plan1</PlanId>

                    <Year>2006</Year>

                </PlanInfo>

                <PlanInfo>

                    <PlanId>Plan2</PlanId>

                    <Year>2005</Year>

                </PlanInfo>

            </PlansToCheck>

        </GetPlanCounts>

    </soapenv:Body>

</soapenv:Envelope>

 

 

I am getting back the following response:

 

HTTP/1.1 500 Internal Server Error

Connection: close

Date: Fri, 07 Apr 2006 18:00:29 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Cache-Control: private

Content-Type: application/soap+xml; charset=utf-8

Content-Length: 508

<?xml version="1.0" encoding="utf-8"?><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><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Server was unable to process request. ---&gt; Object reference not set to an instance of an object.</soap:Text></soap:Reason><soap:Detail /></soap:Fault></soap:Body></soap:Envelope>

 

Any ideas?  Any help would be gratefully appreciated.

 

Thank you,
Ken Hoying

 



**************************************************************
This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**************************************************************

Reply via email to