本文整理了Java中org.apache.axis2.deployment.util.Utils.addSoap12Endpoint()
方法的一些代码示例,展示了Utils.addSoap12Endpoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.addSoap12Endpoint()
方法的具体详情如下:
包路径:org.apache.axis2.deployment.util.Utils
类名称:Utils
方法名:addSoap12Endpoint
暂无
代码示例来源:origin: apache/axis2-java
private void setServiceEPR(AxisService axisService, String urlString) throws Exception {
// User can pass multiple location URIs, delimited by a comma.
String[] urls = urlString.split(",");
for (String url : urls)
{
Utils.addSoap11Endpoint(axisService, url);
Utils.addSoap12Endpoint(axisService, url);
if ("http".equals(org.apache.axis2.util.Utils.getURIScheme(url))
|| "https".equals(org.apache.axis2.util.Utils.getURIScheme(url)))
{
Utils.addHttpEndpoint(axisService, url);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-java2wsdl
private void setServiceEPR(AxisService axisService, String urlString) throws Exception {
// User can pass multiple location URIs, delimited by a comma.
String[] urls = urlString.split(",");
for (String url : urls)
{
Utils.addSoap11Endpoint(axisService, url);
Utils.addSoap12Endpoint(axisService, url);
if ("http".equals(org.apache.axis2.util.Utils.getURIScheme(url))
|| "https".equals(org.apache.axis2.util.Utils.getURIScheme(url)))
{
Utils.addHttpEndpoint(axisService, url);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
private void buildAxisServiceFromAnnotations() {
String serviceName = null;
if (portQName != null) {
serviceName = createAxisServiceName();
} else {
// Make this service name unique. The Axis2 engine assumes that a service it can not find is a client-side service.
serviceName = ServiceClient.ANON_SERVICE + this.hashCode() + System.currentTimeMillis();
}
axisService = new AxisService(serviceName);
// Now we have to add an Endpoint to the AxisService instance according to the generated
// WSDL. Binding type can be SOAP 1.1, SOAP 1.2 or HTTP. Always we have to use the
// annotated port name as the endpoint name.
try {
String bindingType = getBindingType();
// Default transport protocol is set to HTTP
String protocol = "http";
if (bindingType.startsWith(SOAPBinding.SOAP12HTTP_BINDING)) {
Utils.addSoap12Endpoint(axisService, protocol, getPortQName().getLocalPart());
} else if (bindingType.startsWith(javax.xml.ws.http.HTTPBinding.HTTP_BINDING)) {
Utils.addHttpEndpoint(axisService, protocol, getPortQName().getLocalPart());
} else {
// Assume SOAP 1.1 over HTTP for all other cases
Utils.addSoap11Endpoint(axisService, protocol, getPortQName().getLocalPart());
}
} catch (Exception e) {
log.error("Error while generating the Endpoint for service :" + axisService.getName());
}
}
代码示例来源:origin: apache/axis2-java
private void buildAxisServiceFromAnnotations() {
String serviceName = null;
if (portQName != null) {
serviceName = createAxisServiceName();
} else {
// Make this service name unique. The Axis2 engine assumes that a service it can not find is a client-side service.
serviceName = ServiceClient.ANON_SERVICE + this.hashCode() + System.currentTimeMillis();
}
axisService = new AxisService(serviceName);
// Now we have to add an Endpoint to the AxisService instance according to the generated
// WSDL. Binding type can be SOAP 1.1, SOAP 1.2 or HTTP. Always we have to use the
// annotated port name as the endpoint name.
try {
String bindingType = getBindingType();
// Default transport protocol is set to HTTP
String protocol = "http";
if (bindingType.startsWith(SOAPBinding.SOAP12HTTP_BINDING)) {
Utils.addSoap12Endpoint(axisService, protocol, getPortQName().getLocalPart());
} else if (bindingType.startsWith(javax.xml.ws.http.HTTPBinding.HTTP_BINDING)) {
Utils.addHttpEndpoint(axisService, protocol, getPortQName().getLocalPart());
} else {
// Assume SOAP 1.1 over HTTP for all other cases
Utils.addSoap11Endpoint(axisService, protocol, getPortQName().getLocalPart());
}
} catch (Exception e) {
log.error("Error while generating the Endpoint for service :" + axisService.getName());
}
}
内容来源于网络,如有侵权,请联系作者删除!