WSDL not working in compiled application

C

Chris

Please help.
I have written an application in VB.NET that communicates to an XML
Web Service (a Web Sphere site). The WSDL client class where created
using WSDL command.
(wsdl /language:VB
/out:myProxyClass.vb
http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL).

Here is the code for the class:
The http://hostServer/WebserviceRoot/WebServiceName.asmx replaced the
"HTTPS" url that I am connection to:

'------------------------------------------------------------------------------
' <autogenerated>
' This code was generated by a tool.
' Runtime Version: 1.1.4322.573
'
' Changes to this file may cause incorrect behavior and will be
lost if
' the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

'
'This source code was auto-generated by wsdl, Version=1.1.4322.573.
'

'<remarks/>
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="WStoCntrlGatewaySoapBinding",
[Namespace]:="http://hostServer/WebserviceRoot/WebServiceName.asmx")>
_
Public Class ABSAProxyClass
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol

'<remarks/>
Public Sub New()
MyBase.New()
Me.Url = "http://hostServer/WebserviceRoot/WebServiceName.asmx"
End Sub

'<remarks/>
<System.Web.Services.Protocols.SoapRpcMethodÒttribute("",
RequestNamespace:="http://gateway.webservices.infra.sirius.com",
ResponseNamespace:="http://hostServer/WebserviceRoot/WebServiceName.asmx")>
_
Public Function processMessage(ByVal user As String, ByVal psswd
As String, ByVal messType As String, ByVal message As String) As
<System.Xml.Serialization.SoapElementAttribute("processMessageReturn")>
String
Dim results() As Object = Me.Invoke("processMessage", New
Object() {user, psswd, messType, message})
Return CType(results(0), String)
End Function

'<remarks/>
Public Function BeginprocessMessage(ByVal user As String, ByVal
psswd As String, ByVal messType As String, ByVal message As String,
ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As
System.IAsyncResult
Return Me.BeginInvoke("processMessage", New Object() {user,
psswd, messType, message}, callback, asyncState)
End Function

'<remarks/>
Public Function EndprocessMessage(ByVal asyncResult As
System.IAsyncResult) As String
Dim results() As Object = Me.EndInvoke(asyncResult)
Return CType(results(0), String)
End Function
End Class

The problem is when debugging the application everything works as
expected but when the application is compiled and executed from
command line I get the following error:

The underlying connection was closed: The server committed an HTTP
protocol violation.
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at ABSASender.ABSAProxyClass.processMessage(String user, String
psswd, String messType, String message)
at ABSASender.Module1.Main()

I don't understand why the behavior should be different in the IDE and
in executing the application.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top