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; }
/** * Reads the WSDL Object Model from the given location. * * @param wsdlURI the filesystem location (full path) of the WSDL file to read in. * @return the WSDLDescription object containing the WSDL Object Model of the given WSDL file * @throws IOException on errors reading the WSDL file */ public AxisService getAxisService(String wsdlURI) throws Exception { URL url; if (wsdlURI.indexOf("://") == -1) { url = new URL("file", "", wsdlURI); } else { url = new URL(wsdlURI); } WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(url.openConnection().getInputStream()); builder.setDocumentBaseUri(url.toString()); builder.setBaseUri(getBaseUri(wsdlURI)); builder.setCodegen(true); return builder.populateService(); }
/** * Populates and returns an AxisService from a WSDL. * @param wsdlContent The WSDL content * @return AxisService which represents the given WSDL * @throws DataServiceFault */ private static AxisService getAxisServiceFromWSDL(byte[] wsdlContent) throws DataServiceFault { try { AxisService axisService; ByteArrayInputStream byteIn = new ByteArrayInputStream(wsdlContent); if (isWSDL20(wsdlContent)) { axisService = new WSDL20ToAxisServiceBuilder(byteIn, null, null).populateService(); } else { // Must be WSDL11 axisService = new WSDL11ToAxisServiceBuilder(byteIn, null, null).populateService(); } return axisService; } catch (AxisFault e) { String message = "Error in getting AxisService from WSDL"; throw new DataServiceFault(e, message); } }
new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart()); serviceBuilder.setCustomResolver(uriResolver); serviceBuilder.setServerSide(true); else serviceBuilder.setServerSide(false); ac = composite.getConfigurationContext().getAxisConfiguration(); if (ac != null) { serviceBuilder.useAxisConfiguration(ac); axisService = serviceBuilder.populateService();
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, null, null); File file = Utils.toFile(servicesURL); if (file != null && file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator( wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder .setCustomResolver(new AARFileBasedURIResolver(file)); wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null && file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator( wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver(new AARFileBasedURIResolver( file)); wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true);
Options options) throws AxisFault { Definition def = getDefinition(definition, serviceName); final WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(def, serviceName, portName); serviceBuilder.setServerSide(false); serviceBuilder.setCustomResolver(new URIResolverImpl(def)); serviceBuilder.setBaseUri(def.getDocumentBaseURI());
builder = new WSDL11ToAxisServiceBuilder( wsdl4jDef, serviceQname, getPortName(), isAllPorts()); builder.setCodegen(true); addAxisService(builder.populateService()); } else { builder = new WSDL11ToAllAxisServicesBuilder(wsdl4jDef, getPortName()); builder.setCodegen(true); builder.setAllPorts(isAllPorts()); setAxisServices( ((WSDL11ToAllAxisServicesBuilder)builder).populateAllServices());
serviceName, portName); serviceBuilder.setBaseUri(wsdlBaseURI.toString()); serviceBuilder.setCustomResolver(new Axis2UriResolver()); try { serviceBuilder.setCustomWSDLResolver(new Axis2WSDLLocator(wsdlBaseURI)); } catch (URISyntaxException e) { String errorMessage = "URI syntax invalid."; handleException(pid, errorMessage, e); serviceBuilder.setServerSide(true);
equals(wsdlNamespace.getNamespaceURI())) { wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlInputStream); } else { handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0"); wsdlToAxisServiceBuilder).setCustomWSDLResolver( new CustomWSDLLocator(new InputSource(wsdlInputStream), wsdlURI != null ? wsdlURI.toString() : "", wsdlToAxisServiceBuilder).setCustomWSDLResolver( new CustomWSDLLocator(new InputSource(wsdlInputStream), wsdlURI != null ? wsdlURI.toString() : ""));
public AxisService run() throws AxisFault { return serviceBuilder.populateService(); } });
final WSDLToAxisServiceBuilder builder; try { builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); } finally { if (oldTCCL != null) {
/** * sets a custom WSDL locator * * @param customResolver */ public void setCustomWSDLResolver(WSDLLocator customResolver) { this.customWSDLResolver = customResolver; setDocumentBaseUri(this.customWSDLResolver.getBaseURI()); }
wsdlKey); ((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder). setCustomWSDLResolver(userDefWSDLLocator);
new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart()); serviceBuilder.setCustomResolver(uriResolver); serviceBuilder.setServerSide(true); else serviceBuilder.setServerSide(false); ac = composite.getConfigurationContext().getAxisConfiguration(); if (ac != null) { serviceBuilder.useAxisConfiguration(ac); axisService = serviceBuilder.populateService();
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, null, null); File file = Utils.toFile(servicesURL); if (file != null && file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator( wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder .setCustomResolver(new AARFileBasedURIResolver(file)); wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null && file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator( wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver(new AARFileBasedURIResolver( file)); wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true);
equals(wsdlNamespace.getNamespaceURI())) { wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlInputStream); } else { handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0"); wsdlToAxisServiceBuilder).setCustomWSDLResolver( new CustomWSDLLocator(new InputSource(wsdlInputStream), baseURI.toString(), resourceMap, synCfg)); wsdlToAxisServiceBuilder).setCustomWSDLResolver( new CustomWSDLLocator(new InputSource(wsdlInputStream), baseURI.toString()));
throws AxisFault { ProcessConf pConf = processProxy.getProcessConfiguration(); AxisService axisService = serviceBuilder.populateService(); axisService.setParent(axisConfiguration); axisService.setWsdlFound(true);
/** * sets a custom WSDL locator * * @param customResolver */ public void setCustomWSDLResolver(WSDLLocator customResolver) { this.customWSDLResolver = customResolver; setDocumentBaseUri(this.customWSDLResolver.getBaseURI()); }
resourceMap, synCfg, wsdlKey); ((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder). setCustomWSDLResolver(userDefWSDLLocator);
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; }