本文整理了Java中javax.wsdl.Import.getLocationURI()
方法的一些代码示例,展示了Import.getLocationURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Import.getLocationURI()
方法的具体详情如下:
包路径:javax.wsdl.Import
类名称:Import
方法名:getLocationURI
[英]Get the location URI of this import.
[中]获取此导入的位置URI。
代码示例来源:origin: wsdl4j/wsdl4j
pw);
DOMUtils.printAttribute(Constants.ATTR_LOCATION,
importDef.getLocationURI(),
pw);
代码示例来源:origin: org.codehaus.xfire/xfire-core
if (!definitionPaths.contains(i.getLocationURI()))
log.info("Adding wsdl definition " + i.getLocationURI() +
" with baseURI of " + parent.getDocumentBaseURI());
definitionPaths.add(i.getLocationURI());
String resolvedLocation;
if (baseURI == null)
resolvedLocation = new URI(i.getLocationURI()).toString();
else
resolvedLocation = new URI(parent.getDocumentBaseURI()).resolve(i.getLocationURI()).toString();
throw new XFireRuntimeException("Couldn't resolve location " + i.getLocationURI(), e);
代码示例来源:origin: org.apache.axis2/axis2-kernel
for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
wsdlImport = (Import) valuesIter.next();
if (wsdlImport.getLocationURI().endsWith(name)) {
importedDefinition = wsdlImport.getDefinition();
break;
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
/**
* (non-Javadoc)
* @see org.eclipse.wst.wsi.wsdl.traversal.WSDLVisitor#visit(Import, Object, WSDLTraversalContext)
*/
public void visit(Import obj, Object parent, WSDLTraversalContext ctx)
{
if(obj != null)
{
if(isRelativeURI(obj.getNamespaceURI()) ||
isRelativeURI(obj.getLocationURI()))
{
errorList.add(obj.getNamespaceURI(), obj.getLocationURI());
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
/**
* (non-Javadoc)
* @see org.eclipse.wst.wsi.wsdl.traversal.WSDLVisitor#visit(Import, Object, WSDLTraversalContext)
*/
public void visit(Import obj, Object parent, WSDLTraversalContext ctx)
{
if(obj != null)
{
if(isRelativeURI(obj.getNamespaceURI()) ||
isRelativeURI(obj.getLocationURI()))
{
errorList.add(obj.getNamespaceURI(), obj.getLocationURI());
}
}
}
代码示例来源:origin: apache/axis2-java
for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
wsdlImport = (Import) valuesIter.next();
if (wsdlImport.getLocationURI().endsWith(name)) {
importedDefinition = wsdlImport.getDefinition();
break;
代码示例来源:origin: org.apache.axis/axis
Import imp = (Import) v.get(j);
if (!importedFiles.contains(imp.getLocationURI())) {
importedFiles.add(imp.getLocationURI());
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public AssertionResult validate(
TestAssertion testAssertion,
EntryContext entryContext)
throws WSIException
{
result = AssertionResult.RESULT_FAILED;
Import im = (Import) entryContext.getEntry().getEntryDetail();
// suppose that if location is invalid, the definition equals to null
if (im.getLocationURI() == null || im.getLocationURI() == "")
errors.add(im.getNamespaceURI(), im.getLocationURI());
if (!errors.isEmpty())
{
result = AssertionResult.RESULT_FAILED;
failureDetail = this.validator.createFailureDetail(errors.toString(), entryContext);
}
else
result = AssertionResult.RESULT_PASSED;
return validator.createAssertionResult(testAssertion, result, failureDetail);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public AssertionResult validate(
TestAssertion testAssertion,
EntryContext entryContext)
throws WSIException
{
result = AssertionResult.RESULT_FAILED;
Import im = (Import) entryContext.getEntry().getEntryDetail();
// suppose that if location is invalid, the definition equals to null
if (im.getLocationURI() == null || im.getLocationURI() == "")
errors.add(im.getNamespaceURI(), im.getLocationURI());
if (!errors.isEmpty())
{
result = AssertionResult.RESULT_FAILED;
failureDetail = this.validator.createFailureDetail(errors.toString(), entryContext);
}
else
result = AssertionResult.RESULT_PASSED;
return validator.createAssertionResult(testAssertion, result, failureDetail);
}
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
try
{
// by the way : WSDL4J throws Exception if imported WSDL is not resolved
// but documentation says that im.getDefinition() will be equal to null
if (im.getDefinition() == null)
errors.add(
im.getNamespaceURI()
+ ":"
+ im.getLocationURI()
+ "\nImport element does not reference a WSDL definition.");
}
catch (Exception e)
{
errors.add(
im.getNamespaceURI()
+ ":"
+ im.getLocationURI()
+ "\nImport element does not reference a WSDL definition.");
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
try
{
// by the way : WSDL4J throws Exception if imported WSDL is not resolved
// but documentation says that im.getDefinition() will be equal to null
if (im.getDefinition() == null)
errors.add(
im.getNamespaceURI()
+ ":"
+ im.getLocationURI()
+ "\nImport element does not reference a WSDL definition.");
}
catch (Exception e)
{
errors.add(
im.getNamespaceURI()
+ ":"
+ im.getLocationURI()
+ "\nImport element does not reference a WSDL definition.");
}
}
代码示例来源:origin: org.apache.axis2/axis2-kernel
for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
wsdlImport = (Import) valuesIter.next();
originalImprotString = wsdlImport.getLocationURI();
if (originalImprotString.indexOf("://") == -1 && originalImprotString.indexOf("?wsdl=") == -1){
wsdlImport.setLocationURI(this.getServiceEPR() + "?wsdl=" + originalImprotString);
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
if (im.getDefinition() != null && im.getLocationURI() != null)
processWSDL(im.getDefinition().getDocumentBaseURI());
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
if (im.getDefinition() != null && im.getLocationURI() != null)
processWSDL(im.getDefinition().getDocumentBaseURI());
}
代码示例来源:origin: org.wso2.wsdl4j/wsdl4j
pw);
DOMUtils.printAttribute(Constants.ATTR_LOCATION,
importDef.getLocationURI(),
pw);
代码示例来源:origin: org.apache.servicemix/servicemix-http
protected void mapImports(Definition def, String contextPath) throws WSDLException {
// Add other imports to mapping
Map imports = def.getImports();
for (Iterator iter = imports.values().iterator(); iter.hasNext();) {
List imps = (List) iter.next();
for (Iterator iterator = imps.iterator(); iterator.hasNext();) {
Import imp = (Import) iterator.next();
Definition impDef = imp.getDefinition();
String impLoc = imp.getLocationURI();
if (impDef != null && impLoc != null && !URI.create(impLoc).isAbsolute()) {
impLoc = resolveRelativeURI(contextPath, impLoc);
addResource(impLoc, javax.wsdl.factory.WSDLFactory.newInstance().newWSDLWriter().getDocument(impDef));
mapImports(impDef, getURIParent(impLoc));
}
}
}
// Add schemas to mapping
Types types = def.getTypes();
if (types != null) {
for (Iterator it = types.getExtensibilityElements().iterator(); it.hasNext();) {
ExtensibilityElement ee = (ExtensibilityElement) it.next();
if (ee instanceof Schema) {
Schema schema = (Schema) ee;
mapSchema(schema, "");
}
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
Definition def = im.getDefinition();
if (def != null)
{
if (!NullUtil.equals(im.getNamespaceURI(), def.getTargetNamespace()))
errors.add(
new QName(im.getNamespaceURI(), im.getLocationURI()),
new QName(def.getTargetNamespace(), def.getDocumentBaseURI()));
}
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void visit(Import im, Object parent, WSDLTraversalContext ctx)
{
importFound = true;
Definition def = im.getDefinition();
if (def != null)
{
if (!NullUtil.equals(im.getNamespaceURI(), def.getTargetNamespace()))
errors.add(
new QName(im.getNamespaceURI(), im.getLocationURI()),
new QName(def.getTargetNamespace(), def.getDocumentBaseURI()));
}
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
valinfo.addError(messagegenerator.getString("_UNABLE_TO_IMPORT_BAD_LOCATION", "'" + importDef.getLocationURI() + "'"), importingDocImportElement);
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
entry.setEntryContainer(getEntryContainer(wsdlImport.getLocationURI()));
内容来源于网络,如有侵权,请联系作者删除!