Do I need the sandbox WSDL files?
Hi!
Is it possible to generate Java code from theproduction WSDL files, and then just change
the SOAP endpoint address to access thesandbox instead? Something along this line:
AdministrationLocator locator = new AdministrationLocator();
if (sandbox) {
String newAddress = "a sandbox admin URI";
locator.setAdministrationSoapEndpointAddress(newAddress);
}
If so, what would thenewAddress be in the code example above?
Also, what is the recommended way to get support? This forum, or email to
msnacapi@microsoft.com?
Best regards,
Mats Henricson
Keybroker, Stockholm, Sweden
Thanks for your reply. Question:
Is it:
setHeader("...", "ApiUserAuthHeader", xxxxx)Or:
setHeader("...", "authHdr", xxxxx)
Mats
Also, have a look at this typical call:
getAdministrationSoap(new URL(administrationUrl))Should the URL passed into that function end with "?wsdl" or not?
In your example above, you have "?wsdl" at the end, but in your
hello world Java example, you do not:
http://msdn2.microsoft.com/en-us/library/bb267274.aspxThese kind of discrepances are quite confusing and wastes lots of time.
Mats
Mats,
I might recommend getting the sample code working first, which is at
http://msdn2.microsoft.com/en-us/library/bb267274.aspx
In the following line, taken from MSDN, authHdr is a variable:
ApiUserAuthHeader authHdr = new ApiUserAuthHeader();
In the following line, "ApiUserAuthHeader" refers to the SOAP element name:
((AdministrationSoapStub) myAdministration).setHeader("http://adcenter.microsoft.com/syncapis", "ApiUserAuthHeader", myApiUserAuthHeader);
Sorry for the confusion.
Jeff Dillon, Microsoft adCenter API Technical Support
Mats,
Either way works. I tested from the NetBeans 5.5 IDE. I might recommend testing with a small program that calls one of the wsdl files. Then you could implement A/B testing, and in this case, I was able to compare in seconds. Apologies if this was confusing, I was attempting to demonstrate that either way works.
Did you receive errors with one of the formats?
Jeff Dillon, Microsoft adCenter API Technical Support
It occurred to me after I posted the previous reply that A/B testing only works if you have working code! If not, then these type of potential discrepencies are just another variable to test, which could be time consuming. Are you getting compile or runtime errors? Also, feel free to open a support ticket with our API group here. For instructions on opening a ticket, contact your Microsoft representative (usually the one who created your API login), or post your email address here, and someone will contact you.
Jeff Dillon, Microsoft adCenter API Technical Support
Ah, sorry. Must have been sleeping at the wheel there.
But I've never got the hello world example working. I get this error:
stackTrace
erver was unable to process request. > |-400001|-1|API unauthorized access| It has been like this for 3-4 weeks now, with very little response from my contact
in Ireland. Finally they told me "that there are some problems with your current
Sandbox credentials", and I got a new set of credentials. But the result is the same.
Mats
That means your code is working correctly but your username has not been activated, and easy to fix. Ideally you would have received the activation email. Perhaps look in your Junk mail folder? Please contact your Microsoft representative to have them contact API support, or go ahead and create a support ticket yourself, or post your email here and someone will contact you.Jeff Dillon, Microsoft adCenter API Technical Support
Last night I got a new set of credentials, and hello world works now.
Thanks a lot!
Mats