javierpdx
asked on
Accessing an array through a WSDL
Part of this is working. I can get the MyID to show and FirstName, but do I return an ArrayOfPizzaSales value for FacName based on strMyID?
viviendo.ResidentService RS= new viviendo.ResidentService() ;
viviendo.CustomerResult RSA = new Viviendo.CustomerResult();
vividendo.PizzaSales PS = new viviendo.PizzaSales();
strMyID = tbMyID.Text;
try
{
RSA = RS.getCustomer(strMyID);
litMyID.Text = RSA.MyID;
litFirstName.Text = RSA.FirstName;
litFacType.Text = PS.FacName; //not working.
}
Thanks!
viviendo.ResidentService RS= new viviendo.ResidentService()
viviendo.CustomerResult RSA = new Viviendo.CustomerResult();
vividendo.PizzaSales PS = new viviendo.PizzaSales();
strMyID = tbMyID.Text;
try
{
RSA = RS.getCustomer(strMyID);
litMyID.Text = RSA.MyID;
litFirstName.Text = RSA.FirstName;
litFacType.Text = PS.FacName; //not working.
}
Thanks!
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="https://viviendo.mysite.net/Greek/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="https://viviendo.mysite.net/Greek/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Provide Customer Lookup</wsdl:documentation>
<wsdl:types>
<s:schema targetNamespace="https://viviendo.mysite.net/Greek/" elementFormDefault="qualified">
<s:element name="getCustomer">
<s:complexType>
<s:sequence>
<s:element name="MySchoolid" type="s:string" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element><s:element name="getCustomerResponse">
<s:complexType>
<s:sequence><s:element name="getCustomerResult" type="tns:ABCDPatron" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element><s:complexType name="ABCDPatron">
<s:sequence>
<s:element name="MYSCHOOLID" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="FirstName" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="LastName" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="Contracts" type="tns:ArrayOfPizzaSales" maxOccurs="1" minOccurs="0"/>
<s:element name="Exception" type="s:string" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfPizzaSales">
<s:sequence>
<s:element name="PizzaSales" type="tns:PizzaSales" maxOccurs="unbounded" minOccurs="0" nillable="true"/>
</s:sequence>
</s:complexType>
<s:complexType name="PizzaSales">
<s:sequence>
<s:element name="Term" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="FacType" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="FacName" type="s:string" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="getCustomerSoapIn">
<wsdl:part name="parameters" element="tns:getCustomer"/>
</wsdl:message>
<wsdl:message name="getCustomerSoapOut">
<wsdl:part name="parameters" element="tns:getCustomerResponse"/></wsdl:message><wsdl:portType name="ResidentServiceSoap">
<wsdl:operation name="getCustomer"><wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Information Lookup</wsdl:documentation>
<wsdl:input message="tns:getCustomerSoapIn"/><wsdl:output message="tns:getCustomerSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ResidentServiceSoap" type="tns:ResidentServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCustomer">
<soap:operation style="document" soapAction="https://viviendo.mysite.net/Greek/getCustomer"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output><soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ResidentServiceSoap12" type="tns:ResidentServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCustomer">
<soap12:operation style="document" soapAction="https://viviendo.mysite.net/Greek/getCustomer"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ResidentService">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Provide Customer Lookup</wsdl:documentation>
<wsdl:port name="ResidentServiceSoap" binding="tns:ResidentServiceSoap"><soap:address location="https://viviendo.mysite.net/abcd/ws/residentservice.asmx"/>
</wsdl:port><wsdl:port name="ResidentServiceSoap12" binding="tns:ResidentServiceSoap12">
<soap12:address location="https://viviendo.mysite.net/abcd/ws/residentservice.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
How did you generate the ResidentService, CustomerResult, and PizzaSales classes?
ASKER
I'm trying to access the web serviced share with me. I didn't actually create this WSDL or classes in the WSDL.
When I debug, add a toggle point to RSA = RS.getCustomer(strMyID); in VS I can see the field and records being returned that I want when I mouse over and drill down. So I thought I could just use litFacType.Text = PS.FacName but I am getting a NULL value.
When I debug, add a toggle point to RSA = RS.getCustomer(strMyID); in VS I can see the field and records being returned that I want when I mouse over and drill down. So I thought I could just use litFacType.Text = PS.FacName but I am getting a NULL value.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for helping me think that one out. I was able to call a service function and populate it. I appreciate it!