I'm in a one deep position and really coulld use some help with this issue. I'm consuming webservice and this WSDL is driving me nuts.
Here's the WSDL https://www.estes-express.com/tools/...teService?wsdl
I'm having a problem creating the FullCommditiesType(), commodity and associated FullCommodityType().
I want to ship 2 pallets of freight.
#1
weight 530
Class 60
Description Books
#2
weight 245
Class 65
Description Magazines
Below is a screenshot of the reference.vb (svcmap)
Here's the code I've tried. It keeps failing at the "With mycommodity.commodity(1)". Says I didnt create the object.
The freight loads are supposed to be put into an array and passed to the myrequest.item which is an object.
I can't seem to resolve how to create the array correctly.
Thanks in advance
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 = ("myuser") .password = ("myPWD") End With With myrequest .account = ("xxxxxx") .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 **** Fails Dim mycommodity As New wsdl_estes.FullCommoditiesType() With mycommodity.commodity(1) .class = 60 .weight = ("450") .description = "Used Books" End With myrequest.item = ???? The array holding the commodities




Reply With Quote
