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
why calling webservice
b
these bloat (end point, jax ws ri instead of usinghttpurlconnection
?can
httpulconnection
used call webserviceb
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:
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.yes. need work xml directly , use jax-b marshall/unmarshall messages.
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
Post a Comment