Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:23:33+00:00 2026-05-17T00:23:33+00:00

I am consuming a web service from a third party site. I have the

  • 0

I am consuming a web service from a third party site. I have the type and method in the wsdl file called GetItemAvailable. When i consume and execute the service it returns a SOAP array (defined in the wsdl as ItemsArray).
The porblem is, i’m not sure what type i need to use to get to the information. here is my code:

GetItemAvailable.GetItemAvailable gia = new GetItemAvailable.GetItemAvailable();
ItemsArray ia = new ItemsArray();
ia = (gia.CallGetItemAvailable("1088507721", "9780842387491"));
string sttest = ia.id[1].ToString();

The error always says that ia.id is null

what am i doing wrong? i’m not very familiar with SOAP.
Here is the wsdl:

<wsdl:definitions>
  <wsdl:types>
    <xsd:complexType name="Items">
        <xsd:all>
          <xsd:element name="item_id" type="xsd:string" />
          <xsd:element name="tn_onhand" type="xsd:int" />
          <xsd:element name="tn_onorder" type="xsd:string" />
          <xsd:element name="tn_onorder_eta" type="xsd:string" />
          <xsd:element name="nv_onhand" type="xsd:int" />
          <xsd:element name="nv_onorder" type="xsd:string" />
          <xsd:element name="nv_onorder_eta" type="xsd:string" />
          <xsd:element name="error" type="xsd:string" />
        </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="ItemsArray">
        <xsd:complexContent mixed="false">
          <xsd:restriction base="SOAP-ENC:Array">
            <xsd:attribute wsdl:arrayType="tns:Items[]" ref="SOAP-ENC:arrayType" />
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="GetItemAvailableRequestType">
        <xsd:all>
          <xsd:element name="api_key" type="xsd:string" />
          <xsd:element name="Items" type="xsd:string" />
        </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="GetItemAvailableResponseType">
        <xsd:all>
          <xsd:element name="GetItemAvailableResult" type="tns:ItemsArray" />
        </xsd:all>
      </xsd:complexType>
      <xsd:element name="GetItemAvailable" type="tns:GetItemAvailableRequestType" />
      <xsd:element name="GetItemAvailableResponse" type="tns:GetItemAvailableResponseType" />
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="GetItemAvailableRequest">
    <wsdl:part name="parameters" element="tns:GetItemAvailable" />
  </wsdl:message>
  <wsdl:message name="GetItemAvailableResponse">
    <wsdl:part name="parameters" element="tns:GetItemAvailableResponse" />
  </wsdl:message>
  <wsdl:portType name="GetItemAvailablePortType">
    <wsdl:operation name="GetItemAvailable">
      <documentation>Returns quantity available and on order for list of products seperated by comma (example: 9780877840756,9780446691093)</documentation>
      <wsdl:input message="tns:GetItemAvailableRequest" />
      <wsdl:output message="tns:GetItemAvailableResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="GetItemAvailableBinding" type="tns:GetItemAvailablePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetItemAvailable">
      <soap:operation soapAction="http://www.stl-distribution.com/GetItemAvailable" style="document" />
      <wsdl:input>
        <soap:body use="literal" namespace="http://www.stl-distribution.com" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" namespace="http://www.stl-distribution.com" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="GetItemAvailable">
    <wsdl:port name="GetItemAvailablePort" binding="tns:GetItemAvailableBinding">
      <soap:address location="http://www.stl-distribution.com/webservices/soap/GetItemAvailable.php" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:23:34+00:00Added an answer on May 17, 2026 at 12:23 am

    I got the issue resolved by writting a new class to wrap around the WSDL file.
    Guess i should have just done this in the first place.
    Thanks for all the help guys!!!

     public class STLItemAvailable
        {
            private string _itemNumber;
            public string ItemNumber
            {
                get
                {
                    return _itemNumber;
                }
            }
    
            private int _tnOnHand;
            public int TNOnHand
            {
                get
                {
                    return _tnOnHand;
                }
            }
    
            private int _tnOnOrder;
            public int TNOnOrder
            {
                get
                {
                    return _tnOnOrder;
                }
            }
    
            private DateTime _tnOrderETA;
            public DateTime TNOrderETA
            {
                get
                {
                    return _tnOrderETA;
                }
            }
    
            private int _nvOnHand;
            public int NVOnHand
            {
                get
                {
                    return _nvOnHand;
                }
            }
    
            private int _nvOnOrder;
            public int NVOnOrder
            {
                get
                {
                    return _nvOnOrder;
                }
            }
    
            private DateTime _nvOrderETA;
            public DateTime NVOrderETA
            {
                get
                {
                    return _nvOrderETA;
                }
            }
    
            public STLItemAvailable()
            {
                //
                // TODO: Add constructor logic here
                //
            }
    
            public STLItemAvailable(string APIKey, string ItemNumber)
            {
                GetItemAvailable gia = new GetItemAvailable();
                ItemsArray ia = gia.CallGetItemAvailable(APIKey, ItemNumber);
    
                XmlElement[] XEArray = ia.Any;
                XmlNode n = XEArray[0];
    
                int testn = 0;
                DateTime testd;
                foreach (XmlNode xn in n.ChildNodes)
                {
                    switch (xn.Name)
                    {
                        case "item_id":
                            this._itemNumber = xn.InnerText;
                            break;
                        case "tn_onhand":
                            int.TryParse(xn.InnerText, out testn);
                            this._tnOnHand = testn;
                            break;
                        case "tn_onorder":
                            int.TryParse(xn.InnerText, out testn);
                            this._tnOnOrder = testn;
                            break;
                        case "tn_onorder_eta":
                            DateTime.TryParse(xn.InnerText, out testd);
                            this._tnOrderETA = testd;
                            break;
                        case "nv_onhand":
                            int.TryParse(xn.InnerText, out testn);
                            this._nvOnHand = testn;
                            break;
                        case "nv_onorder":
                            int.TryParse(xn.InnerText, out testn);
                            this._nvOnOrder = testn;
                            break;
                        case "nv_onorder_eta":
                            DateTime.TryParse(xn.InnerText, out testd);
                            this._nvOrderETA = testd;
                            break;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service that is protected by requiring the consuming third party
I have a problem with consuming a third-party web service in .NET C#. It
So this is my situation. I have to consume a third party web service
I'm consuming a third-party resource (a .dll) in a web service, and my problem
I have two WCF clients consuming a 3rd party web service. These two clients
I have a WCF web service using wsHttpBinding that I am consuming from a
I'm having hard time consuming a secure WCF Web Service from a PHP site.
I'm consuming a third-party web service in an ASP.NET webforms application. I simply added
I'm consuming a web service from C#, and the web service requires a login
I am consuming an external C# Web Service method which returns a simple calculation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.