use of com.sun.tools.ws.wsdl.framework.TWSDLParserContextImpl in project metro-jax-ws by eclipse-ee4j.
the class WSDLParser method buildWSDLDocument.
private WSDLDocument buildWSDLDocument() {
/*
Currently we are working off first WSDL document
TODO: add support of creating WSDLDocument from fromjava.collection of WSDL documents
*/
String location = forest.getRootWSDL();
// It means that WSDL is not found, an error might have been reported, lets try to recover
if (location == null)
return null;
Document root = forest.get(location);
if (root == null)
return null;
WSDLDocument document = new WSDLDocument(forest, errReceiver);
document.setSystemId(location);
TWSDLParserContextImpl context = new TWSDLParserContextImpl(forest, document, listeners, errReceiver);
Definitions definitions = parseDefinitions(context, root);
document.setDefinitions(definitions);
return document;
}
use of com.sun.tools.ws.wsdl.framework.TWSDLParserContextImpl in project metro-jax-ws by eclipse-ee4j.
the class SOAPExtensionHandler method handleInputOutputExtension.
protected boolean handleInputOutputExtension(TWSDLParserContext contextif, TWSDLExtensible parent, Element e) {
TWSDLParserContextImpl context = (TWSDLParserContextImpl) contextif;
if (XmlUtil.matchesTagNS(e, getBodyQName())) {
context.push();
context.registerNamespaces(e);
SOAPBody body = new SOAPBody(context.getLocation(e));
String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE);
if (use != null) {
if (use.equals(Constants.ATTRVALUE_LITERAL)) {
body.setUse(SOAPUse.LITERAL);
} else if (use.equals(Constants.ATTRVALUE_ENCODED)) {
body.setUse(SOAPUse.ENCODED);
} else {
Util.fail("parsing.invalidAttributeValue", Constants.ATTR_USE, use);
}
}
String namespace = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE);
if (namespace != null) {
body.setNamespace(namespace);
}
String encodingStyle = XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE);
if (encodingStyle != null) {
body.setEncodingStyle(encodingStyle);
}
String parts = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PARTS);
if (parts != null) {
body.setParts(parts);
}
parent.addExtension(body);
context.pop();
// context.fireDoneParsingEntity(getBodyQName(), body);
return true;
} else if (XmlUtil.matchesTagNS(e, getHeaderQName())) {
return handleHeaderElement(parent, e, context);
} else {
Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI());
// keep compiler happy
return false;
}
}
Aggregations