本文整理汇总了Java中javax.wsdl.factory.WSDLFactory.newDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java WSDLFactory.newDefinition方法的具体用法?Java WSDLFactory.newDefinition怎么用?Java WSDLFactory.newDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.wsdl.factory.WSDLFactory
的用法示例。
在下文中一共展示了WSDLFactory.newDefinition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toWSDL
import javax.wsdl.factory.WSDLFactory; //导入方法依赖的package包/类
/**
* Generates WSDL-document from this web service model
* @param dispatchContext dispatch context where nested service models
* can be found
* @param locationURI SOAP location URI
* @return WSDL-document object model
* @throws GenericServiceException if exception encountered when
* getting nested service model
* @throws SAXException if XML-schema could not be parsed
* @throws WSDLException if XML-schema type could not be found
*/
public Document toWSDL(DispatchContext dispatchContext, String locationURI) throws GenericServiceException, ParserConfigurationException,
SAXException, TransformerException, WSDLException {
if (this.wsdl != null) {
return this.wsdl;
}
WSDLFactory factory = WSDLFactory.newInstance();
Definition definition = factory.newDefinition();
definition.setTargetNamespace(namespace);
definition.addNamespace("tns", namespace);
definition.addNamespace("xsd", ModelService.XSD);
definition.addNamespace("soap", SOAP);
definition.addNamespace("wsse", WSSE);
this.wsdl = modelService.generateWSDL(dispatchContext.getDelegator(), locationURI);
SchemaImpl schemaImpl = makeSchemaImpl(wsdl, namespace);
Element schema = schemaImpl.getElement();
wsdlSchema = makeValidationSchema(schema);
return this.wsdl;
}
示例2: toWSDL
import javax.wsdl.factory.WSDLFactory; //导入方法依赖的package包/类
public Document toWSDL(String locationURI) throws WSDLException {
WSDLFactory factory = WSDLFactory.newInstance();
Definition def = factory.newDefinition();
def.setTargetNamespace(TNS);
def.addNamespace("xsd", XSD);
def.addNamespace("tns", TNS);
def.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
this.getWSDL(def, locationURI);
return factory.newWSDLWriter().getDocument(def);
}
示例3: generateWSDL
import javax.wsdl.factory.WSDLFactory; //导入方法依赖的package包/类
public Document generateWSDL(Delegator delegator, String locationURI) throws WSDLException {
WSDLFactory factory = WSDLFactory.newInstance();
Definition def = factory.newDefinition();
def.setTargetNamespace(TNS);
def.addNamespace("xsd", XSD);
def.addNamespace("tns", TNS);
def.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
this.buildWSDL(delegator, def, locationURI);
return factory.newWSDLWriter().getDocument(def);
}
示例4: getWSDLDefinition
import javax.wsdl.factory.WSDLFactory; //导入方法依赖的package包/类
public static Definition getWSDLDefinition() throws WSDLException {
WSDLFactory factory = WSDLFactory.newInstance();
return factory.newDefinition();
}
示例5: getNewnDefinition
import javax.wsdl.factory.WSDLFactory; //导入方法依赖的package包/类
private Definition getNewnDefinition() throws WSDLException {
WSDLFactory factory = WSDLFactory.newInstance();
return factory.newDefinition();
}