• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java XMLBeansParser类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.n52.oxf.xmlbeans.parser.XMLBeansParser的典型用法代码示例。如果您正苦于以下问题:Java XMLBeansParser类的具体用法?Java XMLBeansParser怎么用?Java XMLBeansParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

XMLBeansParser类属于org.n52.oxf.xmlbeans.parser包,在下文中一共展示了XMLBeansParser类的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: newInstance

点赞 3

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public Filter newInstance(Element filterXml) throws BaseFault {
	Element elem = null;
	QName qnEml = new QName("http://www.opengis.net/ses/0.0", "EPLFilters");
	elem = XmlUtils.getElement(filterXml, qnEml);
	if (elem != null) {
		XmlObject obj = null;
		//return a new SESConstraintFilter with EML
		try {
			obj = XMLBeansParser.parse(elem, true);
		} catch (XMLHandlingException e) {
			throw new InvalidFilterFault(e);
		}
		return new EPLFilterImpl(obj);
	}
	throw new SubscribeCreationFailedFault("Could not instantiate EPLFilter");
}
 

开发者ID:52North,
项目名称:SES,
代码行数:18,
代码来源:EPLFilterHandler.java

示例2: createFeatureCollectionWithSamplingFeature

点赞 3

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
private void createFeatureCollectionWithSamplingFeature() {
	FeatureCollectionDocument doc = FeatureCollectionDocument.Factory.newInstance();
	FeaturePropertyType member = doc.addNewFeatureCollection().addNewFeatureMember();

	SamplingFeatureDocument samplingFeature = SamplingFeatureDocument.Factory.newInstance();
	SamplingFeatureType feature2 = samplingFeature.addNewSamplingFeature();
	StringOrRefType desc = feature2.addNewDescription();
	desc.setStringValue("test");
	member.setFeature(feature2);
	
	logger.debug(doc.xmlText(options));
	
	XmlObject xo = XmlUtil.qualifySubstitutionGroup(member.getFeature(), SamplingFeatureDocument.type.getDocumentElementName(), SamplingFeatureType.type);
	if (xo == null) {
		logger.debug("Disconnected object.");
	}
	logger.debug(doc.xmlText(options));
	
	XmlUtil.qualifySubstitutionGroup(doc.getFeatureCollection(), SamplingFeatureCollectionDocument.type.getDocumentElementName());
	logger.debug(doc.xmlText(options));
	assertTrue(XMLBeansParser.validate(doc).isEmpty());
}
 

开发者ID:52North,
项目名称:SES,
代码行数:23,
代码来源:SubstitutionGroupsTest.java

示例3: testQueryCreation

点赞 3

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Test
	public void testQueryCreation() throws Exception {
		ConfigurationRegistryMockup.init();
		
		RouteSegmentType route = createRouteSegment();
		Collection<XmlError> errors = XMLBeansParser.validate(route);
		Assert.assertTrue("RouteSegment is not valid! "+ errors, errors.isEmpty());
		
		SimpleAltitudeQuery query = new SimpleAltitudeQuery("aixm:Airspace", 1, "0003D6AF-8619-4165-9FAA-8299303AA418", route.getTimeSliceArray(0).getRouteSegmentTimeSlice());
		Assert.assertTrue("Could not create simple altitude query!", query.createQuery() != null);
		
		query = new SimpleAltitudeQuery("aixm:Airspace", 1, "0003D6AF-8619-4165-9FAA-8299303AA418", createDWithin());
		Assert.assertTrue("Could not create simple altitude query!", query.createQuery() != null);
//		Map<String,String> user = new HashMap<String, String>();
//		user.put(WFSConnector.USER_KEY, "IfGI");
//		user.put(WFSConnector.PASSWORD_KEY, "test");
//		WFSConnector wfs = new WFSConnector("http://91.221.120.150:13871/cadas-aimdb/wfs", true, user);
//		XmlObject[] result = wfs.executeQuery(query);
//		
//		System.out.println(result);
	}
 

开发者ID:52North,
项目名称:SES,
代码行数:22,
代码来源:SimpleAltitudeQueryTest.java

示例4: parse

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public IData parse(InputStream input, String mimeType, String schema) {
	XmlObject request = null;
	try {
		request = XMLBeansParser.parse(input);
	} catch (XMLHandlingException e) {
		throw new RuntimeException(e);
	}
	
	if (request == null) return null;
	
	return handleInput(request);
}
 

开发者ID:52North,
项目名称:WPS4Aviation,
代码行数:14,
代码来源:AIXM51BasicParser.java

示例5: ConfigurationRegistry

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
/**
 * @param config InputStream of config file.
 * @param defaultURI the default URI of the service
 * @param unitConverter 
 */
private ConfigurationRegistry(InputStream config, String defaultURI,
		IUnitConverter unitConverter) {
	this.unitConverter = unitConverter;
	
	try {
		this.sesPortTypeEPR = new EndpointReference(new URI("http://localhost/URIfailure"));
		
		if (defaultURI != null) {
			this.sesPortTypeEPR = new EndpointReference(new URI(defaultURI));
		}
	} catch (URISyntaxException e1) {
		logger.warn(e1.getMessage(), e1);
	}
	
	this.parameters = new SESProperties();
	try {
		this.parameters.load(config);
	} catch (IOException e) {
		logger.warn(e.getMessage(), e);
	}

	/*
	 * register lax validation cases 
	 */
	XMLBeansParser.registerLaxValidationCase(GMLAbstractFeatureCase.getInstance());
	
	/*
	 * Check if we have globally deactivated validation.
	 * This could be useful in predictable environments where
	 * every request is sort of the same.
	 */
	XMLBeansParser.setValidationGloballyEnabled(Boolean.parseBoolean(
			this.parameters.getProperty(VALIDATE_XML)));
	
	this.reresubs = new ArrayList<ISubscriptionManager>();
	this.rerepubs = new ArrayList<IPublisherEndpoint>();
	this.persistencyEnabled = Boolean.parseBoolean(this.parameters.getProperty(RESUBSCRIBE_ON_STARTUP));
}
 

开发者ID:52North,
项目名称:SES,
代码行数:44,
代码来源:ConfigurationRegistry.java

示例6: parse

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public List<MapEvent> parse(NotificationMessage message) throws Exception {
	@SuppressWarnings("unchecked")
	Collection<QName> cnames = message.getMessageContentNames();

	for (QName qn : cnames) {
		if (hasWXXMContent(qn, message)) {
			return parseWXXM(XMLBeansParser.parse(message.getMessageContent(qn), false));
		}
	}
	
	return null;
}
 

开发者ID:52North,
项目名称:SES,
代码行数:14,
代码来源:WXXMParser.java

示例7: parse

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public List<MapEvent> parse(NotificationMessage message) throws Exception {
	Element content = message.getMessageContent(EVENT);

	if (content != null) {
		XmlObject obj = XMLBeansParser.parse(content, false);
		return parseAIXM(obj);
	}
	
	return null;
}
 

开发者ID:52North,
项目名称:SES,
代码行数:12,
代码来源:AIXMParser.java

示例8: parse

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public List<MapEvent> parse(NotificationMessage message) throws Exception {
	QName omQName = new QName(OM_NAMESPACE, "Observation");
	Element content = message.getMessageContent(omQName);

	if (content != null) {
		XmlObject oDoc = XMLBeansParser.parse(content, true);
		return this.parseOM((ObservationDocument) oDoc);
	}
	
	return null;
}
 

开发者ID:52North,
项目名称:SES,
代码行数:13,
代码来源:OMParser.java

示例9: registerSensorML

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
/**
 * Registers SenorML Data. including registering phenomenons at
 * the DataTypesMap (needed for subscriptions).
 * 
 * @param sml the SensorML document
 * @throws InvalidXMLContentException if an error occurred on registering
 */
public void registerSensorML(Element sml) throws XMLHandlingException {
	this.sensorML = sml;
	
	XmlObject smlDoc = XMLBeansParser.parse(sml, true);
	
	if (smlDoc != null) {
		logger.info("Registering SensorML for new Publisher...");
		
		Member[] members = ((SensorMLDocument) smlDoc).getSensorML().getMemberArray();
		List<XmlObject> systems = new ArrayList<XmlObject>();
		
		/*
		 * select all System elements.
		 */
		for (Member member : members) {
			systems.addAll(Arrays.asList(member.selectChildren(new
					QName("http://www.opengis.net/sensorML/1.0.1", "System"))));
		}

		for (XmlObject sys : systems) {
			SystemType sysDoc = (SystemType) sys;
			
			//TODO DataRecord -> auslagern
			
			OutputList outs = sysDoc.getOutputs().getOutputList();
		
			/*
			 * check outputs for possible data types
			 */
			for (IoComponentPropertyType out : outs.getOutputArray()) {
				//TODO: out.isSetAbstractDataRecord()
				if (out.isSetQuantity()) {
					DataTypesMap.getInstance().registerNewDataType(out.getName(), Double.class);
				}
			}
			
		}
	}
}
 

开发者ID:52North,
项目名称:SES,
代码行数:47,
代码来源:PublisherEndpoint.java

示例10: describeSensor

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public Element describeSensor(Element sensor_element) throws Exception {

	XmlObject xmlobject = XMLBeansParser.parse(sensor_element, true);
	String sensorID;

	if(xmlobject instanceof DescribeSensorDocument) {
		sensorID=((DescribeSensorDocument)xmlobject).getDescribeSensor().getSensorID();
	} else {
		throw new Exception(
				sensor_element.toString() + " is not a valid sensor identifier");
	}


	Collection<IPublisherEndpoint> endpoints = this.registerpublisher.getPublisherEndpoints();

	/*
	 * iterate over all endpoints. Could be made faster with either caching
	 * or hashes.
	 */
	for (IPublisherEndpoint publisherEndpoint : endpoints) {
		if (publisherEndpoint.getSensorId().equals(sensorID)) {
			return publisherEndpoint.getSensorML();
		}
	}

	throw new Exception("Sensor " +
			sensorID + " does not exist. Please check the capabilites or report an error");
}
 

开发者ID:52North,
项目名称:SES,
代码行数:30,
代码来源:Capabilites.java

示例11: createFeatureCollectionWithGridCoverage

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
private void createFeatureCollectionWithGridCoverage() {
	FeatureCollectionDocument doc = FeatureCollectionDocument.Factory.newInstance();
	FeaturePropertyType member = doc.addNewFeatureCollection().addNewFeatureMember();
	XmlUtil.qualifySubstitutionGroup(member.addNewFeature(), GridCoverageDocument.type.getDocumentElementName(), GridCoverageType.type);
	
	XmlUtil.qualifySubstitutionGroup(doc.getFeatureCollection(), SamplingFeatureCollectionDocument.type.getDocumentElementName());
	logger.debug(doc.xmlText(options));
	assertTrue(XMLBeansParser.validate(doc).isEmpty());
}
 

开发者ID:52North,
项目名称:SES,
代码行数:10,
代码来源:SubstitutionGroupsTest.java

示例12: laxValidate

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
public boolean laxValidate() {
	final SosImportConfigurationDocument doc = SosImportConfigurationDocument.Factory.newInstance();
	doc.setSosImportConfiguration(sosImpConf);
	final Collection<XmlError> exs = XMLBeansParser.validate(doc);
	for (final XmlError xmlError : exs) {
		logger.error("Xml error: ",xmlError);
	}
	return (exs.size() == 0)? true : false;
}
 

开发者ID:52North,
项目名称:sos-importer,
代码行数:10,
代码来源:Model.java

示例13: shouldSuccesfullySubscribe

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Test
public void shouldSuccesfullySubscribe()
		throws OXFException, XmlException, ExceptionReport, IOException {
	ServiceInstance.getInstance().waitUntilAvailable();
	
	logger.info("Subscribing Level 1 (XPath)...");
	
	EnvelopeDocument response = subscribe();
	
	logger.info("Response from SES: {}", response);
	
	Collection<XmlError> errors = XMLBeansParser.validate(response);
	Assert.assertTrue("Response are not valid!", errors.isEmpty());
	
	response = unsubscribe(response);
	
	logger.info("Response from SES: {}", response);
	
	errors = XMLBeansParser.validate(response);
	Assert.assertTrue("Response are not valid!", errors.isEmpty());
}
 

开发者ID:52North,
项目名称:SES,
代码行数:22,
代码来源:Level1SubscriptionIT.java

示例14: parse

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public List<MapEvent> parse(NotificationMessage message) throws Exception {
	List<MapEvent> result = null;

	Element content = message.getMessageContent(FEATURE_COLLECTION_NAME);
	if (content != null) {
		XmlObject collection = XMLBeansParser.parse(content, false);

		XmlObject[] collections = collection.selectChildren(FEATURE_COLLECTION_NAME);

		if (collections.length != 1) {
			throw new IllegalArgumentException("Currently only one wfs:FeatureCollection is supported.");
		}

		XmlObject[] members = collections[0].selectChildren(new QName(GML_NAMESPACE, "featureMember"));

		for (XmlObject memb : members) {
			XmlObject[] nuts = memb.selectChildren(DROUGHT_AFFECTED_NAME);
			if (nuts.length != 1) {
				throw new Exception("Currently only one ms:Norm_Drought_Affected_Area_by_NUTS is supported.");
			}

			parseDroughtAffectedArea(nuts[0], result);
		}
	}
	else {
		content = message.getMessageContent(new QName(MS_NAMESPACE, "Norm_Drought_Affected_Area_by_NUTS"));
		if (content == null) {
			return null;
		}
		XmlObject area = XMLBeansParser.parse(content, false);

		result = new ArrayList<MapEvent>();

		for (XmlObject ar : area.selectChildren(DROUGHT_AFFECTED_NAME)) {
			parseDroughtAffectedArea(ar, result);	
		}
		
	}


	return result;
}
 

开发者ID:52North,
项目名称:SES,
代码行数:44,
代码来源:GeossWFSParser.java

示例15: getCapabilities

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Override
public Element getCapabilities(Element xml) throws Exception {
	logger.info("creating capabilites");
	CapabilitiesDocument temp = (CapabilitiesDocument) this.capabilities.copy();

	/* add content section if missing */
	Contents content = temp.getCapabilities().getContents();
	if (content == null) {
		content = temp.getCapabilities().addNewContents();
	}

	/* read available sensors */
	Collection<IPublisherEndpoint> endpoints = this.registerpublisher.getPublisherEndpoints();
	if (endpoints.size() > 0) {
		RegisteredSensors sensors = content.addNewRegisteredSensors();

		for (IPublisherEndpoint publisherEndpoint : endpoints) {
			String sensor = publisherEndpoint.getSensorId();
			sensors.addSensorID(sensor);
		}
	}

	try {

		XMLBeansParser.strictValidate(temp);
		logger.info("capabilites are valid!");
	} catch (XMLHandlingException e) {
		throw new Exception("Internal" +
				" server error: capabilities are not valid: " + e.getMessage());
	}



	Node node = temp.getCapabilities().getDomNode();
	if(node instanceof Element) {
		logger.info("returning capabilites");
		return (Element) temp.getCapabilities().getDomNode();
	}
	throw new Exception("Expected "
			+ node.toString() + " to be an org.w3c.dom.Element, but it is " 
			+ node.getClass().getCanonicalName());
}
 

开发者ID:52North,
项目名称:SES,
代码行数:43,
代码来源:Capabilites.java

示例16: parseMessage

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
/**
 * Parses O&M document and returns instances of MapEvent.
 * @throws Exception 
 */
@SuppressWarnings("unchecked")
private List<MapEvent> parseMessage(NotificationMessage message) throws Exception {
	EsperFilterEngine.logger.debug("parsing message");

	String parserProp = ConfigurationRegistry.getInstance().getPropertyForKey(ConfigurationRegistry.PARSER).toString();
	if (parserProp.equals("generic")) {
		/*
		 * use the generic parser
		 */
		EsperFilterEngine.logger.info("... using the generic parser");
		Collection<QName> messageContentNames = message.getMessageContentNames();

		ObjectPropertyValueParser opvParser;
		List<MapEvent> result = new ArrayList<MapEvent>();

		//parse each content element
		for (QName contentName: messageContentNames) {
			Element element = message.getMessageContent(contentName);

			if (element != null) {
				//parse element and add to result
				XmlObject xmlObj = XMLBeansParser.parse(element, false);
				opvParser = new ObjectPropertyValueParser(xmlObj);
				result.addAll(opvParser.parseXML(this.unitConverter));
			}
		}

		return result;
	}
	else if (parserProp.equals("basic")) {

		/*
		 * AbstractParser instances
		 */
		for (AbstractParser parser : this.parsers) {
			if (parser.accept(message)) {
				return parser.parse(message);
			}
		}

		EsperFilterEngine.logger.warn("Non of the registered Parsers could parse the NotificationMessage. The current" +
				" registered Parsers are: "+this.parsers);

	}
	return null;
}
 

开发者ID:52North,
项目名称:SES,
代码行数:51,
代码来源:EsperFilterEngine.java

示例17: testSamplingPointCreation

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
public void testSamplingPointCreation() {
	SamplingPointDocument sa = SamplingPointDocument.Factory.newInstance();
	SamplingPointType point = sa.addNewSamplingPoint();
	FeaturePropertyType feat = point.addNewSampledFeature();
	feat.setHref("ha");
	PointPropertyType pos = point.addNewPosition();;
	PointType posP = pos.addNewPoint();
	DirectPositionType posPPos = posP.addNewPos();
	posPPos.setListValue(Arrays.asList(52.0, 6.0));
	
	SamplingFeatureType feature = SamplingFeatureType.Factory.newInstance();
	feat.setFeature(feature);
	XmlUtil.qualifySubstitutionGroup(feat.getFeature(), SamplingFeatureDocument.type.getDocumentElementName());
	
	BoundingShapeType bb = point.addNewBoundedBy();
	EnvelopeType env = bb.addNewEnvelope();
	env.setSrsName("EPSG:4326");
	DirectPositionType low = env.addNewPos();
	low.setListValue(Arrays.asList(52.0, 7.0));
	DirectPositionType up = env.addNewPos();
	up.setListValue(Arrays.asList(53.0, 8.0));
	
	XMLBeansParser.registerLaxValidationCase(new LaxValidationCase() {
		@Override
		public boolean shouldPass(XmlValidationError xve) {
			if (xve.getExpectedQNames() != null &&
					xve.getExpectedQNames().contains(
							FeatureDocument.type.getDocumentElementName())) {
				return true;
			}
			return false;
		}

		@Override
		public boolean shouldPass(XmlError validationError) {
			if (validationError instanceof XmlValidationError) {
				return shouldPass((XmlValidationError) validationError);
			}
			return false;
		}
	});
	Collection<XmlError> err = XMLBeansParser.validate(sa);
	assertTrue(err.isEmpty());
	
	SamplingPointDocument parsedSa;
	try {
		parsedSa = SamplingPointDocument.Factory.parse(sa.toString());
		err = XMLBeansParser.validate(parsedSa);
		assertTrue(err.isEmpty());
	} catch (XmlException e) {
		e.printStackTrace();
	}
	
}
 

开发者ID:52North,
项目名称:SES,
代码行数:55,
代码来源:SamplingPointTest.java

示例18: unwrapSensorMLFrom

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
public static SensorMLDocument unwrapSensorMLFrom(XmlObject xmlObject) throws XmlException, XMLHandlingException, IOException {
    if (SoapUtil.isSoapEnvelope(xmlObject)) {
        xmlObject = SoapUtil.stripSoapEnvelope(xmlObject);
    }
    if (xmlObject instanceof SensorMLDocument) {
        return (SensorMLDocument) xmlObject;
    }
    if (xmlObject instanceof DescribeSensorResponseDocument) {
        DescribeSensorResponseDocument responseDoc = (DescribeSensorResponseDocument) xmlObject;
        DescribeSensorResponseType response = responseDoc.getDescribeSensorResponse();
        DescribeSensorResponseType.Description[] descriptionArray = response.getDescriptionArray();
        if (descriptionArray.length == 0) {
            LOGGER.warn("No SensorDescription available in response!");
        }
        else {
            for (DescribeSensorResponseType.Description description : descriptionArray) {
                SensorDescriptionType.Data dataDescription = description.getSensorDescription().getData();
                String namespace = "declare namespace gml='http://www.opengis.net/gml'; ";
                for (XmlObject xml : dataDescription.selectPath(namespace + "$this//*/@gml:id")) {
                    XmlCursor cursor = xml.newCursor();
                    String gmlId = cursor.getTextValue();
                    if ( !NcNameResolver.isNCName(gmlId)) {
                        cursor.setTextValue(NcNameResolver.fixNcName(gmlId));
                    }
                }
                XmlObject object = XmlObject.Factory.parse(dataDescription.xmlText());
                if (object instanceof SystemDocumentImpl) {
                    SensorMLDocument smlDoc = SensorMLDocument.Factory.newInstance();
                    SensorMLDocument.SensorML.Member member = smlDoc.addNewSensorML().addNewMember();
                    member.set(XMLBeansParser.parse(object.newInputStream()));
                    return smlDoc;
                }

                return SensorMLDocument.Factory.parse(dataDescription.newInputStream());
            }
        }
    }

    LOGGER.warn("Failed to unwrap SensorML from '{}'. Return an empty description.", xmlObject.xmlText());
    return SensorMLDocument.Factory.newInstance();
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:42,
代码来源:DescribeSensorParser.java

示例19: havingRule_parseEmlFromBasicRule_noXmlErrors

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Test public void 
havingRule_parseEmlFromBasicRule_noXmlErrors() 
throws Exception {
    String eml = builder.create_BR_5(rule).getEml();
    assertThat(XMLBeansParser.validate(XmlObject.Factory.parse(eml)), is(empty()));
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:7,
代码来源:BasicRule_5_BuilderTest.java

示例20: havingRule_parseEmlFromBasicRule_noXmlErrors

点赞 2

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Test public void 
havingRule_parseEmlFromBasicRule_noXmlErrors() 
throws Exception {
    String eml = builder.create(rule).getEml();
    assertThat(XMLBeansParser.validate(XmlObject.Factory.parse(eml)), is(empty()));
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:7,
代码来源:BasicRule_4_BuilderTest.java

示例21: shouldReceiveValidCapabilities

点赞 1

import org.n52.oxf.xmlbeans.parser.XMLBeansParser; //导入依赖的package包/类
@Test
public void shouldReceiveValidCapabilities() throws OXFException, XmlException, ExceptionReport, IOException {
	ServiceInstance.getInstance().waitUntilAvailable();
	
	logger.info("Requesting Capabilities...");
	
	EnvelopeDocument response = requestCapabilities();
	
	logger.info("Response from SES: {}", response);
	
	Collection<XmlError> errors = XMLBeansParser.validate(response);
	Assert.assertTrue("Capabilities are not valid!", errors.isEmpty());
}
 

开发者ID:52North,
项目名称:SES,
代码行数:14,
代码来源:GetCapabilitiesIT.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)