本文整理匯總了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();
}