Java源码示例:com.sun.tools.internal.ws.wsdl.document.Port
示例1
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例2
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例3
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例4
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例5
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例6
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例7
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例8
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例9
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例10
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例11
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例12
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例13
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例14
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}
示例15
private Service parseService(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
service.setName(name);
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (service.getDocumentation() == null) {
service.setDocumentation(getDocumentationFor(e2));
}
} else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
Port port = parsePort(context, definitions, e2);
service.add(port);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, service, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
return service;
}
示例16
private Port parsePort(
TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
port.setName(name);
String bindingAttr =
Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
if (port.getDocumentation() == null) {
port.setDocumentation(getDocumentationFor(e2));
}
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, port, e2)) {
checkNotWsdlRequired(e2);
}
}
}
context.pop();
context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
return port;
}