Properly returning a collection through a web service
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.aspnet.webservices.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Brad Simon
What am I doing wrong? I have been working on this for many days, and I am almost there. I have a collection of structures, that work great when working directly with a Winform Application. They even work great in a web service, it is when I try to get the returned collection into a proper collection. I am not sure how much sense that makes. Here is the code I have:
-------------------------------------------------------------------------------
Dim objWS As New BBSStructuresWS
Dim Struc() As BBSStructure
Dim strArray() As String = {"0010002", "0010003", "0010019"}

objWS.Credentials = System.Net.CredentialCache.DefaultCredentials
Struc = objWS.GetStructures(strArray)
-------------------------------------------------------------------------------

This works ok, BUT, the return I am getting is putting the collection (returned as a collection) into an array. I want to put the returned collection into a variable that is the same colletion, so I can iterate through it, and bind a datagrid with it. What I want to do is:
-------------------------------------------------------------------------------
Dim objWS As New BBSStructuresWS
Dim Struc As BBSStructures '-- note the 's' at the end
Dim strArray() As String = {"0010002", "0010003", "0010019"}

objWS.Credentials = System.Net.CredentialCache.DefaultCredentials
Struc = objWS.GetStructures(strArray)
-------------------------------------------------------------------------------

It won't let me do this, as 'BBSStructures' is not defined. I do not want to import the assembly that has the collection in it, as I need to keep it as a web service, and not rely on the assembly.

Can I do what I want to do?

Here is the class code for the Collection:
-------------------------------------------------------------------------------
Imports System.Data.SqlClient
Imports System.Collections
Imports IDOT.BIS.Data

Namespace BIS

<Serializable()> _
Public Class BBSStructures
Inherits CollectionBase

' This is the string that holds the Connection string for SIMS.
Private gstrSIMSConn As String = "nunya"

Public Sub New()

End Sub

#Region " Return Different Collections "

Public Function GetSingleStructure(ByVal SN As String) As BBSStructures
Try
Return AddBBSStructures(SN)
Catch ex As Exception
ExceptionManager.Publish(ex)
End Try
End Function

Private Function AddBBSStructures(ByVal SN As String) As BBSStructures

Dim pplMyBBSStructures As BBSStructures = New BBSStructures
Dim myBBSStructure As BBSStructure

myBBSStructure = New BBSStructure(SN)
pplMyBBSStructures.Add(myBBSStructure)

Return pplMyBBSStructures

End Function

Private Function AddBBSStructures(ByVal MyBBSStructures As SqlDataReader) As BBSStructures

Dim pplMyBBSStructures As BBSStructures = New BBSStructures
Dim myBBSStructure As BBSStructure

While MyBBSStructures.Read()
myBBSStructure = New BBSStructure(CInt(MyBBSStructures.Item("StructureNumber")))
pplMyBBSStructures.Add(myBBSStructure)
End While

Return pplMyBBSStructures

End Function
#End Region

#Region " Collection Inheritance Code "

Default Public Property Item(ByVal index As Integer) As BBSStructure
Get
Return CType(List(index), BBSStructure)
End Get
Set(ByVal Value As BBSStructure)
List(index) = Value
End Set
End Property

Default Public Property Item(ByVal index As String) As BBSStructure
Get
Return CType(List(index), BBSStructure)
End Get
Set(ByVal Value As BBSStructure)
List(index) = Value
End Set
End Property

#Region " Add Override "

Public Function Add(ByVal value As BBSStructure) As Integer
Return List.Add(value)
End Function 'Add

#End Region

Public Function IndexOf(ByVal value As Int16) As Integer
Return List.IndexOf(value)
End Function 'IndexOf

Public Sub Insert(ByVal index As Integer, ByVal value As BBSStructure)
List.Insert(index, value)
End Sub 'Insert

Public Sub Remove(ByVal value As BBSStructure)
List.Remove(value)
End Sub 'Remove

Public Function Contains(ByVal value As BBSStructure) As Boolean
' If value is not of type BBSStructure, this will return false.
Return List.Contains(value)
End Function 'Contains

Protected Overrides Sub OnInsert(ByVal index As Integer, ByVal value As [Object])
If Not value.GetType() Is Type.GetType("IDOT.BIS.BBSStructure") Then
Throw New ArgumentException("value must be of type IDOT.BIS.BBSStructure.", "value")
End If
End Sub 'OnInsert

Protected Overrides Sub OnRemove(ByVal index As Integer, ByVal value As [Object])
If Not value.GetType() Is Type.GetType("IDOT.BIS.BBSStructure") Then
Throw New ArgumentException("value must be of type IDOT.BIS.BBSStructure.", "value")
End If
End Sub 'OnRemove

Protected Overrides Sub OnSet(ByVal index As Integer, ByVal oldValue As [Object], ByVal newValue As [Object])
If Not newValue.GetType() Is Type.GetType("IDOT.BIS.BBSStructure") Then
Throw New ArgumentException("newValue must be of type IDOT.BIS.BBSStructure.", "newValue")
End If
End Sub 'OnSet

Protected Overrides Sub OnValidate(ByVal value As [Object])
If Not value.GetType() Is Type.GetType("IDOT.BIS.BBSStructure") Then
Throw New ArgumentException("value must be of type IDOT.BIS.BBSStructure.")
End If
End Sub 'OnValidate

#End Region

End Class
End Namespace
-------------------------------------------------------------------------------

Code for the web service:
-------------------------------------------------------------------------------
Imports System.Web.Services
Imports IDOT.BIS
Imports IDOT.BIS.BBSStructures
Imports System.Xml.Serialization
Imports Microsoft.ApplicationBlocks.ExceptionManagement

' STUFF FROM VS is not modified

<System.Web.Services.WebService(Namespace:="http://tempuri.org/BISWebServices/BBSStructures";)> _
Public Class BBSStructuresWS
Inherits System.Web.Services.WebService
<WebMethod(), _
XmlInclude(GetType(BBSStructures))> _
Public Function GetStructures(ByVal SN() As String) As BBSStructures
Dim bbsStructures As New BBSStructures
Dim i As Int16
For i = 0 To SN.GetUpperBound(0)
bbsStructures.Add(New BBSStructure(SN(i).Replace("-", "")))
Next
Return bbsStructures
End Function

<WebMethod(), _
XmlInclude(GetType(BBSStructure))> _
Public Function GetStructure(ByVal SN As String) As BBSStructure
Dim bbsStruc As New BBSStructure(SN)
Return bbsStruc
End Function

End Class
-------------------------------------------------------------------------------

Please help.

Thanks
Brad Simon
Reply to this message...
 
    
Dino Chiesa [Microsoft] (VIP)
Binding a datagrid to an array is possible, with a little extra work. You
can:
a. manually create a dataset (or datatable) on the client side, copying
each array item into a row
b. have the service side return a dataset rather than a collection
c. create a wrapper type that exposes Properties, not Fields (Props are
friendly to datagrid)

for c, you can do this manually or dynamically. For an example of the
latter, see http://www.winisp.net/cheeso/examples.aspx#Misc

You also said
> It won't let me do this, as 'BBSStructures' is not defined. I do not want
to import the assembly that has the collection in it, as I need to keep it
as a web service, and not rely on the assembly.

If 'BBSStructures' is in the webservice interface (if it is an input or
output on any of your webmethods), then it will be defined in the generated
client-side proxy. If it is not defined in the generated client-side
proxy then you have no business casting the output of a webservice method
into one of those things.

It is not anathema to import the assembly that defines this collection on
both the client and server side. There is even an article that discusses
this in the Web services section on MSDN; the article is entitled "Sharing
Types" [1]. Keep in mind though if you do this you are potentially
reducing the interoperability of your service - any client that is not .NET
is not going to be able to use the shared assembly. This may or may not be
important to you.

-Dino

[1]
http://msdn.microsoft.com/library/en-us/dnservice/html/service07162002.asp

"Brad Simon" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
> What am I doing wrong? I have been working on this for many days, and I
am almost there. I have a collection of structures, that work great when
working directly with a Winform Application. They even work great in a web
service, it is when I try to get the returned collection into a proper
collection. I am not sure how much sense that makes. Here is the code I
have:
> --------------------------------------------------------------------------
-----
[Original message clipped]

collection into a variable that is the same colletion, so I can iterate
through it, and bind a datagrid with it. What I want to do is:
> --------------------------------------------------------------------------
-----
[Original message clipped]

as a web service, and not rely on the assembly.
[Original message clipped]

s/BBSStructures")> _
[Original message clipped]

Reply to this message...
 
    
Brad Simon
Thanks Dino,

I want to completely stay away from dataset with this. I want the collection to be returned to a variable holding collection, and not an array.

You said:
If 'BBSStructures' is in the webservice interface (if it is an input or
output on any of your webmethods), then it will be defined in the generated
client-side proxy. If it is not defined in the generated client-side
proxy then you have no business casting the output of a webservice method
into one of those things.

Looking at the code I have posted, the Collection is in the same assembly as the element, so I ASSUME it is coming across and should be generated in the client side proxy, but obviously it is not. If what I am wanting to do is elementary, then what did I miss? I read throught the MS article, and it didn't really help me out.

If what I want means jumping through firey hoops, then I will deal with using arrays, but that is not a favorable option.

Thanks again, I appreciate your help.

Brad Simon
Reply to this message...
 
    
Dino Chiesa [Microsoft] (VIP)
I don't quite get it.

> Looking at the code I have posted, the Collection is in the same assembly
as the element, so I ASSUME it is coming across and should be generated in
the client side proxy, but obviously it is not.

A type will be generated in the client-side proxy if and only if that type
is exposed in the web service interface, the WSDL. A type will not appear
in the client-side proxy just because it is in an assembly used by the
service.

Look, If your webservice is like this:

<%@ WebService Language="VB" Class="MyService" %>
Public Class MyService : Inherits System.Web.Services.WebService
<WebMethod>_
Public Function DoSomething() As MyType
Dim foo as MyOtherType
....
End Function
End Class

....then MyType will show up in the WSDL (and in the client-side proxy),
but MyOtherType will not.

If MyType includes a public member of a complex type, then that type, too,
will be included in the WSDL.

-Dino

Reply to this message...
 
    
Brad Simon
Ok, that is exactly what I am saying, I don't get it, either. Here is my method in the web service I am trying to use:

-------------------------------------------------------------------------------
<WebMethod(), _
XmlInclude(GetType(BBSStructures))> _
Public Function GetStructures(ByVal SN() As String) As BBSStructures
Dim bbsStructures As New BBSStructures
Dim i As Int16
For i = 0 To SN.GetUpperBound(0)
bbsStructures.Add(New BBSStructure(SN(i).Replace("-", "")))
Next
Return bbsStructures
End Function
-------------------------------------------------------------------------------

It returns the collection. The problem is in the windows app code when I try to store those results in a BBSStructures collection, that is when I get the 'BBSStructures' is not defined issue, and the code won't compile. The following code is from the winform app:

This works (uses array):
-------------------------------------------------------------------------------
Dim objWS As New BBSStructuresWS
Dim Struc() As BBSStructure
Dim strArray() As String = {"0010002", "0010003", "0010019"}

objWS.Credentials = System.Net.CredentialCache.DefaultCredentials
Struc = objWS.GetStructures(strArray)
-------------------------------------------------------------------------------

This doesn't (uses collection):
-------------------------------------------------------------------------------
Dim objWS As New BBSStructuresWS
Dim Struc As BBSStructures '-- note the 's' at the end
Dim strArray() As String = {"0010002", "0010003", "0010019"}

objWS.Credentials = System.Net.CredentialCache.DefaultCredentials
Struc = objWS.GetStructures(strArray)
-------------------------------------------------------------------------------

Brad Simon
Reply to this message...
 
    
Dino Chiesa [Microsoft] (VIP)
ok, then can I see? ...
the wsdl
the generated client-side proxy?

The GetStructures call - I guess you are modifying it in between those two
client side code examples?
Why don't you have (for testing purposes) GetStructuresArray and
GetStructures ?

Is there a BBSStructures that appears in the client-side proxy?

-D

"Brad Simon" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
> Ok, that is exactly what I am saying, I don't get it, either. Here is my
method in the web service I am trying to use:
[Original message clipped]

the 'BBSStructures' is not defined issue, and the code won't compile. The
following code is from the winform app:
[Original message clipped]

Reply to this message...
 
    
Brad Simon
All of the code is at the end of this message, and in a following message.

I have not touched the proxy generated code. No, the BBSStructures does not show up at all. I just didn't do the different functions, I didn't think it was going to be this much of a pain, besides, the code won't compile with the BBSStructures in there.

Proxy code:
Namespace StructuresWS

'<remarks/><System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="BBSStructuresWSSoap", [Namespace]:="http://idotweb/BISWebServices/BBSStructures";), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(Inspection))> _
Public Class BBSStructuresWS
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol

'<remarks/>
Public Sub New()
MyBase.New
Me.Url = "http://localhost/BISWebServices/BBSStructuresWS.asmx";
End Sub

'<remarks/><System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://idotweb/BISWebServices/BBSStructures/GetStructures";, RequestNamespace:="http://idotweb/BISWebServices/BBSStructures";, ResponseNamespace:="http://idotweb/BISWebServices/BBSStructures";, Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetStructures(ByVal SN() As String) As BBSStructure()
Dim results() As Object = Me.Invoke("GetStructures", New Object() {SN})
Return CType(results(0),BBSStructure())
End Function

'<remarks/>
Public Function BeginGetStructures(ByVal SN() As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("GetStructures", New Object() {SN}, callback, asyncState)
End Function

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

'<remarks/><System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://idotweb/BISWebServices/BBSStructures/GetStructure";, RequestNamespace:="http://idotweb/BISWebServices/BBSStructures";, ResponseNamespace:="http://idotweb/BISWebServices/BBSStructures";, Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetStructure(ByVal SN As String) As BBSStructure
Dim results() As Object = Me.Invoke("GetStructure", New Object() {SN})
Return CType(results(0),BBSStructure)
End Function

'<remarks/>
Public Function BeginGetStructure(ByVal SN As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("GetStructure", New Object() {SN}, callback, asyncState)
End Function

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

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class BBSStructure

'<remarks/>
Public StructureNumber As String

'<remarks/>
Public District As String

'<remarks/>
Public Location As String

'<remarks/>
Public FacilityCarried As String

'<remarks/>
Public FacilityCrossed As String

'<remarks/>
Public BridgeName As String

'<remarks/>
Public NumberOfSpans As String

'<remarks/>
Public NumberOfApprSpans As String

'<remarks/>
Public SkewAngle As String

'<remarks/>
Public AADTOn As String

'<remarks/>
Public AADTTruckPct As String

'<remarks/>
Public ADTUn As String

'<remarks/>
Public LastELI As ElementLevelInspection

'<remarks/>
Public LastNBI As NBIInspection

'<remarks/>
Public LastSpecFeatInsp As SpecialFeatureInspection

'<remarks/>
Public LastFCInsp As FractureCriticalInspection

'<remarks/>
Public LastUSInsp As UnderWaterInspection
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class ElementLevelInspection
Inherits Inspection
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(NBIInspection)), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(SpecialFeatureInspection)), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(FractureCriticalInspection)), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(UnderWaterInspection)), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(ElementLevelInspection))> _
Public MustInherit Class Inspection

'<remarks/>
Public StructureNumber As String

'<remarks/>
Public InspectionDate As Date

'<remarks/>
Public Temperature As String

'<remarks/>
Public Remarks As String

'<remarks/>
Public TimeToInspect As String

'<remarks/>
Public TrafficControl As String

'<remarks/>
Public Waders As String

'<remarks/>
Public Boat As String

'<remarks/>
Public Snooper As String

'<remarks/>
Public Ladder As String

'<remarks/>
Public Manlift As String

'<remarks/>
Public Other As String
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class NBIInspection
Inherits Inspection

'<remarks/>
Public DeckCondition As String

'<remarks/>
Public SuperStructureCondition As String

'<remarks/>
Public SubStructureCondition As String

'<remarks/>
Public CulvertCondition As String

'<remarks/>
Public ChannelCondition As String

'<remarks/>
Public WaterwayAdequacy As String

'<remarks/>
Public ApproachRdwyAlign As String

'<remarks/>
Public PierNavigProtection As String

'<remarks/>
Public BridegRailwayAdeq As String

'<remarks/>
Public ApprGuardAdeqTransitions As String

'<remarks/>
Public ApprGuardAdeqGuardrail As String

'<remarks/>
Public ApprGuardAdeqEnds As String

'<remarks/>
Public WearingSurfaceType As String

'<remarks/>
Public TotalDeckThickness As Short

'<remarks/>
Public TypeOfMembrane As String

'<remarks/>
Public DeckProtection As String

'<remarks/>
Public PaintDate As String

'<remarks/>
Public PaintSystems As String

'<remarks/>
Public UtilitiesAttached As String

'<remarks/>
Public DetailRemarks As String
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class SpecialFeatureInspection
Inherits Inspection
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class FractureCriticalInspection
Inherits Inspection
End Class

'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://idotweb/BISWebServices/BBSStructures";)> _
Public Class UnderWaterInspection
Inherits Inspection
End Class
End Namespace
Reply to this message...
 
    
Dino Chiesa [Microsoft] (VIP)
According to the WSDL you sent , the GetStructures call returns an array of
BBSStructure . (Not a type called BBSStructures).
And this is consistent with the proxy-generated code you have below.
So it seems like your expectations are off somehow?

It might be easier to examine the differences between returning an array and
returning a structure if you have a single ASMX implementation that exposes
different methods that do both.

Attached is a modified version of the WSDL you sent. It includes 2 versions
of the GetStructures call. The first (original) returns an array. the 2nd
one (called GetStructures2) returns a struct (I called it BBSStructures)
that contains an array.

To generate the server-side abstract implementation of this thing, run this
command:
wsdl.exe /server /language:vb Service-Modified.wsdl

The BBSStructure type is defined in that server-side skeleton.

If I also generate a client-side proxy from the same WSDL, I can see that
the BBSStructures type is defined in that proxy.

-D

--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ OmitThis . m i c r o s o f t . c o m

"Brad Simon" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

think it was going to be this much of a pain, besides, the code won't
compile with the BBSStructures in there.
[Original message clipped]

[Namespace]:="http://idotweb/BISWebServices/BBSStructures"), _
[Original message clipped]

//idotweb/BISWebServices/BBSStructures/GetStructures",
RequestNamespace:="http://idotweb/BISWebServices/BBSStructures",
ResponseNamespace:="http://idotweb/BISWebServices/BBSStructures",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
> Public Function GetStructures(ByVal SN() As String) As
BBSStructure()
> Dim results() As Object = Me.Invoke("GetStructures", New
Object() {SN})
[Original message clipped]

System.IAsyncResult
> Return Me.BeginInvoke("GetStructures", New Object() {SN},
callback, asyncState)
[Original message clipped]

//idotweb/BISWebServices/BBSStructures/GetStructure",
RequestNamespace:="http://idotweb/BISWebServices/BBSStructures",
ResponseNamespace:="http://idotweb/BISWebServices/BBSStructures",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
[Original message clipped]

System.IAsyncResult
> Return Me.BeginInvoke("GetStructure", New Object() {SN},
callback, asyncState)
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures"), _
> System.Xml.Serialization.XmlIncludeAttribute(GetType(NBIInspection)),
_
>
System.Xml.Serialization.XmlIncludeAttribute(GetType(SpecialFeatureInspectio
n)), _
>
System.Xml.Serialization.XmlIncludeAttribute(GetType(FractureCriticalInspect
ion)), _
>
System.Xml.Serialization.XmlIncludeAttribute(GetType(UnderWaterInspection)),
_
>
System.Xml.Serialization.XmlIncludeAttribute(GetType(ElementLevelInspection)
)> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

dotweb/BISWebServices/BBSStructures")> _
[Original message clipped]

Reply to this message...
 
    
Brad Simon
Thanks Dino for all of your hard work on this.

I will have to work on it next week. I am sure this will give me what I need.

Have a great weekend.
Reply to this message...
 
    
Brad Simon
Hi Dino,

I finally had a chance to get back to this. In reply to:
------
According to the WSDL you sent , the GetStructures call returns an array of
BBSStructure . (Not a type called BBSStructures).
And this is consistent with the proxy-generated code you have below.
So it seems like your expectations are off somehow?

I don't see why it would return an array, when I test it as a web service (not calling it from an application), it returns exactly what I want. When I call it from an application, it does not. My expectation is to get what I see when I test it as a web service.

I have been looking for the code you said was attached:

Attached is a modified version of the WSDL you sent. It includes 2 versions
of the GetStructures call. The first (original) returns an array. the 2nd
one (called GetStructures2) returns a struct (I called it BBSStructures)
that contains an array.

I don't see any of that code. I am lost as to why it just doesn't work like it should. I feel that this is wasting our time on something that should just work. I really feel that it is something very simple that neither one of us is seeing.

--
Thanks,
Brad Simon

Reply to this message...
 
    
Brad Simon
WSDL:
<?xml version="1.0" encoding="utf-8"?><definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://idotweb/BISWebServices/BBSStructures"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; targetNamespace="http://idotweb/BISWebServices/BBSStructures"; xmlns="http://schemas.xmlsoap.org/wsdl/";><types><s:schema elementFormDefault="qualified" targetNamespace="http://idotweb/BISWebServices/BBSStructures";><s:element name="GetStructures"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="SN" type="s0:ArrayOfString" /></s:sequence></s:complexType></s:element><s:complexType name="ArrayOfString"><s:sequence><s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" /></s:sequence></s:complexType><s:element name="GetStructuresResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="GetStructuresResult" type="s0:ArrayOfBBSStructure" /></s:sequence></s:complexType></s:element><s:complexType name="ArrayOfBBSStructure"><s:sequence><s:element minOccurs="0" maxOccurs="unbounded" name="BBSStructure" nillable="true" type="s0:BBSStructure" /></s:sequence></s:complexType><s:complexType name="BBSStructure"><s:sequence><s:element minOccurs="0" maxOccurs="1" name="StructureNumber" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="District" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Location" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="FacilityCarried" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="FacilityCrossed" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="BridgeName" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="NumberOfSpans" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="NumberOfApprSpans" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="SkewAngle" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="AADTOn" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="AADTTruckPct" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ADTUn" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="LastELI" type="s0:ElementLevelInspection" /><s:element minOccurs="0" maxOccurs="1" name="LastNBI" type="s0:NBIInspection" /><s:element minOccurs="0" maxOccurs="1" name="LastSpecFeatInsp" type="s0:SpecialFeatureInspection" /><s:element minOccurs="0" maxOccurs="1" name="LastFCInsp" type="s0:FractureCriticalInspection" /><s:element minOccurs="0" maxOccurs="1" name="LastUSInsp" type="s0:UnderWaterInspection" /></s:sequence></s:complexType><s:complexType name="ElementLevelInspection"><s:complexContent mixed="false"><s:extension base="s0:Inspection" /></s:complexContent></s:complexType><s:complexType name="Inspection" abstract="true"><s:sequence><s:element minOccurs="0" maxOccurs="1" name="StructureNumber" type="s:string" /><s:element minOccurs="1" maxOccurs="1" name="InspectionDate" type="s:dateTime" /><s:element minOccurs="0" maxOccurs="1" name="Temperature" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Remarks" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="TimeToInspect" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="TrafficControl" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Waders" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Boat" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Snooper" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Ladder" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Manlift" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="Other" type="s:string" /></s:sequence></s:complexType><s:complexType name="UnderWaterInspection"><s:complexContent mixed="false"><s:extension base="s0:Inspection" /></s:complexContent></s:complexType><s:complexType name="FractureCriticalInspection"><s:complexContent mixed="false"><s:extension base="s0:Inspection" /></s:complexContent></s:complexType><s:complexType name="SpecialFeatureInspection"><s:complexContent mixed="false"><s:extension base="s0:Inspection" /></s:complexContent></s:complexType><s:complexType name="NBIInspection"><s:complexContent mixed="false"><s:extension base="s0:Inspection"><s:sequence><s:element minOccurs="0" maxOccurs="1" name="DeckCondition" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="SuperStructureCondition" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="SubStructureCondition" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="CulvertCondition" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ChannelCondition" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="WaterwayAdequacy" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ApproachRdwyAlign" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="PierNavigProtection" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="BridegRailwayAdeq" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ApprGuardAdeqTransitions" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ApprGuardAdeqGuardrail" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="ApprGuardAdeqEnds" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="WearingSurfaceType" type="s:string" /><s:element minOccurs="1" maxOccurs="1" name="TotalDeckThickness" type="s:short" /><s:element minOccurs="0" maxOccurs="1" name="TypeOfMembrane" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="DeckProtection" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="PaintDate" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="PaintSystems" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="UtilitiesAttached" type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="DetailRemarks" type="s:string" /></s:sequence></s:extension></s:complexContent></s:complexType><s:element name="GetStructure"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="SN" type="s:string" /></s:sequence></s:complexType></s:element><s:element name="GetStructureResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="GetStructureResult" type="s0:BBSStructure" /></s:sequence></s:complexType></s:element></s:schema></types><message name="GetStructuresSoapIn"><part name="parameters" element="s0:GetStructures" /></message><message name="GetStructuresSoapOut"><part name="parameters" element="s0:GetStructuresResponse" /></message><message name="GetStructureSoapIn"><part name="parameters" element="s0:GetStructure" /></message><message name="GetStructureSoapOut"><part name="parameters" element="s0:GetStructureResponse" /></message><portType name="BBSStructuresWSSoap"><operation name="GetStructures"><input message="s0:GetStructuresSoapIn" /><output message="s0:GetStructuresSoapOut" /></operation><operation name="GetStructure"><input message="s0:GetStructureSoapIn" /><output message="s0:GetStructureSoapOut" /></operation></portType><binding name="BBSStructuresWSSoap" type="s0:BBSStructuresWSSoap"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"; style="document" /><operation name="GetStructures"><soap:operation soapAction="http://idotweb/BISWebServices/BBSStructures/GetStructures"; style="document" /><input><soap:body use="literal" /></input><output><soap:body use="literal" /></output></operation><operation name="GetStructure"><soap:operation soapAction="http://idotweb/BISWebServices/BBSStructures/GetStructure"; style="document" /><input><soap:body use="literal" /></input><output><soap:body use="literal" /></output></operation></binding><service name="BBSStructuresWS"><port name="BBSStructuresWSSoap" binding="s0:BBSStructuresWSSoap"><soap:address location="http://localhost/BISWebServices/BBSStructuresWS.asmx"; /></port></service></definitions>
Reply to this message...
 
 
System.ArgumentException
System.AsyncCallback
System.Collections.CollectionBase
System.ComponentModel.DesignerCategoryAttribute
System.Data.SqlClient.SqlDataReader
System.Diagnostics.DebuggerStepThroughAttribute
System.IAsyncResult
System.Net.CredentialCache
System.Type
System.Web.Services.Description.SoapBindingUse
System.Web.Services.Protocols.SoapDocumentMethodAttribute
System.Web.Services.Protocols.SoapHttpClientProtocol
System.Web.Services.Protocols.SoapParameterStyle
System.Web.Services.WebService
System.Web.Services.WebServiceBindingAttribute
System.Web.UI.MobileControls.List
System.Xml.Serialization.XmlIncludeAttribute
System.Xml.Serialization.XmlTypeAttribute




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com