private void resolvePortComponentLinks(ServiceReferenceDescriptor desc) throws Exception { // Resolve port component links to target endpoint address. // We can't assume web service client is running in same VM // as endpoint in the intra-app case because of app clients. // // Also set port-qname based on linked port's qname if not // already set. for(Iterator iter = desc.getPortsInfo().iterator(); iter.hasNext();) { ServiceRefPortInfo portInfo = (ServiceRefPortInfo) iter.next(); if( portInfo.isLinkedToPortComponent() ) { WebServiceEndpoint linkedPortComponent = portInfo.getPortComponentLink(); // XXX-JD we could at this point try to figure out the // endpoint-address from the ejb wsdl file but it is a // little complicated so I will leave it for post Beta2 if( !(portInfo.hasWsdlPort()) ) { portInfo.setWsdlPort(linkedPortComponent.getWsdlPort()); } } } }
QName wsdlPort = descriptor.getWsdlPort(); if((wsdlPort!=null) && (wsdlPort.getLocalPart().length() != 0)) {
writer.write(endpoint.getServiceName().getLocalPart()); writer.write("']/wsdl:port[@name='"); writer.write(endpoint.getWsdlPort().getLocalPart()); writer.write("']/"+endpoint.getSoapAddressPrefix()+":address\" mode=\"copy\">"); writer.write("<"+endpoint.getSoapAddressPrefix()+":address><xsl:attribute name=\"location\"><xsl:value-of select=\"$" + actualAddressParam + "\"/>");
QName wsdlPort = descriptor.getWsdlPort(); if((wsdlPort!=null) && (wsdlPort.getLocalPart().length() != 0)) {
new QName(myEndpoint.getDescriptor().getWsdlPort().getNamespaceURI(), myEndpoint.getDescriptor().getWebService().getName()); Object port = service.getPort(myEndpoint.getDescriptor().getWsdlPort(), portClass); if (port==null) { throw new RuntimeException("Cannot find the correct port class.");
public void configureJAXWSServiceHandlers(WebServiceEndpoint ep, String bindingId, WSBinding bindingObj) { // No handler chains; do nothing if(!ep.hasHandlerChain()) { return; } LinkedList handlerChainList = ep.getHandlerChain(); List<Handler> finalHandlerList = new ArrayList<Handler>(); Set<String> roles = new HashSet(); for(Iterator<WebServiceHandlerChain> i = handlerChainList.iterator(); i.hasNext();) { WebServiceHandlerChain hc = i.next(); // Apply the serviceName / portName / bindings filter to ensure // that the handlers are for this endpoint if(!patternsMatch(hc, ep.getServiceName(), ep.getWsdlPort(), bindingId)) { continue; } // OK - this handler has to be configured for this endpoint // Iterate through all handlers that have been configured List<Handler> handlerInfo = processConfiguredHandlers(hc.getHandlers(), roles); finalHandlerList.addAll(handlerInfo); } // Processing of all handlers over; // set final list of handler in RuntimeEndpointInfo bindingObj.setHandlerChain(finalHandlerList); // Set soap roles for soap bindings only if(bindingObj instanceof javax.xml.ws.soap.SOAPBinding) { ((javax.xml.ws.soap.SOAPBinding)bindingObj).setRoles(roles); } }
private NoMetadataModelInfo createNoMetadataModelInfo (WebService webService, JaxrpcMappingDescriptor mappingDesc) throws Exception { NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo(); URL wsdlFileUrl = webService.getWsdlFileUrl(); Collection endpoints = webService.getEndpoints(); if( endpoints.size() != 1 ) { throw new Exception ("Deployment code generation error for webservice " + webService.getName() + ". " + " jaxrpc-mapping-file is required if web service has " + "multiple endpoints"); } WebServiceEndpoint endpoint = (WebServiceEndpoint) endpoints.iterator().next(); modelInfo.setLocation(wsdlFileUrl.toExternalForm()); modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface()); modelInfo.setPortName(endpoint.getWsdlPort()); addNamespaceMappingRegistry(modelInfo, mappingDesc); return modelInfo; }
WebServiceEndpoint next = (WebServiceEndpoint) iter.next(); Service service = wsUtil.getServiceForPort(model, next.getWsdlPort()); if( service == null ) { service = (Service) model.getServices().next(); next.getWsdlPort() + "'"); next.setServiceLocalPart(serviceName.getLocalPart()); Port port = wsUtil.getPortFromModel(model, next.getWsdlPort()); if( port == null ) { String msg = "Can't find model port for endpoint " + next.getEndpointName() + " with wsdl-port " + next.getWsdlPort(); throw new IllegalStateException(msg);
nextEndpoint.getWsdlPort()); if( port == null ) { throw new IllegalStateException("Model port for endpoint " +
public DeployedEndpointData(String path, Application app, WebServiceEndpoint endpoint) { super(path, "", ""); this.appName = app.getAppName(); this.endpointName = endpoint.getEndpointName(); this.namespace = endpoint.getServiceName().getNamespaceURI(); this.serviceName = endpoint.getServiceName().getLocalPart(); QName pName = endpoint.getWsdlPort(); this.portName = (pName != null) ? pName.getLocalPart() : ""; this.implClass = endpoint.implementedByEjbComponent() ? endpoint.getEjbComponentImpl().getEjbImplClassName() : endpoint.getServletImplClass(); this.address = path; this.wsdl = address+"?wsdl"; this.tester = address+"?Tester"; this.implType = endpoint.implementedByEjbComponent() ? "EJB" : "SERVLET"; this.deploymentType = "109"; fillStatMap(); }
endpointInfo.setPortName(endpoint_.getWsdlPort());
inv, endpoint.getWsdlPort(), // the port
(endpoint.getWsdlPort() != null) ) { if(!endpoint.getWsdlService().getNamespaceURI().equals( endpoint.getWsdlPort().getNamespaceURI())) { AnnotationProcessorException ape = new AnnotationProcessorException( rb.getString("mismatch.port.targetnamespace"), if(endpoint.getWsdlPort() == null) { String serviceNameSpace = endpoint.getWsdlPort().getNamespaceURI(); String serviceName = null; if ( (svcNameFromImplClass != null) &&
new EjbInvokerImpl(clazz, invoker, webServiceEndpointServant, wsCtxt), // the invoker endpoint.getWsdlPort(), // the port container,
(endpoint.getWsdlPort() != null) ) { if(!endpoint.getWsdlService().getNamespaceURI().equals( endpoint.getWsdlPort().getNamespaceURI())) { AnnotationProcessorException ape = new AnnotationProcessorException( wsLocalStrings.getLocalString("mismatch.port.targetnamespace", if(endpoint.getWsdlPort() == null) { String serviceNameSpace = endpoint.getWsdlPort().getNamespaceURI(); String serviceName = null; if ( (svcNameFromImplClass != null) &&
if(endpoint.getWsdlPort() == null) { endpoint.setWsdlPort(new QName(targetNameSpace, portName, "ns1"));
if(endpoint.getWsdlPort() == null) { endpoint.setWsdlPort(new QName(targetNameSpace, portName, "ns1"));