| | |
VB.NET Soap Method Not Exposed
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Feb 2008
Posts: 1
Reputation:
Solved Threads: 0
I am writting a program that communicates with Amazon Seller services. One of the tasks involved is the uploading and downloading of XML documents containting order information. Below is the example source code provided by Amazon for vb.net. I finally got most of the code working, but I am stuck on one issue. A method is not exposed that should be. The Attachments method is not available for the RequestSoapContext method. I am at a loss as to why this might be the case. Unfortunately the documentation and support from Amazon is pretty much nonexisting. There was a post regarding this on the Amazon Developer Forum, but it did not fix my problem. They post stated that the issue was with Web Services 2.0 not being installed correctly. They suggested that I uninstall Web Services 2.0 and reinstall selecting the Developer option. This didn't corrrect the problem. Below is the sample code that I'm trying to get to work. Any help or ideas in this would GREATLY be appreciated. This is my first Soap project so I'm kinda at a loss as to what could be causing my problem of the Attachment method not getting exposed.
WSDL=http://sellercentral.amazon.com/help/merchant_documents/WSDL/merchant-interface-dime-dotnet.wsdl
Dim merchant As New com.amazon.sellercentral.Merchant
merchant.merchantIdentifier = "<my merchant id>"
merchant.merchantName = "<my merchant name>"
Dim mi As New com.amazon.sellercentral.merchantinterfacedimeWse
mi.Url = "http://merchant-api.amazon.com/gateway/merchant-interface-dime/"
Dim networkCreds As New System.Net.NetworkCredential
networkCreds.UserName = "<username>"
networkCreds.Password = "<password>"
mi.Credentials = networkCreds
mi.PreAuthenticate = True
Dim theAttachement As New DimeAttachment("text/xml", TypeFormat.MediaType, File.OpenRead("c:\mike.txt"))
theAttachement.Id = Guid.NewGuid().ToString
Dim theDoc As New com.amazon.sellercentral.ReferencedBinary
theDoc.location = theAttachement.Id
mi.RequestSoapContext.Attachments.Add(theAttachment) <--- the attachment method is not exposed
Dim theResponse As com.amazon.sellercentral.DocumentSubmissionResponse = mi.postDocument(merchant, "_POST_PRODUCT_DATA_", theDoc)
MsgBox(theResponse.documentTransactionID)
Thanks,
Mike Kelley
mike@mikekelleyconsulting.com
WSDL=http://sellercentral.amazon.com/help/merchant_documents/WSDL/merchant-interface-dime-dotnet.wsdl
Dim merchant As New com.amazon.sellercentral.Merchant
merchant.merchantIdentifier = "<my merchant id>"
merchant.merchantName = "<my merchant name>"
Dim mi As New com.amazon.sellercentral.merchantinterfacedimeWse
mi.Url = "http://merchant-api.amazon.com/gateway/merchant-interface-dime/"
Dim networkCreds As New System.Net.NetworkCredential
networkCreds.UserName = "<username>"
networkCreds.Password = "<password>"
mi.Credentials = networkCreds
mi.PreAuthenticate = True
Dim theAttachement As New DimeAttachment("text/xml", TypeFormat.MediaType, File.OpenRead("c:\mike.txt"))
theAttachement.Id = Guid.NewGuid().ToString
Dim theDoc As New com.amazon.sellercentral.ReferencedBinary
theDoc.location = theAttachement.Id
mi.RequestSoapContext.Attachments.Add(theAttachment) <--- the attachment method is not exposed
Dim theResponse As com.amazon.sellercentral.DocumentSubmissionResponse = mi.postDocument(merchant, "_POST_PRODUCT_DATA_", theDoc)
MsgBox(theResponse.documentTransactionID)
Thanks,
Mike Kelley
mike@mikekelleyconsulting.com
![]() |
Other Threads in the VB.NET Forum
| Thread Tools | Search this Thread |
.net .net2005 .net2008 30minutes 2005 2008 access account arithmetic array basic browser button buttons center check code component connectionstring crystalreport cuesent data database databasesearch datagrid datagridview date datetimepicker design dissertation dissertations dissertationthesis dissertationtopic dropdownlist excel fade file-dialog filter folder ftp generatetags hardcopy image images input insert intel math monitor net networking opacity output panel passingparameters peertopeervideostreaming picturebox picturebox1 port printing problem problemwithinstallation project reports" savedialog searchvb.net select serial settings shutdown string survey tcp temperature text textbox timer timespan toolbox transparency trim updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





