/** * 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(); }
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; }
/** * 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); } }
Options options) throws AxisFault { Definition def = getDefinition(definition, serviceName); final WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(def, serviceName, portName); serviceBuilder.setServerSide(false);
final WSDLToAxisServiceBuilder builder; try { builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); } finally { if (oldTCCL != null) {
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, null, null); File file = Utils.toFile(servicesURL); WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, axisService); File file = Utils.toFile(servicesURL);
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, null, null); File file = Utils.toFile(servicesURL); WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder( wsdlStream, axisService); File file = Utils.toFile(servicesURL);
new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart());
new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart());
equals(wsdlNamespace.getNamespaceURI())) { wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlInputStream); } else { handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0");
builder = new WSDL11ToAxisServiceBuilder( wsdl4jDef, serviceQname,
equals(wsdlNamespace.getNamespaceURI())) { wsdlToAxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlInputStream); } else { handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0");
WSDL11ToAxisServiceBuilder axisServiceBuilder = new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart());
WSDL11ToAxisServiceBuilder axisServiceBuilder = new WSDL11ToAxisServiceBuilder(def, getServiceDescription().getServiceQName(), getPortQName().getLocalPart());