I want to find useful web services and access them from a web application.
I do not care about all the different ways that web services can be implemented
or the history and development of web services over time. I want to be able
to consume a web service from a web application with as little coding as possible.
My first thought is to be able to access a web service for a shipping company. I
will see if there are web services for UPS, FedEx and DHL.
I found a site for developers that want to incorporate FedEx services: http://fedex.com/us/developer/index.html. A similar site for UPS is https://www.ups.com/upsdeveloperkit. DHL offers this site: http://www.dhl.com/en/express/resource_center/integrated_shipping_solutions.html.
I had difficulty finding the WSDL address for FedEx. I found the following for UPS: https://www.ups.com/e_comm_access/laServ?CURRENT_PAGE=INTRO&OPTION=ACCESS_LICENSE&loc=en_US
There is a comment on the WSDL "Access to UPS shipping, tracking and payments. Free for use but you to apply, your company must already have an account with UPS and send a minimum of 50 packages per day." I will see if I am able to access it.
Created UpsWebService web application in NetBeans 7.0
Downloaded the Address Validation Developer's Guide, but it cannot be read.
Went back to FedEx and downloaded the Rate example.
- Using axis2-1.5.4.
- The classpath variables point to the wrong JAR files.
- Renamed obvious ones. Removed the others.
- Will try a compile to see what errors I get.
- Failure. The code is tied to axis2-1.4. Many changes for axis2-1.5.4.
I am using FedEx again and the Rate service. I will download axis-1.4
- I am reading the README file from the Rate example.
- I will add activation.jar and mailapi.jar to the classpath as well as the axis files.
- Added the .project file to Eclipse Helios. No compilation errors. I had to download activation.jar from oracle and add it to the axis lib folder. Same for mailapi.jar. Alternatively, I could have edited the variables that were created for the class path.
- Had to add -cp "
\lib\*" to java command in order to get WSDL2java to run. - All stubs are created and placed in workspace.
- Had to request access to test environment for FedEx. Only certified apps can run on production servers. Account number, meter number, key were in confirmation on web site. Password was only sent in email (that took 10 minutes to arrive).
- Must use Axis 1.4 for library, not 1.6.
- mailapi.jar and activation.jar are there from Eclipse example.
- Success.
- I have added a new Web Service in the Services tab for FedEx.
- I have linked to the wsdl that was sent in the samples from FedEx. The wsdl does not appear to be accessible from the web.
- Drag-drop getRates to example main program. There is not enough information to make a request that runs.
- New -> Web Service Client
- Local reference to WSDL from FedEx
- Same result as using Services.
I am now trying to use Amazon Web Services (AWS) to send bulk email.
I am following the instructions at http://docs.amazonwebservices.com/ses/latest/GettingStartedGuide/.
- The only glitch so far is that Perl needs to be installed in order to verify the email address.
- Next glitch, library LibXML.pm is missing.
- Could not find 64 bit XML/LibXML.pm. Am uninstalling 64 and installing 32 bit Perl.
- Still not luck. Trying to use cpan from perl install. Need C and make. Installing now.
- Installed cpanm and am installing XML::LibXML.
- Error about uninitialized value in Makefile.
- I am probably missing libxml2. This is a C library that implements GNOME functionality. I am trying to do the install in Linux. It may be better to rewrite the script using XPATH.
- Using Windows, I was able to run the email verify address by using XPATH. Listed after this list. Still didn't show results, I had to just view the plain text of the response.
$xpath->set_namespace('ns', $SES::aws_email_ns);
my @nodes = $xpath->findnodes('/ns:ListVerifiedEmailAddressesResponse' .
'/ns:ListVerifiedEmailAddressesResult' .
'/ns:VerifiedEmailAddresses' .
'/ns:member');
print "node count: @nodes";
foreach my $node (@nodes) {
my $text = $node->to_literal();
print "$text\n";
}
Have downloaded the SDK for AWS for Java.
- I have been able to send an email.
- I used ant. Now I am creating a project in NetBeans to run the samples.
- I created a library for AWS jar files in the lib and third-party folders of SDK.
- Updated my credentials and sent an email.
- Created a utility class for adding recipients, reading recipients, etc.
- Sent bulk mail to mailing list with 50 addresses.
- Messages were received quickly.
No comments:
Post a Comment