java - JAX-WS vs SAAJ Style, Which to Use -


what difference, philosophical or otherwise, between calling web service java code using service , dispatch classes, vs soapconnection class?

for example, this:

soapconnectionfactory scf = soapconnectionfactory.newinstance(); soapconnection soapconnection = scf.createconnection(); soapmessage reply = soapconnection.call(soapmessage, url); 

vs along these lines?

svc = service.create(url, servicename); dispatch<soapmessage> dispatch = svc.createdispatch(portname, soapmessage.class, service.mode.message); soapmessage reply = (soapmessage)dispatch.invoke(soapmessage); 

what difference between these, , why select 1 approach on other?

the following line excerpt java soa cookbook - o'reilly

"the soap connection allows send soap message resource @ end of url. convenient use in situation, necessary if service not have defined wsdl. that’s because calling service.create requires passing in location of wsdl. may rare don’t have wsdl soap-based service, happen, , you’ll prepared.

to create connection web service not expose wsdl, can use soapconnection class communicate directly remote resource. create url object representing remote resource (servlet) want call. pass soap request message , endpoint want invoke call method on connection object, , wait return soap response.

• endpoint url passed connection.call method can either string or java.net.url."


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -