p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET Web Services (http://p2p.wrox.com/forumdisplay.php?f=102)
-   -   Consuming Web Service (http://p2p.wrox.com/showthread.php?t=49723)

edgtr November 1st, 2006 03:50 PM

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:element name="ConnectResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="ConnectResult" type="s:string" />

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

All times are GMT -4. The time now is 01:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.