Ok, then I'll try to forget I ever saw this format.
Steven Cheng[MSFT] wrote:
> Hi Cj,
>
> As for the "WebServiceAttribute", if you want to add more initialize value
> for its properties, I suggest you adopt the following syntax:
>
> #explicitly provide the property name before the initialize value:
> ================
> <WebService(Namespace:="
http://tempuri.org/", Name:="fdsafds",
> Description:="fsdfdfsdfdf")> _
> Public Class simpleservice
> Inherits System.Web.Services.WebService
>
> <WebMethod()> _
> Public Function HelloWorld() As String
> Return "Hello World"
>
> ...............
> ==================
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
>
http://msdn.microsoft.com/subscriptions/support/default.aspx. >
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --------------------
> Date: Tue, 15 Jan 2008 15:45:34 -0500
> From: cj <cj@nospam.nospam>
> User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
> MIME-Version: 1.0
> Subject: different way of writing a web service?
>
> _
> <ToolboxItem(False)> _
> Public Class Service1
> Inherits System.Web.Services.WebService
> <WebMethod()> _
> Public Function HelloWorld() As String
> Return "Hello World"
> End Function
> End Class
>
> The above code is basically what the project stated with. I noticed
> that typing <System.Web.Services.WebService( into the ide it told me it
> took description as string, name as string and namespace as string as
> parameters. I assumed it was another one of those things that could be
> done a million different ways so I tried writing the web service like
> this instead but it doesn't work. It says "Too many arguments to public
> new".
>
> <System.Web.Services.WebService("Testing 123","CJ's
> Service","
http://myco.com/cj/one")>
> <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1
> _1)>
> _
> Public Class Service1
> Inherits System.Web.Services.WebService
> <WebMethod()> _
> Public Function HelloWorld() As String
> Return "Hello World"
> End Function
> End Class
>
> Why would VB report <System.Web.Services.WebService( has parameters when
> it can't be used like that?
>