/** * Print the WSDL with a default URL. This will be called only during * codegen time. * * @param out The output stream for the data to be written. NOTE: the stream is not closed after the operation, * it is the responsibility of the caller to close the stream after usage. * @throws AxisFault */ public void printWSDL(OutputStream out) throws AxisFault { printWSDL(out, null); }
response.setStatus(HttpStatus.SC_OK); response.setContentType("text/xml"); service.printWSDL(response.getOutputStream(), getHost(request)); } else { response.setStatus(HttpStatus.SC_FORBIDDEN);
/** * Print the WSDL with a default URL. This will be called only during * codegen time. * * @param out The output stream for the data to be written. NOTE: the stream is not closed after the operation, * it is the responsibility of the caller to close the stream after usage. * @throws AxisFault */ public void printWSDL(OutputStream out) throws AxisFault { printWSDL(out, null); }
response.setStatus(HttpStatus.SC_OK); response.setContentType("text/xml"); service.printWSDL(response.getOutputStream(), getHost(request)); } else { response.setStatus(HttpStatus.SC_FORBIDDEN);
public void writeWSDL(AxisService axisService) { try { if (axisService != null) { //create a output file File outputFile = FileWriter.createClassFile(baseFolder, null, axisService.getName(), ".wsdl"); FileOutputStream fos = new FileOutputStream(outputFile); axisService.printWSDL(fos); fos.flush(); fos.close(); } } catch (Exception e) { throw new RuntimeException("WSDL writing failed!", e); } }
private void handleWSDLRequest(HttpServletRequest req, HttpServletResponse res, String url, AxisService axisService) throws IOException { if (!canExposeServiceMetadata(axisService)){ res.sendError(HttpServletResponse.SC_FORBIDDEN); return; } OutputStream out = res.getOutputStream(); res.setContentType("text/xml"); String ip = extractHost(url); String wsdlName = getParamtereIgnoreCase(req , "wsdl"); if (wsdlName != null && wsdlName.length()>0) { axisService.printUserWSDL(out, wsdlName, ip); } else { axisService.printWSDL(out, ip); } }
private void handleWSDLRequest(HttpServletRequest req, HttpServletResponse res, String url, AxisService axisService) throws IOException { if (!canExposeServiceMetadata(axisService)){ res.sendError(HttpServletResponse.SC_FORBIDDEN); return; } OutputStream out = res.getOutputStream(); res.setContentType("text/xml"); String ip = extractHost(url); String wsdlName = getParamtereIgnoreCase(req , "wsdl"); if (wsdlName != null && wsdlName.length()>0) { axisService.printUserWSDL(out, wsdlName, ip); } else { axisService.printWSDL(out, ip); } }
axisService.printWSDL(out, ip);
axisService.getName() + ".wsdl"); OutputStream wbOut = new FileOutputStream(wsdlF); axisService.printWSDL(wbOut, NetworkUtils.getLocalHostname());
String parameterValue = parameters.get("wsdl"); if (parameterValue == null) { service.printWSDL(output, getIpAddress()); } else {
String parameterValue = parameters.get("wsdl"); if (parameterValue == null) { service.printWSDL(baos, getIpAddress()); } else {
/** * Test that a proxy service without publishWSDL will produce a meaningful WSDL. * This is a regression test for SYNAPSE-366. */ public void testWSDLWithoutPublishWSDL() throws Exception { // Build the proxy service SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration axisCfg = new AxisConfiguration(); ProxyService proxyService = new ProxyService("Test"); AxisService axisService = proxyService.buildAxisService(synCfg, axisCfg); // Serialize the WSDL ByteArrayOutputStream baos = new ByteArrayOutputStream(); axisService.printWSDL(baos); // Check that the produced WSDL can be read by WSDL4J WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); wsdlReader.readWSDL(null, new InputSource(new ByteArrayInputStream(baos.toByteArray()))); }
axisService.printWSDL(new ByteArrayOutputStream());