Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

jhessica valdez

Greenhorn
+ Follow
since Feb 01, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jhessica valdez

try this code..

import java.io.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.*;

public class Util {

public static Document stringToDom(String xmlSource)
throws SAXException, ParserConfigurationException, IOException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(new InputSource(new StringReader(xmlSource)));
}
}
5 years ago
I spend quite a bit of time on the PayPal Developer Community forum trying to help other developers with integration problems. When asking questions about the PayPal SOAP API, many people will post the SOAP envelope that they're sending to the API. Since that is the actual request stream that's sent to the web service, it seems like the best way to verify exactly what you're requesting.

ASP.NET has done a great job of abstracting the whole SOAP request/response process. When you add a web reference to the PayPal SOAP API web service, it appears as a collection of classes with properties and methods for working with the API. There is no dealing with XML, just instantiate the objects, set the necessary properties, and call the desired methods -- object oriented design at its finest.

In fact, it is abstracted so well, there is no simple way to view the actual XML documents that are sent back and forth between your application and the web service. After a bit of research, I found that Microsoft has provided the functionality I was looking for in the way of SOAP Extensions. I found what I needed here:

http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.soapextension(VS.80).aspx

and here:

http://msdn2.microsoft.com/en-us/library/b5e8e7kk(VS.80).aspx.
5 years ago
hai Why linux and unix is important to us?
5 years ago