Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8902

Issue in consuming webservice using VB.NET

$
0
0

I am trying to find Product by ID through the webservice. As a preface I have the WSDL referenced inside my project and have the following code running

Dim product As New SAPByDesignProductService.QueryServiceProductInClient
product.ClientCredentials.UserName.UserName = "XXXXXX"
product.ClientCredentials.UserName.Password = "XXXXX"
product.Open()
Dim productMS As New SAPByDesignProductService.ServiceProductByElementsQueryMessage_sync            productMS.ServiceProductSelectionByElements = New SAPByDesignProductService.ServiceProductByElementsQuerySelectionByElements            Dim arrProductSelectionById(1) As SAPByDesignProductService.ServiceProductByElementsQuerySelectionByInternalID            arrProductSelectionById(0) = New SAPByDesignProductService.ServiceProductByElementsQuerySelectionByInternalID            arrProductSelectionById(0).InclusionExclusionCode = "I"            arrProductSelectionById(0).IntervalBoundaryTypeCode = "1"            arrProductSelectionById(0).LowerBoundaryInternalID.Value = "BATTERSEA100015" productMS.ServiceProductSelectionByElements.SelectionByInternalID = arrProductSelectionById            productMS.ProcessingConditions = New SAPByDesignProductService.QueryProcessingConditions            productMS.ProcessingConditions.QueryHitsMaximumNumberValueSpecified = False            productMS.ProcessingConditions.QueryHitsUnlimitedIndicator = True            Dim response As New SAPByDesignProductService.ServiceProductByElementsResponseMessage_sync            response = product.FindByElements(productMS)            If Not IsNothing(response.ServiceProduct) Then                For Each item In response.ServiceProduct                    Trace.Write("InternalId", item.InternalID.ToString)                    If Not IsNothing(item.Description) Then                        Trace.Write("Name", item.Description.ToString)                    End If                Next            Else                Trace.Write("Not Found")            End If


Viewing all articles
Browse latest Browse all 8902

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>