Dino Chiesa [Microsoft]
6/4/2004 3:04:00 PM
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" <anonymous@discussions.microsoft.com> wrote in message
news:962996BF-4B2D-4B0E-9B1E-12C1EECDAE13@microsoft.com...
> 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://i
dotweb/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://i
dotweb/BISWebServices/BBSStructures")> _
> Public Class ElementLevelInspection
> Inherits Inspection
> End Class
>
>
'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://i
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)
)> _
> 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://i
dotweb/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://i
dotweb/BISWebServices/BBSStructures")> _
> Public Class SpecialFeatureInspection
> Inherits Inspection
> End Class
>
>
'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://i
dotweb/BISWebServices/BBSStructures")> _
> Public Class FractureCriticalInspection
> Inherits Inspection
> End Class
>
>
'<remarks/><System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://i
dotweb/BISWebServices/BBSStructures")> _
> Public Class UnderWaterInspection
> Inherits Inspection
> End Class
> End Namespace