View Single Post
  #1 (permalink)  
Old November 1st, 2006, 03:50 PM
edgtr edgtr is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Consuming Web Service

I am trying to create a consuming webclient. (Visual Studio 2005)
Web service will provide SessionID when username and password were passed. I am trying to retreive the SessionID through Web Service.

Here's WSDL.

- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.tmaresources.com/TIMSSWebServices/TIMSSAccess">
- <s:element name="Connect">
- <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:sequence>
  </s:complexType>
  </s:element>
- <s:element name="ConnectResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="ConnectResult" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>


when you invoke, you get this next

 <?xml version="1.0" encoding="utf-8" ?>
  <string xmlns="http://www.tmaresources.com/TIMSSWebServices/TIMSSAccess"><Response SessionId="075EB63C638541A297996A3EADAB0102" xmlns="http://schemas.tmaresources.com/timssws60.xsd"><Status Success="true" Message="Connected" ErrorCode="0">The actual length is less than the Minlength value. An error occurred at , (137, 4).</Status></Response></string>

Here'e a code on webclient. I am not sure I am doing right to get the SessionID.

    protected void Page_Load(object sender, EventArgs e)
    {
        TIMSSAccess oWebService = new TIMSSAccess();

        string sID = "";
        //sID = oWebService.Connect(username, password);
        sID = oWebService.Connect("startup", "startup");

        lbl_Info.Text = sID
    }

I am not getting any result(SessionID)
Anyone has any idea? thank you

Reply With Quote