Web Service method name is not valid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?YW5kcmV3?=

    Web Service method name is not valid

    I have a web application demo page and a web service.

    On my machine everything works great.

    In our test environment the web service is working fine... when I point the
    demo page on my machine to the test environment web service I get results as
    expected.

    The demo page in the test environment which is pointed at the web service in
    the test environment doesn't work at all... instead I end up with this
    bizarre error:

    Client found response content type of 'text/plain; charset=utf-8', but
    expected 'text/xml'.
    The request failed with the error message:
    --
    System.InvalidO perationExcepti on: /WebServices/myWebService.as mx Web
    Service method name is not valid.
    at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
    at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
    HttpContext context, HttpRequest request, HttpResponse response, Boolean&
    abortProcessing )

    I figure I need to change some sort of environmental variable on the test
    environment machine but I'm not really sure what to change.

    Here's the demo page code...

    Private Sub Submit_Click(By Val sender As System.Object, ByVal e As
    System.EventArg s) Handles Submit.Click

    Dim myWS As New myWebReference. myWebService
    Dim myDS As DataSet
    Dim myResponseStr As String

    Try

    'Create Soap Header
    CreateSoapHeade r(myWS)

    myDS = myWS.GetStuff(M e.txtInput.Text )

    myResponseStr = myDS.GetXml

    txtOutput.Text = myResponseStr
    Catch ex As Exception
    Throw ex
    End Try

    End Sub

    Public Sub CreateSoapHeade r(ByRef myWS As myWebReference. myWebService)
    Dim myWSCredentials As myWebReference. Credentials

    ' Build Credentials.
    If (Me.txtUserName .Text <"" AndAlso Me.txtPassword. Text <"") Then
    myWSCredentials = New ConsumerComplai ntsWSWR.Credent ials
    myWSCredentials .UserName = Me.txtUserName. Text
    myWSCredentials .Password = Me.txtPassword. Text
    End If

    myWS.Credential sValue = myWSCredentials
    End Sub
  • Jeff Dillon

    #2
    Re: Web Service method name is not valid

    >I have a web application demo page and a web service.
    >
    On my machine everything works great.
    >
    In our test environment the web service is working fine... when I point
    the
    demo page on my machine to the test environment web service I get results
    as
    expected.
    >
    The demo page in the test environment which is pointed at the web service
    in
    the test environment doesn't work at all... instead I end up with this
    bizarre error:
    >
    Client found response content type of 'text/plain; charset=utf-8',
    but
    expected 'text/xml'.
    The request failed with the error message:
    --
    System.InvalidO perationExcepti on: /WebServices/myWebService.as mx Web
    Service method name is not valid.
    at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
    Point a browser at your web service, and see if you can connect

    Jeff


    Comment

    • =?Utf-8?B?YW5kcmV3?=

      #3
      Re: Web Service method name is not valid

      I did that and I get the regular web service page with a listing of the
      methods etc...

      "Jeff Dillon" wrote:
      Point a browser at your web service, and see if you can connect
      >
      Jeff

      Comment

      • Jeff Dillon

        #4
        Re: Web Service method name is not valid

        "andrew" <andrew@discuss ions.microsoft. comwrote in message
        news:EFACB2C8-4D67-443C-9D98-7EF117AB8E65@mi crosoft.com...
        >I did that and I get the regular web service page with a listing of the
        methods etc...
        >
        "Jeff Dillon" wrote:
        >
        >Point a browser at your web service, and see if you can connect
        >>
        >Jeff
        I would recommend installing a http packet sniffer like Fiddler which is
        freely available at http://www.fiddler2.com



        Comment

        Working...