Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Service Help

Status
Not open for further replies.

zarkon4

MIS
Dec 16, 2003
641
US
I have developed my first web service and have it deployed on a server running IIS. It works great on my developement machine and does what I want it to do. It times out and doesn't run on the server. If I try to consume it in a vb.net app if times out as well. I have tried this with impersonate on and off and this is where I am stuck. Would someone be able to assist or guide me to getting it to work. I am a newbie to ASP.net and IIS so some of this is above my head.
 
What happens if you browse the web-service from your server and try to invoke a web-method?

 
Same result, I can see it and execute it passing in the parameter but it times out.
 
ok... sounds like there is an issue with the web method itself.... What is the web-method doing? Do you have any error handling?

 
Here is the web method.
<WebMethod()> _
Public Function GetItemsToPull(ByVal strJobNo As String) As DataSet

Dim MyDataSet As DataSet
Dim objIMFunctions As New clsIMFunctions

MyDataSet = objIMFunctions.GetPartsToPull(strJobNo)

Return MyDataSet

End Function

The class has a function which calls a routine that instantiates a com object

Here is that function and routine.
Public Function GetPartsToPull(ByVal JobNo As String) As DataSet
'This routine will get the parts to be pulled, populate a temporary
' table and put them into a datareader object to be returned to the client

Dim MyWorkTable As DataTable
Dim MyDataset As New DataSet
'Dim MyRow As DataRow
Dim MyCol As DataColumn
'Dim MyDataCommand As New SqlCommand
'Dim MyDataReader As SqlDataReader
'Dim strSql As String

'create the work table
MyWorkTable = New DataTable("ItemsToPull")

MyCol = New DataColumn("ItemNo")
MyCol.DataType = System.Type.GetType("System.String")
MyWorkTable.Columns.Add(MyCol)

MyCol = New DataColumn("Description")
MyCol.DataType = System.Type.GetType("System.String")
MyWorkTable.Columns.Add(MyCol)

MyCol = New DataColumn("Need")
MyCol.DataType = System.Type.GetType("System.Double")
MyWorkTable.Columns.Add(MyCol)

MyCol = New DataColumn("Pulled")
MyCol.DataType = System.Type.GetType("System.Double")
MyWorkTable.Columns.Add(MyCol)

MyCol = New DataColumn("QtyFin")
MyCol.DataType = System.Type.GetType("System.Double")
MyWorkTable.Columns.Add(MyCol)

MyCol = New DataColumn("IsBar")
MyCol.DataType = System.Type.GetType("System.Int32")
MyWorkTable.Columns.Add(MyCol)

My.Log.WriteEntry("Calling routine to get parts")

'Load the items to pull
LoadItemsToPull(JobNo, MyWorkTable)

'Add the table to the dataset
MyDataset.Tables.Add(MyWorkTable)

'Return the dataset
Return MyDataset

End Function

Public Sub LoadItemsToPull(ByVal strJobNo As String, ByRef MyWorkTable As DataTable)

Dim objWip As New Wip.JobSeq
Dim objItem As ItemMaster.InvItem
Dim lAvlShop As Long

'My.Log.WriteEntry("Setting Wip Object")

objWip.GetJobSeq(strJobNo, "01")


lAvlShop = CLng(objWip.QtyRec)

If objWip.WipItem.IType = "SE" Then
For Each objItem In objWip.WipItem.SrBom
LoadItem(objItem, CDbl(lAvlShop), MyWorkTable, True)
Next
Else
For Each objItem In objWip.WipItem.PrdStr
LoadItem(objItem, CDbl(lAvlShop), MyWorkTable)
Next
End If

'cleanup
'objWip = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(objWip)
'System.Runtime.InteropServices.Marshal.ReleaseComObject(objItem)

'My.Log.WriteEntry("Completed routine")

End Sub


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top