Hi,
I am integrating our website with ByD, as part of initial integration test I have a piece of code below that tries to get Product information by internal ID. I am new to SAP ByD, we have a ByD plugin "E-commerce Web Shop Integration" already setup and all the WSDL from plugin are referenced in a VB.NET web application. The web service 'QueryServiceProductIn' is referenced under the name space 'SAPByDesignProductService' in the web application. But the code is not returning any service products, can someone please guide me on what I am doing wrong? Any other example in VB.NET will be appreciated.
Dim product As New SAPByDesignProductService.QueryServiceProductInClient
product.ClientCredentials.UserName.UserName = "XXXXXXX"
product.ClientCredentials.UserName.Password = "XXXXXXXX"
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 = "xyz"
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)
Trace.Write("Name", item.Description.ToString)
Next
Else
Trace.Write("Not Found")
End If
product.Close()
Regards,
Ajitpal