private AxisEndpoint getAxisEndpoint(String port) { // if service has a single endpoint, this will cause the [serviceName] address // to be used in wsdl instead of the [serviceName].[endpointName] if (endpointMap.size() == 1 && endpointMap.containsKey(getEndpointName())) { return null; } else { return (AxisEndpoint)endpointMap.get(port); } }
private AxisEndpoint getAxisEndpoint(String port) { // if service has a single endpoint, this will cause the [serviceName] address // to be used in wsdl instead of the [serviceName].[endpointName] if (endpointMap.size() == 1 && endpointMap.containsKey(getEndpointName())) { return null; } else { return (AxisEndpoint)endpointMap.get(port); } }
private AxisBinding findBinding() { if (axisService != null) { if (axisService.getEndpointName() != null) { AxisEndpoint axisEndpoint = axisService .getEndpoint(axisService.getEndpointName()); if (axisEndpoint != null) { return axisEndpoint.getBinding(); } } } return null; }
private AxisBinding findBinding() { if (axisService != null) { if (axisService.getEndpointName() != null) { AxisEndpoint axisEndpoint = axisService .getEndpoint(axisService.getEndpointName()); if (axisEndpoint != null) { return axisEndpoint.getBinding(); } } } return null; }
private void processEndpoints(AxisService axisService) throws AxisFault { String endpointName = axisService.getEndpointName(); if (endpointName == null || endpointName.length() == 0) { Utils.addEndpointsToService(axisService, service.getAxisConfiguration()); } }
private void processEndpoints(AxisService axisService) throws AxisFault { String endpointName = axisService.getEndpointName(); if (endpointName == null || endpointName.length() == 0) { Utils.addEndpointsToService(axisService, service.getAxisConfiguration()); } }
private void traceRequestLine(final MessageContext inMessageContext) { if (reqResTraceLog.isTraceEnabled()) { requestTime = System.currentTimeMillis(); AxisService axisService = inMessageContext.getAxisService(); String epName = axisService.getEndpointName(); epName = axisService.getEndpoint(epName).getEndpointURL(); reqResTraceLog.trace("To:" + epName + ",MessageID:" + inMessageContext.getMessageID() + ",Direction:request" + ",requestTime:" + requestTime); } }
protected Document createDOMDocumentForServiceXML() { Document doc = getEmptyDocument(); String className = null; String serviceName = null; Element rootElement = doc.createElement("interfaces"); doc.appendChild(rootElement); for (Iterator iter = this.axisServices.iterator(); iter.hasNext();) { this.axisService = (AxisService) iter.next(); this.axisBinding = axisService.getEndpoint(axisService.getEndpointName()).getBinding(); serviceName = axisService.getName(); className = (String)axisService.getParameter(JAXWS_PORT_TYPE_NAME).getValue() + JAXWS_IMPL_SUFFIX; rootElement.appendChild(getServiceElement(serviceName, className, doc)); } return doc; }
private static Binding extractBindingInformation(final AxisService service, final Definition wsdlOfService, final MessageContext inMessageContext) { AxisEndpoint currentEndpoint = (AxisEndpoint) inMessageContext .getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME); if (currentEndpoint == null) { String defaultEndpointName = service.getEndpointName(); currentEndpoint = service.getEndpoints().get(defaultEndpointName); if (currentEndpoint == null) { throw new NullPointerException("AxisEndpoint cannot be null."); } } AxisBinding currentAxisBinding = currentEndpoint.getBinding(); QName bindingQName = currentAxisBinding.getName(); return wsdlOfService.getBinding(bindingQName); }
protected Document createDOMDocumentForServiceXML() { Document doc = getEmptyDocument(); String className = null; String serviceName = null; Element rootElement = doc.createElement("interfaces"); doc.appendChild(rootElement); for (Iterator iter = this.axisServices.iterator(); iter.hasNext();) { this.axisService = (AxisService) iter.next(); this.axisBinding = axisService.getEndpoint(axisService.getEndpointName()).getBinding(); serviceName = axisService.getName(); if (this.codeGenConfiguration.isBackwordCompatibilityMode()) { className = makeJavaClassName(axisService.getBindingName()); } else { className = makeJavaClassName(serviceName); } rootElement.appendChild(getServiceElement(serviceName, className, doc)); } return doc; }
public static AxisService createClientSideAxisService( Definition wsdlDefinition, QName wsdlServiceName, String portName, Options options) throws AxisFault { WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder( wsdlDefinition, wsdlServiceName, portName); serviceBuilder.setServerSide(false); AxisService axisService = serviceBuilder.populateService(); AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoints() .get(axisService.getEndpointName()); if (axisEndpoint != null) { options.setTo(new EndpointReference(axisEndpoint.getEndpointURL())); options.setSoapVersionURI((String) axisEndpoint.getBinding() .getProperty(WSDL2Constants.ATTR_WSOAP_VERSION)); } return axisService; }
public static AxisService createClientSideAxisService( Definition wsdlDefinition, QName wsdlServiceName, String portName, Options options) throws AxisFault { WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder( wsdlDefinition, wsdlServiceName, portName); serviceBuilder.setServerSide(false); AxisService axisService = serviceBuilder.populateService(); AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoints() .get(axisService.getEndpointName()); if (axisEndpoint != null) { options.setTo(new EndpointReference(axisEndpoint.getEndpointURL())); options.setSoapVersionURI((String) axisEndpoint.getBinding() .getProperty(WSDL2Constants.ATTR_WSOAP_VERSION)); } return axisService; }
/** * Returns the fully qualified Stub name reused in many methods * * @return classname */ protected String getFullyQualifiedStubName() { String packageName = codeGenConfiguration.getPackageName(); String localPart = null; if (this.axisService.getEndpoints().size() > 1) { localPart = makeJavaClassName(axisService.getName() + axisService.getEndpointName()); } else { localPart = makeJavaClassName(axisService.getName()); } return packageName + "." + localPart + STUB_SUFFIX; }
/** * Sets the relevant codegen configuration * * @param configuration * @see Emitter#setCodeGenConfiguration(org.apache.axis2.wsdl.codegen.CodeGenConfiguration) */ public void setCodeGenConfiguration(CodeGenConfiguration configuration) { this.codeGenConfiguration = configuration; this.axisServices = codeGenConfiguration.getAxisServices(); this.axisService = codeGenConfiguration.getAxisService(); this.axisEndpoint = axisService.getEndpoint(axisService.getEndpointName()); this.axisBinding = axisEndpoint.getBinding(); resolver = new XSLTIncludeResolver(codeGenConfiguration); }
/** * @return fully qualified skeleton interface name */ protected String getFullyQualifiedSkeletonInterfaceName() { String packageName = codeGenConfiguration.getPackageName(); String localPart = makeJavaClassName(axisService.getName()); String skeltonInterfaceName; if (this.codeGenConfiguration.isBackwordCompatibilityMode()) { skeltonInterfaceName = packageName + "." + makeJavaClassName(axisService.getEndpointName()) + SKELETON_INTERFACE_SUFFIX_BACK; } else { skeltonInterfaceName = packageName + "." + localPart + SKELETON_INTERFACE_SUFFIX; } return skeltonInterfaceName; }
private AxisBindingMessage findBindingMessage() { if (axisService != null && axisOperation != null ) { if (axisService.getEndpointName() != null) { AxisEndpoint axisEndpoint = axisService .getEndpoint(axisService.getEndpointName()); if (axisEndpoint != null) { AxisBinding axisBinding = axisEndpoint.getBinding();
private AxisBindingMessage findBindingMessage() { if (axisService != null && axisOperation != null ) { if (axisService.getEndpointName() != null) { AxisEndpoint axisEndpoint = axisService .getEndpoint(axisService.getEndpointName()); if (axisEndpoint != null) { AxisBinding axisBinding = axisEndpoint.getBinding();
/** * returns a axisService given a input Stream of WSDL2.0 document. * * @param description * WSDL description * @param wsdlServiceName * @param endPoint * @param options * @return * @throws AxisFault */ public static AxisService createClientSideAxisService(Description description, QName wsdlServiceName, String endPoint, Options options) throws AxisFault { WSDL20ToAxisServiceBuilder serviceBuilder = new WSDL20ToAxisServiceBuilder(description, wsdlServiceName, endPoint); serviceBuilder.setServerSide(false); AxisService axisService = serviceBuilder.populateService(); AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoint(axisService .getEndpointName()); if (axisEndpoint != null) { options.setTo(new EndpointReference(axisEndpoint.getEndpointURL())); options.setSoapVersionURI((String) axisEndpoint.getBinding().getProperty( WSDL2Constants.ATTR_WSOAP_VERSION)); } return axisService; } private void printDescriptionObject(Description definition,
/** * returns a axisService given a input Stream of WSDL2.0 document. * * @param description * WSDL description * @param wsdlServiceName * @param endPoint * @param options * @return * @throws AxisFault */ public static AxisService createClientSideAxisService(Description description, QName wsdlServiceName, String endPoint, Options options) throws AxisFault { WSDL20ToAxisServiceBuilder serviceBuilder = new WSDL20ToAxisServiceBuilder(description, wsdlServiceName, endPoint); serviceBuilder.setServerSide(false); AxisService axisService = serviceBuilder.populateService(); AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoint(axisService .getEndpointName()); if (axisEndpoint != null) { options.setTo(new EndpointReference(axisEndpoint.getEndpointURL())); options.setSoapVersionURI((String) axisEndpoint.getBinding().getProperty( WSDL2Constants.ATTR_WSOAP_VERSION)); } return axisService; } private void printDescriptionObject(Description definition,
/** * Generates the model for the callbacks. */ protected Document createDOMDocumentForCallbackHandler() { Document doc = getEmptyDocument(); Element rootElement = doc.createElement("callback"); addAttribute(doc, "package", codeGenConfiguration.getPackageName(), rootElement); if (codeGenConfiguration.isPackClasses() && this.axisService.getEndpoints().size() > 1) { addAttribute(doc, "name", makeJavaClassName(axisService.getName() + axisService.getEndpointName()) + CALL_BACK_HANDLER_SUFFIX, rootElement); } else { addAttribute(doc, "name", makeJavaClassName(axisService.getName()) + CALL_BACK_HANDLER_SUFFIX, rootElement); } // TODO JAXRPC mapping support should be considered here ?? this.loadOperations(doc, rootElement, null); doc.appendChild(rootElement); return doc; }