HI,
I'm trying to get away from stringbuilder SOAP requests and converting to using a WSDL document. Really trying to learn
I'm using a WSDL located at: WSDL
I'm making a rate request for freight. I have 2 commodity loads as follow
commoditiy #1
.class = 60
.weight = ("560")
.description= ("Books")
commoditiy #2
.class = 65
.weight = ("230")
.ddescription= ("Used Books")
I'm supposed to use FullCommoditiesType in the rate request itself.
The commodities are passed into an object termed "Item" which is part of the raterequest.
I'm having issues with assignment of the commodities to and array and passing it into the myrequest.item
I see in the FullCommoditiesType the "commodity" as FullCommodityType but can't get my head wrapped around how to construct the commodities into and array and pass it into the FullCommoditiesType.
I've been stuck on this for a long time (hours and hours) and would appreciate any help at all. I've googled lots of how to consume a WSDL and watch video's etc.
Thanks in advance
-dan
Right now I have
I'm trying to get away from stringbuilder SOAP requests and converting to using a WSDL document. Really trying to learn
I'm using a WSDL located at: WSDL
I'm making a rate request for freight. I have 2 commodity loads as follow
commoditiy #1
.class = 60
.weight = ("560")
.description= ("Books")
commoditiy #2
.class = 65
.weight = ("230")
.ddescription= ("Used Books")
I'm supposed to use FullCommoditiesType in the rate request itself.
The commodities are passed into an object termed "Item" which is part of the raterequest.
I'm having issues with assignment of the commodities to and array and passing it into the myrequest.item
I see in the FullCommoditiesType the "commodity" as FullCommodityType but can't get my head wrapped around how to construct the commodities into and array and pass it into the FullCommoditiesType.
I've been stuck on this for a long time (hours and hours) and would appreciate any help at all. I've googled lots of how to consume a WSDL and watch video's etc.
Thanks in advance
-dan
Right now I have
Code:
Dim myAuthorize As New wsdl_estes.AuthenticationType
Dim myrequest As New wsdl_estes.rateRequest()
Dim EstesRates As ratingPortTypeClient = New ratingPortTypeClient
Dim pickup As New wsdl_estes.PointType
Dim delivery As New wsdl_estes.PointType
With myAuthorize
.user = ("lbmay")
.password = ("PW4estes!")
End With
With myrequest
.account = ("7451400")
.payor = ("S")
.terms = ("P")
End With
With pickup
.city = ("Knoxville")
.stateProvince = ("TN")
.postalCode = ("37918")
.countryCode = ("USA")
End With
With delivery
.city = ("Knoxville")
.stateProvince = ("TN")
.postalCode = ("37918")
.countryCode = ("USA")
End With
myrequest.originPoint = pickup
myrequest.destinationPoint = delivery
Dim loaddata As New wsdl_estes.FullCommoditiesType()
Dim myload1 As New FullCommodityType
With myload1
.class = (60)
.weight = ("350")
.description = ("Used Books-Magazines")
.pieces = ("1")
.pieceType = PackagingType.SK
End With
myrequest.Item = myload1
Dim MyResponse As rateQuote = Nothing
MyResponse = EstesRates.getQuote(myAuthorize, myrequest)
End Sub