TESTING WEB SERVICE IN BROWSER

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TompIfe

    #1

    TESTING WEB SERVICE IN BROWSER

    Hei,
    I have a web service with web methods that take nullable DateTime parameters
    (i.e., DateTime?)
    When i open the service in IE7, I get the message that those methods cannot
    be viewed ("not primitive types");
    the other web methods can be invoked without problems.
    Any suggestions on how I can change IE7 settings or something else?
    Kind regards,
    Tom Pederen


  • John Saunders

    #2
    Re: TESTING WEB SERVICE IN BROWSER

    "TompIfe" <tpskonto@commu nity.nospamwrot e in message
    news:eTPL9XTKJH A.3756@TK2MSFTN GP05.phx.gbl...
    Hei,
    I have a web service with web methods that take nullable DateTime
    parameters (i.e., DateTime?)
    When i open the service in IE7, I get the message that those methods
    cannot be viewed ("not primitive types");
    the other web methods can be invoked without problems.
    Any suggestions on how I can change IE7 settings or something else?
    This has nothing to do with IE. The web page created from your service does
    not know how to deal with anything other than primitive types.

    You should create a client to test your service in any case. Such a
    client-based test can be created in a unit test, using NUnit or the unit
    test tool in Visual Studio Team System Developer Edition. That allows the
    test to be run automatically, with a clear pass/fail report.

    --
    John Saunders | MVP - Connected System Developer

    Comment

    • Steven Cheng

      #3
      RE: TESTING WEB SERVICE IN BROWSER

      Hi Tom,

      As for the WebService Test page issue, it is due to the type system
      supported by the test page. Generally, for ASMX webservice, it will try to
      generate a web page for user to test the webmethods. However, those page
      use textbox to accept parameters, therefore, it will only be able to afford
      simple types(such as the primitive types--- int, string, bool....). Those
      complex type such as DateTime or custom class is not supported by this test
      webservice page.

      As John mentioned, if you want to fully test a webservice, you can simply
      create a console application and "Add WebReference" agains the service to
      test it. In addition, the advantage of testing via "generated proxy" (over
      the web page test interface) is that webservice proxy is using SOAP
      protocol to invoke the webservice while the test page use simply http get
      verb which cannot fully covers all the characters of SOAP based XML
      webservice.

      Sincerely,

      Steven Cheng

      Microsoft MSDN Online Support Lead


      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.

      =============== =============== =============== =====
      Get notification to my posts through email? Please refer to
      http://msdn.microsoft.com/en-us/subs...#notifications.

      =============== =============== =============== =====
      This posting is provided "AS IS" with no warranties, and confers no rights.
      --------------------
      From: "TompIfe" <tpskonto@commu nity.nospam>
      Subject: TESTING WEB SERVICE IN BROWSER
      Date: Wed, 8 Oct 2008 13:07:02 +0200


      Hei,
      I have a web service with web methods that take nullable DateTime
      parameters
      (i.e., DateTime?)
      When i open the service in IE7, I get the message that those methods cannot
      be viewed ("not primitive types");
      the other web methods can be invoked without problems.
      Any suggestions on how I can change IE7 settings or something else?
      Kind regards,
      Tom Pederen



      Comment

      • TompIfe

        #4
        Re: TESTING WEB SERVICE IN BROWSER

        Hi,
        I have created a client that consumes the web service and it works fine.
        I am not familiar with unit tests, but I will look into it.
        Thank you for your assistance.
        Tom Pedersen
        "John Saunders" <no@dont.do.tha t.comwrote in message
        news:eFgpLoUKJH A.456@TK2MSFTNG P06.phx.gbl...
        "TompIfe" <tpskonto@commu nity.nospamwrot e in message
        news:eTPL9XTKJH A.3756@TK2MSFTN GP05.phx.gbl...
        >Hei,
        >I have a web service with web methods that take nullable DateTime
        >parameters (i.e., DateTime?)
        >When i open the service in IE7, I get the message that those methods
        >cannot be viewed ("not primitive types");
        >the other web methods can be invoked without problems.
        >Any suggestions on how I can change IE7 settings or something else?
        >
        This has nothing to do with IE. The web page created from your service
        does not know how to deal with anything other than primitive types.
        >
        You should create a client to test your service in any case. Such a
        client-based test can be created in a unit test, using NUnit or the unit
        test tool in Visual Studio Team System Developer Edition. That allows the
        test to be run automatically, with a clear pass/fail report.
        >
        --
        John Saunders | MVP - Connected System Developer

        Comment

        Working...