-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
Anil sais:
Hi all,
to do simple SAAJ programming to connect to an external soap based
website, I had to pull in so many dependencies with failed end-result.
Here is the code that I was trying:
-----------------------------------------------
//Use SAAJ to create soap request
MessageFactory factory = MessageFactory.newInstance();
String loc = "src/resources/interop/jericho/soap-request.xml";
File soapreqfile = new File(loc);
final MimeHeaders headers = new MimeHeaders();
headers.addHeader("Content-Type", "text/xml");
SOAPMessage request = factory.createMessage(headers, new
FileInputStream(soapreqfile));
SOAPConnectionFactory f = SOAPConnectionFactory.newInstance();
SOAPConnection connection = f.createConnection();
URL endpoint = new URL("http://69.15.29.154:12002/SAMLService");
SOAPMessage response = connection.call(request, endpoint);
response.writeTo(System.out);
-----------------------------------------------
To run this, I had to bring in the following jars from jbossws, jboss
common, jboss remoting, jbossxb etc ( a total of 11 jars):
------------------------
jboss-logging-spi.jar
mail.jar
jboss-remoting.jar
concurrent.jar
jboss-saaj.jar
jboss-common-core.jar
jboss-xml-binding.jar
jboss-jaxrpc.jar
jbossws-core.jar
jboss-jaxws.jar
jbossws-spi.jar
--------------------------