T
Thomas Nelson
I'm trying to participate in a bidding agent competition (see
http://www.biddingagentcompetition.com/ if you're curious). The basic
idea is to write a program that will periodically upload new bids on
items and ask for reports on how it's doing. The API is an XML-based
web service that uses the Simple Object Access (SOAP) protocol. I've
never tried to use SOAP before, and one reference recommended Apache
Axis. I'm pretty familiar with Java, so this seems like a good idea.
But I'm not sure what to do with this .wsdl file I've been given. The
instructions say:
"""
To set up the MSN adCenter API so you can begin programming:
Obtain the adcenterapi.wsdl file.
Open a project in your development environment.
Add the MSN AdCenterAPI URL as the new web reference.
Instantiate the AdCenterAPI class:
AdCenterAPI pAPI = new AdCenterAPI();
m_api.Credentials = System.Net.CredentialCache.DefaultCredentials;
Create APIUserAuthHeader to authenticate against the web server as
shown in the following code sample:
ApiUserAuthHeader pAuth = new ApiUserAuthHeader ();
pAuth.UserName = "APIUser2703241601"; //this is just an example
pAuth.Password = "password"; //this is just an example
pAuth.UserAccessKey = "1YEKTSET23"; //this is just an example
pAPI.ApiUserAuthHeaderValue = pAuth;
"""
Now, unless I'm confused, Axis is not a development environment. A
development environment is something like NetBeans or JCreator. Where
does Axis come into play in this? Perhaps it's on the server side, and
I don't need to worry about it? What does it mean to add a URL as a
web reference? Maybe this means javac needs to be able to find the xml
file to compile the code properly?
If anyone can point me in the right direction with these things, I'd be
very grateful. Thanks,
THN
http://www.biddingagentcompetition.com/ if you're curious). The basic
idea is to write a program that will periodically upload new bids on
items and ask for reports on how it's doing. The API is an XML-based
web service that uses the Simple Object Access (SOAP) protocol. I've
never tried to use SOAP before, and one reference recommended Apache
Axis. I'm pretty familiar with Java, so this seems like a good idea.
But I'm not sure what to do with this .wsdl file I've been given. The
instructions say:
"""
To set up the MSN adCenter API so you can begin programming:
Obtain the adcenterapi.wsdl file.
Open a project in your development environment.
Add the MSN AdCenterAPI URL as the new web reference.
Instantiate the AdCenterAPI class:
AdCenterAPI pAPI = new AdCenterAPI();
m_api.Credentials = System.Net.CredentialCache.DefaultCredentials;
Create APIUserAuthHeader to authenticate against the web server as
shown in the following code sample:
ApiUserAuthHeader pAuth = new ApiUserAuthHeader ();
pAuth.UserName = "APIUser2703241601"; //this is just an example
pAuth.Password = "password"; //this is just an example
pAuth.UserAccessKey = "1YEKTSET23"; //this is just an example
pAPI.ApiUserAuthHeaderValue = pAuth;
"""
Now, unless I'm confused, Axis is not a development environment. A
development environment is something like NetBeans or JCreator. Where
does Axis come into play in this? Perhaps it's on the server side, and
I don't need to worry about it? What does it mean to add a URL as a
web reference? Maybe this means javac needs to be able to find the xml
file to compile the code properly?
If anyone can point me in the right direction with these things, I'd be
very grateful. Thanks,
THN