Joe

Joe

  • NA
  • 1
  • 0

Not able to access svc.Url

Nov 8 2008 12:07 PM
Hi Guys,

I've being running a quick test to develop an application using eBays web services.

This is my code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace EbayTest2
{
    class Program
    {
        static void Main(string[] args)
        {
            //Creating Client
            EbayShoppingService.ShoppingInterfaceClient Client = new EbayShoppingService.ShoppingInterfaceClient();

            //Client.Url = "http://open.api.ebay.com/shopping?appid=MYIDD&version=523&siteid=0&callname=GetSingleItem&responseencoding=SOAP&requestencoding=SOAP";
        
            //Creating Request Type
            EbayShoppingService.GetSingleItemRequestType request = new EbayShoppingService.GetSingleItemRequestType();

            request.ItemID = "190264321206";

            //Creating Request selector
            request.IncludeSelector = "Details";

            //Create a Response
            EbayShoppingService.GetSingleItemResponseType response = new EbayShoppingService.GetSingleItemResponseType();

            //Requesting the response from web service
            response = Client.GetSingleItem(request);

            //Display Output
            Console.WriteLine("Title is " + response.Item.Title);
           
        }
    }
}

Can anyone suggest how I specify my endpoint. I've tried altering it in my app.config file but the bits like &callname are not defiend entitys. How could I specify the endpoint in my code.

Regards,
Joe.

Answers (1)