jaxb - Webservices - called using HttpUrlconnection and JAX WS RI -


in project, consume webservices . confusing me there webservices(say a) called using httpurlconnection , req/response marshalled/unmarshalled using jaxb

there web service(say b) see many classes jax wsri , not called using httpurlconnection. see .wsdl files these webservices.

/** * class generated jax-ws ri. * jax-ws ri 2.1.1 in jdk 6 * generated source version: 2.0 *  */  @webservice(name = "abporttype",     targetnamespace        "http://www.ups.com/wsdl/xoltws/dcr/v1.0") @soapbinding(parameterstyle = soapbinding.parameterstyle.bare) public interface abcporttype { @webmethod(operationname = "processab", action  =      =   "http://example.com/webservices/xxbinding/v1.0") @webresult(name = "xxresponse", targetnamespace =    "http://xx.com/xmlschema/xxws/ab/v1.0", partname = "body")  } 

my doubts

  1. why calling webservice b these bloat (end point, jax ws ri instead of using httpurlconnection?

  2. can httpulconnection used call webservice b

  3. for webservice called using httpurlconnection there no wsdl (just jaxb classes created xsd) whreas ws called using jaxws ri generated classes has wsdl. web service , b implemnted differentely , thats why call them in different ways

please me understand

-venkat

according order of questions:

  1. if using jax-ws api, may want generate client proxy classes webservice, e.g. using wsimport tool generate client stubs wsdl document file. work java objects , not xml. in special cases, need xml handler advanced features, such ws-security.

  2. yes. need work xml directly , use jax-b marshall/unmarshall messages.

  3. the wsdl document file describes soap service , signatures of operations available in service. if a not have descriptor (the wsdl document file), may not use jax-ws api, e.g. java wsdp, or service provider not exposing wsdl.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -