Service service = sf.create(); for (ServiceInfo si : service.getServiceInfos()) { for (EndpointInfo ei : si.getEndpoints()) { String bindingID = BindingID.getJaxwsBindingID(ei.getTransportId()); addPort(ei.getName(), bindingID, ei.getAddress());
EndpointInfo ei = null; if (portName == null) { ei = service.getServiceInfos().get(0).getEndpoints().iterator().next(); } else { ei = service.getEndpointInfo(portName);
bindingInfo.getService().setProperty("soap.force.doclit.bare", Boolean.TRUE); if (this.getServiceFactory().isPopulateFromClass()) { for (EndpointInfo ei : bindingInfo.getService().getEndpoints()) { ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
private boolean checkUniqueBody() { Collection<EndpointInfo> endpoints = service.getEndpoints(); if (endpoints != null) { for (EndpointInfo endpoint : endpoints) { if (!isValidEndpoint(endpoint)) { return false; } } } return true; }
for (EndpointInfo ep : si.getEndpoints()) { enames.add(ep.getName()); si.setProperty("soap.force.doclit.bare", Boolean.TRUE); if (!isFromWsdl()) { for (EndpointInfo ei : si.getEndpoints()) { ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
public static EndpointInfo findBestEndpointInfo(QName qn, List<ServiceInfo> serviceInfos) { for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (ep.getInterface().getName().equals(qn)) { return ep; } } } EndpointInfo best = null; for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (best == null) { best = ep; } if ("http://schemas.xmlsoap.org/wsdl/soap/".equals(ep.getTransportId())) { return ep; } } } return best; }
si.setProperty("soap.force.doclit.bare", Boolean.TRUE); if (null == wsdlURL) { for (EndpointInfo ei : si.getEndpoints()) { ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
public static EndpointInfo findBestEndpointInfo(QName qn, List<ServiceInfo> serviceInfos) { for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (ep.getInterface().getName().equals(qn)) { return ep; } } } EndpointInfo best = null; for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (best == null) { best = ep; } if ("http://schemas.xmlsoap.org/wsdl/soap/".equals(ep.getTransportId())) { return ep; } } } return best; }
public static EndpointInfo findBestEndpointInfo(QName qn, List<ServiceInfo> serviceInfos) { for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (ep.getInterface().getName().equals(qn)) { return ep; } } } EndpointInfo best = null; for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (best == null) { best = ep; } if (ep.getTransportId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) { return ep; } } } return best; }
public static EndpointInfo findBestEndpointInfo(QName qn, List<ServiceInfo> serviceInfos) { for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (ep.getInterface().getName().equals(qn)) { return ep; } } } EndpointInfo best = null; for (ServiceInfo serviceInfo : serviceInfos) { Collection<EndpointInfo> eps = serviceInfo.getEndpoints(); for (EndpointInfo ep : eps) { if (best == null) { best = ep; } if (ep.getTransportId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) { return ep; } } } return best; }
private void customize(ServiceInfo service) { if (context.containsKey(ToolConstants.CFG_TNS)) { String ns = (String)context.get(ToolConstants.CFG_TNS); service.setTargetNamespace(ns); } if (context.containsKey(ToolConstants.CFG_PORT)) { String portName = (String)context.get(ToolConstants.CFG_PORT); EndpointInfo einfo = service.getEndpoints().iterator().next(); QName qn = new QName(einfo.getName().getNamespaceURI(), portName); einfo.setName(qn); } if (context.containsKey(ToolConstants.CFG_SERVICENAME)) { String svName = getServiceName(); service.setName(new QName(service.getName().getNamespaceURI(), svName)); } EndpointInfo endpointInfo = service.getEndpoints().iterator().next(); String address = ToolConstants.DEFAULT_ADDRESS + "/" + endpointInfo.getName().getLocalPart(); if (context.get(ToolConstants.CFG_ADDRESS) != null) { address = (String)context.get(ToolConstants.CFG_ADDRESS); } endpointInfo.setAddress(address); context.put(ToolConstants.CFG_ADDRESS, address); }
private void customize(ServiceInfo service) { if (context.containsKey(ToolConstants.CFG_TNS)) { String ns = (String)context.get(ToolConstants.CFG_TNS); service.setTargetNamespace(ns); } if (context.containsKey(ToolConstants.CFG_PORT)) { String portName = (String)context.get(ToolConstants.CFG_PORT); EndpointInfo einfo = service.getEndpoints().iterator().next(); QName qn = new QName(einfo.getName().getNamespaceURI(), portName); einfo.setName(qn); } if (context.containsKey(ToolConstants.CFG_SERVICENAME)) { String svName = getServiceName(); service.setName(new QName(service.getName().getNamespaceURI(), svName)); } EndpointInfo endpointInfo = service.getEndpoints().iterator().next(); String address = ToolConstants.DEFAULT_ADDRESS + "/" + endpointInfo.getName().getLocalPart(); if (context.get(ToolConstants.CFG_ADDRESS) != null) { address = (String)context.get(ToolConstants.CFG_ADDRESS); } endpointInfo.setAddress(address); context.put(ToolConstants.CFG_ADDRESS, address); }
@SuppressWarnings("unchecked") public void process() throws ToolException { checkJaxwsClass(); List<ServiceInfo> services = (List<ServiceInfo>)context.get(ToolConstants.SERVICE_LIST); ServiceInfo serviceInfo = services.get(0); JavaInterface jinf = JavaFirstUtil.serviceInfo2JavaInf(serviceInfo); String className = (String)context.get(ToolConstants.IMPL_CLASS); if (className != null && className.equals(jinf.getFullClassName())) { jinf.setName(jinf.getName() + SEI_SUFFIX); } JavaModel jm = new JavaModel(); jm.addInterface("inf", jinf); jinf.setJavaModel(jm); context.put(JavaModel.class, jm); context.put(ToolConstants.SERVICE_NAME, serviceInfo.getName()); EndpointInfo endpointInfo = serviceInfo.getEndpoints().iterator().next(); context.put(ToolConstants.PORT_NAME, endpointInfo.getName()); generators.add(new JaxwsSEIGenerator()); generators.add(new JaxwsImplGenerator()); generators.add(new JaxwsServerGenerator()); generators.add(new JaxwsClientGenerator()); generators.add(new AntGenerator()); for (AbstractGenerator generator : generators) { generator.generate(context); } }
protected void createEndpoints() { Service service = getService(); BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class); for (ServiceInfo inf : service.getServiceInfos()) { for (EndpointInfo ei : inf.getEndpoints()) { for (BindingOperationInfo boi : ei.getBinding().getOperations()) { updateBindingOperation(boi); } try { bfm.getBindingFactory(ei.getBinding().getBindingId()); } catch (BusException e1) { continue; } try { Endpoint ep = createEndpoint(ei); service.getEndpoints().put(ei.getName(), ep); } catch (EndpointException e) { throw new ServiceConstructionException(e); } } } }
protected void createEndpoints() { Service service = getService(); BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class); for (ServiceInfo inf : service.getServiceInfos()) { for (EndpointInfo ei : inf.getEndpoints()) { for (BindingOperationInfo boi : ei.getBinding().getOperations()) { updateBindingOperation(boi); } try { bfm.getBindingFactory(ei.getBinding().getBindingId()); } catch (BusException e1) { continue; } try { Endpoint ep = createEndpoint(ei); service.getEndpoints().put(ei.getName(), ep); } catch (EndpointException e) { throw new ServiceConstructionException(e); } } } }
protected void createEndpoints() { Service service = getService(); BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class); for (ServiceInfo inf : service.getServiceInfos()) { for (EndpointInfo ei : inf.getEndpoints()) { for (BindingOperationInfo boi : ei.getBinding().getOperations()) { updateBindingOperation(boi); } try { bfm.getBindingFactory(ei.getBinding().getBindingId()); } catch (BusException e1) { continue; } try { Endpoint ep = createEndpoint(ei); service.getEndpoints().put(ei.getName(), ep); } catch (EndpointException e) { throw new ServiceConstructionException(e); } } } }
public void walk() { begin(serviceInfo); begin(serviceInfo.getInterface()); for (OperationInfo o : serviceInfo.getInterface().getOperations()) { begin(o); visitOperation(o); end(o); } end(serviceInfo.getInterface()); for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) { begin(endpointInfo); end(endpointInfo); } for (BindingInfo bindingInfo : serviceInfo.getBindings()) { begin(bindingInfo); end(bindingInfo); } end(serviceInfo); }
public void walk() { begin(serviceInfo); begin(serviceInfo.getInterface()); for (OperationInfo o : serviceInfo.getInterface().getOperations()) { begin(o); visitOperation(o); end(o); } end(serviceInfo.getInterface()); for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) { begin(endpointInfo); end(endpointInfo); } for (BindingInfo bindingInfo : serviceInfo.getBindings()) { begin(bindingInfo); end(bindingInfo); } end(serviceInfo); }
public void walk() { begin(serviceInfo); begin(serviceInfo.getInterface()); for (OperationInfo o : serviceInfo.getInterface().getOperations()) { begin(o); visitOperation(o); end(o); } end(serviceInfo.getInterface()); for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) { begin(endpointInfo); end(endpointInfo); } for (BindingInfo bindingInfo : serviceInfo.getBindings()) { begin(bindingInfo); end(bindingInfo); } end(serviceInfo); }
public void walk() { begin(serviceInfo); begin(serviceInfo.getInterface()); for (OperationInfo o : serviceInfo.getInterface().getOperations()) { begin(o); visitOperation(o); end(o); } end(serviceInfo.getInterface()); for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) { begin(endpointInfo); end(endpointInfo); } for (BindingInfo bindingInfo : serviceInfo.getBindings()) { begin(bindingInfo); end(bindingInfo); } end(serviceInfo); }