2.0 framework calling WCF service

Discussion in 'ASP .Net Web Services' started by Greg, Apr 15, 2007.

  1. Greg

    Greg Guest

    I have just created a WCF service that is using WShttpbasic and all is good
    when another .net 3.0 application consumes it. However, I have legacy apps
    that must use this service and are running on .net 2.0 and are housed on
    Windows 2000 servers.

    I have been unable to find ANY info on how to do this, or if it is even
    possible.
    I find it hard to believe that WCF would not be able to be consumed by 2.0
    applications.

    Please help!
     
    Greg, Apr 15, 2007
    #1
    1. Advertising

  2. WS-Basic Profile? Download WSE 3.0 from MSDN.

    As far as contacting WCF services, there is no problem. It is merely a WSDL
    endpoint (technically more, but you can create the "web" reference to a WCF
    service). The only potential gotcha I can think of right now is if you are
    using of the new encoding methods. If you are using SOAP, you should be
    fine.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *********************************************
    Think outside the box!
    *********************************************
    "Greg" <> wrote in message
    news:...
    >I have just created a WCF service that is using WShttpbasic and all is good
    > when another .net 3.0 application consumes it. However, I have legacy apps
    > that must use this service and are running on .net 2.0 and are housed on
    > Windows 2000 servers.
    >
    > I have been unable to find ANY info on how to do this, or if it is even
    > possible.
    > I find it hard to believe that WCF would not be able to be consumed by 2.0
    > applications.
    >
    > Please help!
     
    Cowboy \(Gregory A. Beamer\), Apr 19, 2007
    #2
    1. Advertising

  3. Greg

    Greg Guest

    I am able to add the web reference to the project; however when I try to
    implement it all that I have to choose from is the Cass object, Interface,
    eventargs, and eventhandler.
    Example:
    OracleService.BasicEmployee;
    OracleService.GetFullEmployeeByEmployeeIDCompletedEventArgs;
    OracleService.GetFullEmployeeByEmployeeIDCompletedEventHandler;
    OracleService.WSHttpBinding_IBasicEmployee
    (Service = web reference)

    In testing I have tried using Service.WSHttpBinding_IBasicEmployee , However
    I just get a time out message.
    Example:
    OracleService.WSHttpBinding_IBasicEmployee proxy = new
    WSETesting.OracleService.WSHttpBinding_IBasicEmployee();
    OracleService.BasicEmployee[] arrayemployee =
    proxy.GetEmployeeByEmployeeID("12356987");
    OracleService.BasicEmployee;
    OracleService.GetFullEmployeeByEmployeeIDCompletedEventArgs;
    OracleService.GetFullEmployeeByEmployeeIDCompletedEventHandler;
    OracleService.WSHttpBinding_IBasicEmployee
    foreach (OracleService.BasicEmployee emp in arrayemployee)
    {
    string me = emp.FirstName;
    }

    I have also tried to run the wsdl.exe I received the following error:
    Microsoft (R) Web Services Description Language Utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation. All rights reserved.

    Warning: This web reference does not conform to WS-I Basic Profile v1.1.

    SOAP 1.1 binding was not found: WS-I's Basic Profile 1.1 consists of
    implementation
    guidelines that recommend how a set of core Web services specifications
    should
    be used together to develop interoperable Web services. For the 1.1 Profile,
    those specifications are SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 and XML Schema.

    For more details on the WS-I Basic Profile v1.1, see the specification
    at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.

    Warning: one or more optional WSDL extension elements were ignored.
    Warnings were encountered. Review generated source comments for more details.

    Listed below is the Service code:
    (Employee.cs)
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.ServiceModel;
    using System.Runtime.Serialization;

    namespace OracleServices.OracleContracts
    {
    [DataContract()]
    public class BasicEmployee
    {

    private string _employeeID;
    private string _firstName;
    private string _lastName;
    private string _middleName;
    private string _suffix;
    private string _supervisorID;
    private string _email;
    private string _title;
    private string _ssn;
    private string _workPhone;
    private string _companyCode;
    private string _companyDesciption;
    private string _locationcode;
    private string _dateofbirth;
    private string _employmentDate;
    private string _employeeTerminationDate;
    private string _terminationAppliedDate;

    [DataMember(Order = 0)]
    public string EmployeeID
    {
    get { return _employeeID; }
    set { _employeeID = value; }
    }

    [DataMember(Order = 1)]
    public string FirstName
    {
    get { return _firstName; }
    set { _firstName = value; }
    }

    [DataMember(Order = 2)]
    public string LastName
    {
    get { return _lastName; }
    set { _lastName = value; }
    }

    [DataMember(Order = 3)]
    public string MiddleName
    {
    get { return _middleName; }
    set { _middleName = value; }
    }

    [DataMember(Order = 4)]
    public string Suffix
    {
    get { return _suffix; }
    set { _suffix = value; }
    }

    [DataMember(Order = 5)]
    public string SupervisorID
    {
    get { return _supervisorID; }
    set { _supervisorID = value; }
    }

    [DataMember(Order = 6)]
    public string Email
    {
    get { return _email; }
    set { _email = value; }
    }

    [DataMember(Order = 7)]
    public string Title
    {
    get { return _title; }
    set { _title = value; }
    }

    [DataMember(Order = 8)]
    public string SSN
    {
    get{return _ssn;}
    set { _ssn = value; }
    }

    [DataMember(Order = 9)]
    public string WorkPhone
    {
    get { return _workPhone; }
    set { _workPhone = value; }
    }

    [DataMember(Order = 10)]
    public string CompanyCode
    {
    get { return _companyCode; }
    set { _companyCode = value; }
    }

    [DataMember(Order = 11)]
    public string CompanyDescription
    {
    get { return _companyDesciption; }
    set { _companyDesciption = value; }
    }

    [DataMember(Order = 12)]
    public string LocationCode
    {
    get { return _locationcode; }
    set { _locationcode = value; }
    }

    [DataMember(Order = 13)]
    public string DateOfBirth
    {
    get { return _dateofbirth; }
    set { _dateofbirth = value; }
    }

    [DataMember(Order = 14)]
    public string EmploymentDate
    {
    get { return _employmentDate; }
    set { _employmentDate = value; }
    }

    [DataMember(Order = 15)]
    public string EmployeeTerminationDate
    {
    get { return _employeeTerminationDate; }
    set { _employeeTerminationDate = value; }
    }

    [DataMember(Order = 16)]
    public string TerminationAppliedDate
    {
    get { return _terminationAppliedDate; }
    set { _terminationAppliedDate = string.Empty; }
    }


    public BasicEmployee(string employeeID, string firstName, string
    lastName,
    string middleName, string suffix, string
    supervisorID,
    string email, string title, string ssn,
    string workNumber,
    string companyCode,string
    companyDescription,string locationCode,string dateofbirth,
    string employmentDate, string
    employeeTerminationDate, string terminationAppliedDate)
    {
    EmployeeID = employeeID;
    FirstName = firstName;
    LastName = lastName;
    MiddleName = _middleName;
    Suffix = suffix;
    SupervisorID = supervisorID;
    Email = email;
    Title = title;
    SSN = ssn;
    WorkPhone = workNumber;
    companyCode = companyCode;
    CompanyDescription = companyDescription;
    LocationCode = locationCode;
    DateOfBirth = dateofbirth;
    EmploymentDate = employmentDate;
    EmployeeTerminationDate = employeeTerminationDate;
    TerminationAppliedDate = terminationAppliedDate;

    }
    }
    }
    (IBasicEmployee.svc)
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.ServiceModel;

    namespace OracleServices.OracleContracts
    {
    [ServiceContract(Namespace = "http://EMSC.OracleServices")]

    public interface IBasicEmployee
    {
    [OperationContract()]

    List<BasicEmployee> GetEmployeeByEmployeeID(string employeeID);

    [OperationContract()]
    List<BasicEmployee> GetEmployeeByLastName(string lastName);

    [OperationContract()]
    List<BasicEmployee> GetEmployeeByLastName_FirstName(string lastName,
    string firstName);

    [OperationContract()]
    List<BasicEmployee> GetEmployeeBySSN(string ssn);

    [OperationContract()]
    List<BasicEmployee> GetDirectReportsBySupervisorID(string
    supervisorID);

    [OperationContract()]
    List<BasicEmployee> GetSupervisorByEmployeeID(string supervisorID);

    [OperationContract()]
    List<FullEmployee> GetFullEmployeeByEmployeeID(string employeeID);

    [OperationContract()]
    List<BasicEmployee> GetEmployeeByLastName_4SSN(string lastName,
    string ssn);
    }
    }


    "Cowboy (Gregory A. Beamer)" wrote:

    > WS-Basic Profile? Download WSE 3.0 from MSDN.
    >
    > As far as contacting WCF services, there is no problem. It is merely a WSDL
    > endpoint (technically more, but you can create the "web" reference to a WCF
    > service). The only potential gotcha I can think of right now is if you are
    > using of the new encoding methods. If you are using SOAP, you should be
    > fine.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > http://gregorybeamer.spaces.live.com
    >
    > *********************************************
    > Think outside the box!
    > *********************************************
    > "Greg" <> wrote in message
    > news:...
    > >I have just created a WCF service that is using WShttpbasic and all is good
    > > when another .net 3.0 application consumes it. However, I have legacy apps
    > > that must use this service and are running on .net 2.0 and are housed on
    > > Windows 2000 servers.
    > >
    > > I have been unable to find ANY info on how to do this, or if it is even
    > > possible.
    > > I find it hard to believe that WCF would not be able to be consumed by 2.0
    > > applications.
    > >
    > > Please help!

    >
     
    Greg, Apr 20, 2007
    #3
  4. Greg

    Greg Guest

    Also, here are the bindings stated in the web config of the WCF service.
    <service name="OracleService" behaviorConfiguration="returnFaults">
    <endpoint contract="OracleServices.OracleContracts.IBasicEmployee"
    binding="wsHttpBinding"/>
    <endpoint
    contract="OracleServices.OracleContracts.IBasicEmployeeEmploymentStatus"
    binding="wsHttpBinding"/>
    <endpoint
    contract="OracleServices.OracleContracts.IBasicEmployeePersonalAddress"
    binding="wsHttpBinding"/>
    <endpoint
    contract="OracleServices.OracleContracts.IEmployeeLocations"
    binding="wsHttpBinding"/>
    <endpoint
    contract="OracleServices.OracleContracts.ILinkOracleMessage"
    binding="wsHttpBinding"/>
    </service>



    "Cowboy (Gregory A. Beamer)" wrote:

    > WS-Basic Profile? Download WSE 3.0 from MSDN.
    >
    > As far as contacting WCF services, there is no problem. It is merely a WSDL
    > endpoint (technically more, but you can create the "web" reference to a WCF
    > service). The only potential gotcha I can think of right now is if you are
    > using of the new encoding methods. If you are using SOAP, you should be
    > fine.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > http://gregorybeamer.spaces.live.com
    >
    > *********************************************
    > Think outside the box!
    > *********************************************
    > "Greg" <> wrote in message
    > news:...
    > >I have just created a WCF service that is using WShttpbasic and all is good
    > > when another .net 3.0 application consumes it. However, I have legacy apps
    > > that must use this service and are running on .net 2.0 and are housed on
    > > Windows 2000 servers.
    > >
    > > I have been unable to find ANY info on how to do this, or if it is even
    > > possible.
    > > I find it hard to believe that WCF would not be able to be consumed by 2.0
    > > applications.
    > >
    > > Please help!

    >
     
    Greg, Apr 20, 2007
    #4
  5. Greg

    Greg Guest

    I have been able to consume this WCF service as long as the binding is set to
    BasicHTTP.

    What do i need to do to consume the WCF service with the bindings set to
    wsHttpBinding. (i have WS 3.0 installed)
    If you can point me to some codesamples this would be appreciated.

    "Cowboy (Gregory A. Beamer)" wrote:

    > WS-Basic Profile? Download WSE 3.0 from MSDN.
    >
    > As far as contacting WCF services, there is no problem. It is merely a WSDL
    > endpoint (technically more, but you can create the "web" reference to a WCF
    > service). The only potential gotcha I can think of right now is if you are
    > using of the new encoding methods. If you are using SOAP, you should be
    > fine.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > http://gregorybeamer.spaces.live.com
    >
    > *********************************************
    > Think outside the box!
    > *********************************************
    > "Greg" <> wrote in message
    > news:...
    > >I have just created a WCF service that is using WShttpbasic and all is good
    > > when another .net 3.0 application consumes it. However, I have legacy apps
    > > that must use this service and are running on .net 2.0 and are housed on
    > > Windows 2000 servers.
    > >
    > > I have been unable to find ANY info on how to do this, or if it is even
    > > possible.
    > > I find it hard to believe that WCF would not be able to be consumed by 2.0
    > > applications.
    > >
    > > Please help!

    >
     
    Greg, Apr 20, 2007
    #5
  6. This could be a disparity between the Microsoft world and Oracle, based on
    the objects you are talking about. Oracle TechNet might have some options,
    as might support.microsoft.com. Neither is extremely good at helping the
    other, however, so I am not sure how much this will yield. Will see if I
    find anything.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *********************************************
    Think outside the box!
    *********************************************
    "Greg" <> wrote in message
    news:...
    >I am able to add the web reference to the project; however when I try to
    > implement it all that I have to choose from is the Cass object, Interface,
    > eventargs, and eventhandler.
    > Example:
    > OracleService.BasicEmployee;
    > OracleService.GetFullEmployeeByEmployeeIDCompletedEventArgs;
    > OracleService.GetFullEmployeeByEmployeeIDCompletedEventHandler;
    > OracleService.WSHttpBinding_IBasicEmployee
    > (Service = web reference)
    >
    > In testing I have tried using Service.WSHttpBinding_IBasicEmployee ,
    > However
    > I just get a time out message.
    > Example:
    > OracleService.WSHttpBinding_IBasicEmployee proxy = new
    > WSETesting.OracleService.WSHttpBinding_IBasicEmployee();
    > OracleService.BasicEmployee[] arrayemployee =
    > proxy.GetEmployeeByEmployeeID("12356987");
    > OracleService.BasicEmployee;
    > OracleService.GetFullEmployeeByEmployeeIDCompletedEventArgs;
    > OracleService.GetFullEmployeeByEmployeeIDCompletedEventHandler;
    > OracleService.WSHttpBinding_IBasicEmployee
    > foreach (OracleService.BasicEmployee emp in arrayemployee)
    > {
    > string me = emp.FirstName;
    > }
    >
    > I have also tried to run the wsdl.exe I received the following error:
    > Microsoft (R) Web Services Description Language Utility
    > [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    > Copyright (C) Microsoft Corporation. All rights reserved.
    >
    > Warning: This web reference does not conform to WS-I Basic Profile v1.1.
    >
    > SOAP 1.1 binding was not found: WS-I's Basic Profile 1.1 consists of
    > implementation
    > guidelines that recommend how a set of core Web services specifications
    > should
    > be used together to develop interoperable Web services. For the 1.1
    > Profile,
    > those specifications are SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 and XML
    > Schema.
    >
    > For more details on the WS-I Basic Profile v1.1, see the specification
    > at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
    >
    > Warning: one or more optional WSDL extension elements were ignored.
    > Warnings were encountered. Review generated source comments for more
    > details.
    >
    > Listed below is the Service code:
    > (Employee.cs)
    > using System;
    > using System.Collections.Generic;
    > using System.Text;
    > using System.ServiceModel;
    > using System.Runtime.Serialization;
    >
    > namespace OracleServices.OracleContracts
    > {
    > [DataContract()]
    > public class BasicEmployee
    > {
    >
    > private string _employeeID;
    > private string _firstName;
    > private string _lastName;
    > private string _middleName;
    > private string _suffix;
    > private string _supervisorID;
    > private string _email;
    > private string _title;
    > private string _ssn;
    > private string _workPhone;
    > private string _companyCode;
    > private string _companyDesciption;
    > private string _locationcode;
    > private string _dateofbirth;
    > private string _employmentDate;
    > private string _employeeTerminationDate;
    > private string _terminationAppliedDate;
    >
    > [DataMember(Order = 0)]
    > public string EmployeeID
    > {
    > get { return _employeeID; }
    > set { _employeeID = value; }
    > }
    >
    > [DataMember(Order = 1)]
    > public string FirstName
    > {
    > get { return _firstName; }
    > set { _firstName = value; }
    > }
    >
    > [DataMember(Order = 2)]
    > public string LastName
    > {
    > get { return _lastName; }
    > set { _lastName = value; }
    > }
    >
    > [DataMember(Order = 3)]
    > public string MiddleName
    > {
    > get { return _middleName; }
    > set { _middleName = value; }
    > }
    >
    > [DataMember(Order = 4)]
    > public string Suffix
    > {
    > get { return _suffix; }
    > set { _suffix = value; }
    > }
    >
    > [DataMember(Order = 5)]
    > public string SupervisorID
    > {
    > get { return _supervisorID; }
    > set { _supervisorID = value; }
    > }
    >
    > [DataMember(Order = 6)]
    > public string Email
    > {
    > get { return _email; }
    > set { _email = value; }
    > }
    >
    > [DataMember(Order = 7)]
    > public string Title
    > {
    > get { return _title; }
    > set { _title = value; }
    > }
    >
    > [DataMember(Order = 8)]
    > public string SSN
    > {
    > get{return _ssn;}
    > set { _ssn = value; }
    > }
    >
    > [DataMember(Order = 9)]
    > public string WorkPhone
    > {
    > get { return _workPhone; }
    > set { _workPhone = value; }
    > }
    >
    > [DataMember(Order = 10)]
    > public string CompanyCode
    > {
    > get { return _companyCode; }
    > set { _companyCode = value; }
    > }
    >
    > [DataMember(Order = 11)]
    > public string CompanyDescription
    > {
    > get { return _companyDesciption; }
    > set { _companyDesciption = value; }
    > }
    >
    > [DataMember(Order = 12)]
    > public string LocationCode
    > {
    > get { return _locationcode; }
    > set { _locationcode = value; }
    > }
    >
    > [DataMember(Order = 13)]
    > public string DateOfBirth
    > {
    > get { return _dateofbirth; }
    > set { _dateofbirth = value; }
    > }
    >
    > [DataMember(Order = 14)]
    > public string EmploymentDate
    > {
    > get { return _employmentDate; }
    > set { _employmentDate = value; }
    > }
    >
    > [DataMember(Order = 15)]
    > public string EmployeeTerminationDate
    > {
    > get { return _employeeTerminationDate; }
    > set { _employeeTerminationDate = value; }
    > }
    >
    > [DataMember(Order = 16)]
    > public string TerminationAppliedDate
    > {
    > get { return _terminationAppliedDate; }
    > set { _terminationAppliedDate = string.Empty; }
    > }
    >
    >
    > public BasicEmployee(string employeeID, string firstName, string
    > lastName,
    > string middleName, string suffix, string
    > supervisorID,
    > string email, string title, string ssn,
    > string workNumber,
    > string companyCode,string
    > companyDescription,string locationCode,string dateofbirth,
    > string employmentDate, string
    > employeeTerminationDate, string terminationAppliedDate)
    > {
    > EmployeeID = employeeID;
    > FirstName = firstName;
    > LastName = lastName;
    > MiddleName = _middleName;
    > Suffix = suffix;
    > SupervisorID = supervisorID;
    > Email = email;
    > Title = title;
    > SSN = ssn;
    > WorkPhone = workNumber;
    > companyCode = companyCode;
    > CompanyDescription = companyDescription;
    > LocationCode = locationCode;
    > DateOfBirth = dateofbirth;
    > EmploymentDate = employmentDate;
    > EmployeeTerminationDate = employeeTerminationDate;
    > TerminationAppliedDate = terminationAppliedDate;
    >
    > }
    > }
    > }
    > (IBasicEmployee.svc)
    > using System;
    > using System.Collections.Generic;
    > using System.Text;
    > using System.ServiceModel;
    >
    > namespace OracleServices.OracleContracts
    > {
    > [ServiceContract(Namespace = "http://EMSC.OracleServices")]
    >
    > public interface IBasicEmployee
    > {
    > [OperationContract()]
    >
    > List<BasicEmployee> GetEmployeeByEmployeeID(string employeeID);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetEmployeeByLastName(string lastName);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetEmployeeByLastName_FirstName(string
    > lastName,
    > string firstName);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetEmployeeBySSN(string ssn);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetDirectReportsBySupervisorID(string
    > supervisorID);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetSupervisorByEmployeeID(string supervisorID);
    >
    > [OperationContract()]
    > List<FullEmployee> GetFullEmployeeByEmployeeID(string employeeID);
    >
    > [OperationContract()]
    > List<BasicEmployee> GetEmployeeByLastName_4SSN(string lastName,
    > string ssn);
    > }
    > }
    >
    >
    > "Cowboy (Gregory A. Beamer)" wrote:
    >
    >> WS-Basic Profile? Download WSE 3.0 from MSDN.
    >>
    >> As far as contacting WCF services, there is no problem. It is merely a
    >> WSDL
    >> endpoint (technically more, but you can create the "web" reference to a
    >> WCF
    >> service). The only potential gotcha I can think of right now is if you
    >> are
    >> using of the new encoding methods. If you are using SOAP, you should be
    >> fine.
    >>
    >> --
    >> Gregory A. Beamer
    >> MVP; MCP: +I, SE, SD, DBA
    >> http://gregorybeamer.spaces.live.com
    >>
    >> *********************************************
    >> Think outside the box!
    >> *********************************************
    >> "Greg" <> wrote in message
    >> news:...
    >> >I have just created a WCF service that is using WShttpbasic and all is
    >> >good
    >> > when another .net 3.0 application consumes it. However, I have legacy
    >> > apps
    >> > that must use this service and are running on .net 2.0 and are housed
    >> > on
    >> > Windows 2000 servers.
    >> >
    >> > I have been unable to find ANY info on how to do this, or if it is even
    >> > possible.
    >> > I find it hard to believe that WCF would not be able to be consumed by
    >> > 2.0
    >> > applications.
    >> >
    >> > Please help!

    >>
     
    Cowboy \(Gregory A. Beamer\), Apr 23, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R3JlZw==?=

    2.0 Framework calling WCF service.

    =?Utf-8?B?R3JlZw==?=, Apr 15, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    588
    =?Utf-8?B?R3JlZw==?=
    Apr 15, 2007
  2. Simon
    Replies:
    0
    Views:
    1,067
    Simon
    Oct 13, 2009
  3. Cindy Lee
    Replies:
    1
    Views:
    2,255
    Mr. Arnold
    Mar 19, 2010
  4. pbd22

    Calling Client-Side WCF Service With Type List<Of T>

    pbd22, Oct 20, 2009, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    871
    pbd22
    Oct 20, 2009
  5. pjb
    Replies:
    0
    Views:
    1,164
Loading...

Share This Page