In my project, we consume webservices . What was confusing to me was there were some webservices(say A
) that were called just using the HttpURLConnection
and req/response was marshalled/unmarshalled using JAXB
There is another web service(say B
) for which i see many classes with JAX WSRI and its not called using HttpURLConnection
. I also see .wsdl files for these webservices.
/**
* This class was generated by the 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 are
Why are we calling the webservice
B
with all these extra bloat (end point, JAX WS RI instead of usingHttpURLConnection
?can
HttpULConnection
be used to call this webserviceB
For webservice A that is called using
HttpURLConnection
there is no WSDL (just jaxb classes created from xsd) but whreas the WS that is called using JAXWS RI generated classes has a WSDL. Are the web service A and B implemnted differentely and thats why we call them in different ways
Please help me understand
-Venkat