Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5886 - in trunk/perfsonar-java-xml-ls: . doc/test samples/requests samples/responses src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao src/test/java/org/perfsonar/tests/utilities src/test/soapUI src/test/soapUI/lib src/test/soapUI/rnc src/test/soapUI/src/org/perfsonar/soapUI/ls

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/ps-java-services] r5886 - in trunk/perfsonar-java-xml-ls: . doc/test samples/requests samples/responses src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao src/test/java/org/perfsonar/tests/utilities src/test/soapUI src/test/soapUI/lib src/test/soapUI/rnc src/test/soapUI/src/org/perfsonar/soapUI/ls


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5886 - in trunk/perfsonar-java-xml-ls: . doc/test samples/requests samples/responses src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao src/test/java/org/perfsonar/tests/utilities src/test/soapUI src/test/soapUI/lib src/test/soapUI/rnc src/test/soapUI/src/org/perfsonar/soapUI/ls
  • Date: Wed, 11 Jan 2012 17:27:49 +0000 (GMT)

Author: dante.delvaux
Date: 2012-01-11 17:27:49 +0000 (Wed, 11 Jan 2012)
New Revision: 5886

Added:
trunk/perfsonar-java-xml-ls/src/test/soapUI/lib/jing-20091111.jar
trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/
trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/filter.rnc
trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmbase.rnc
trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmtime.rnc
Removed:
trunk/perfsonar-java-xml-ls/src/test/soapUI/xsd/
Modified:
trunk/perfsonar-java-xml-ls/
trunk/perfsonar-java-xml-ls/doc/test/LS - Functional Testing Specification
Document (LS 1.5 - MDM 3.3).doc
trunk/perfsonar-java-xml-ls/pom.xml
trunk/perfsonar-java-xml-ls/samples/requests/LSQueryRequest-Discovery.xml
trunk/perfsonar-java-xml-ls/samples/responses/LSQueryResponse-Discovery.xml

trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java

trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java

trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao/MultipleFilesDAOImpl.java

trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java

trunk/perfsonar-java-xml-ls/src/test/soapUI/perfsonar-LS-base2-soapui-project.xml

trunk/perfsonar-java-xml-ls/src/test/soapUI/src/org/perfsonar/soapUI/ls/TestUtil.java
Log:
Updating and improving the functional test suite built upon soapUI.


Property changes on: trunk/perfsonar-java-xml-ls
___________________________________________________________________
Added: svn:ignore
+ jars

bin

target

.classpath

.project

.settings


Modified: trunk/perfsonar-java-xml-ls/doc/test/LS - Functional Testing
Specification Document (LS 1.5 - MDM 3.3).doc
===================================================================
(Binary files differ)

Modified: trunk/perfsonar-java-xml-ls/pom.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/pom.xml 2011-10-20 09:48:23 UTC (rev 5885)
+++ trunk/perfsonar-java-xml-ls/pom.xml 2012-01-11 17:27:49 UTC (rev 5886)
@@ -32,6 +32,7 @@
<source>1.6</source>
<target>1.6</target>
</configuration>
+ <version>2.3.2</version>
</plugin>

<plugin>
@@ -97,6 +98,7 @@
</resource>
</webResources>
</configuration>
+ <version>2.1.1</version>
</plugin>

<plugin>
@@ -134,6 +136,60 @@
</executions>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to
store Eclipse m2e settings only. It has no influence on the Maven build
itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+
<artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+
<pluginExecution>
+
<pluginExecutionFilter>
+
<groupId>
+
com.google.code.maven-replacer-plugin
+
</groupId>
+
<artifactId>
+
maven-replacer-plugin
+
</artifactId>
+
<versionRange>
+
[1.3,)
+
</versionRange>
+
<goals>
+
<goal>replace</goal>
+
</goals>
+
</pluginExecutionFilter>
+
<action>
+
<ignore></ignore>
+
</action>
+
</pluginExecution>
+
<pluginExecution>
+
<pluginExecutionFilter>
+
<groupId>
+
org.apache.maven.plugins
+
</groupId>
+
<artifactId>
+
maven-antrun-plugin
+
</artifactId>
+
<versionRange>
+
[1.3,)
+
</versionRange>
+
<goals>
+
<goal>run</goal>
+
</goals>
+
</pluginExecutionFilter>
+
<action>
+
<ignore></ignore>
+
</action>
+
</pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<reporting>
<plugins>
@@ -149,6 +205,7 @@
</reports>
</reportSet>
</reportSets>
+ <version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -240,11 +297,6 @@
<artifactId>antlr</artifactId>
<version>2.7.2</version>
</dependency>
- <dependency>
- <groupId>exist</groupId>
- <artifactId>exist-xmldb</artifactId>
- <version>1.0rc</version>
- </dependency>
</dependencies>

<profiles>
@@ -274,4 +326,11 @@
</profile>
</profiles>

+ <organization>
+ <name>perfSONAR</name>
+ <url>http://perfsonar.forge.geant.net</url>
+ </organization>
+ <issueManagement>
+
<url>https://forge.geant.net/forge/display/perfsonar/Contact</url>
+ </issueManagement>
</project>

Modified:
trunk/perfsonar-java-xml-ls/samples/requests/LSQueryRequest-Discovery.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/samples/requests/LSQueryRequest-Discovery.xml
2011-10-20 09:48:23 UTC (rev 5885)
+++ trunk/perfsonar-java-xml-ls/samples/requests/LSQueryRequest-Discovery.xml
2012-01-11 17:27:49 UTC (rev 5886)
@@ -1,5 +1,3 @@
-<!-- Begin XML -->
-
<?xml version='1.0' encoding='UTF-8'?>
<nmwg:message type="LSQueryRequest"
id="LSDiscoveryRequest"
@@ -33,7 +31,7 @@
<nmwg:parameter name="keyword">project:Geant2</nmwg:parameter>
</summary:parameters>

-<!-- the combination of all things is an 'and' relationsip, this entire
subject is therefore:
+<!-- the combination of all things is an 'and' relationship, this entire
subject is therefore:

('128.4.133.167' or '128.4.100.45') and
('udel.edu' or 'edu') and
@@ -52,6 +50,4 @@

<nmwg:data metadataIdRef="meta1" id="d1"/>

-</nmwg:message>
-
-<!-- End XML -->
+</nmwg:message>
\ No newline at end of file

Modified:
trunk/perfsonar-java-xml-ls/samples/responses/LSQueryResponse-Discovery.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/samples/responses/LSQueryResponse-Discovery.xml
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/samples/responses/LSQueryResponse-Discovery.xml
2012-01-11 17:27:49 UTC (rev 5886)
@@ -1,5 +1,3 @@
-<!-- Begin XML -->
-
<?xml version='1.0' encoding='UTF-8'?>
<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
messageIdRef="LSDiscoveryRequest"
@@ -47,5 +45,3 @@
</nmwg:data>

</nmwg:message>
-
-<!-- End XML -->

Modified:
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
2012-01-11 17:27:49 UTC (rev 5886)
@@ -148,6 +148,7 @@
q.append("for $d in
/nmwg:store[@type='LSStore']/nmwg:data
\n");

// generate query conditions
+ // TODO: we should transform this where clause, it
brings bad performance with eXist, xpath expression should be preferred
q.append("where \n");

int i = 0;

Modified:
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2012-01-11 17:27:49 UTC (rev 5886)
@@ -75,9 +75,9 @@
/**
* registers database Class
*/
- @SuppressWarnings("unchecked")
private void registerDatabase(){
try {
+ @SuppressWarnings("rawtypes")
Class cl =
Class.forName("org.exist.xmldb.DatabaseImpl");
Database database = (Database) cl.newInstance();
DatabaseManager.registerDatabase(database);

Modified:
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao/MultipleFilesDAOImpl.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao/MultipleFilesDAOImpl.java
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao/MultipleFilesDAOImpl.java
2012-01-11 17:27:49 UTC (rev 5886)
@@ -59,10 +59,10 @@
}
} catch (XMLStreamException e1) {
throw new PerfSONARException("error/parse",
- "Cannot serialize elements in
MulipleFilesExistDAOImpl");
+ "Cannot serialize elements in
MultipleFilesExistDAOImpl");
} catch (IOException e1) {
throw new PerfSONARException("error/parse",
- "Cannot serialize elements in
MulipleFilesExistDAOImpl");
+ "Cannot serialize elements in
MultipleFilesExistDAOImpl");
}



Modified:
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
2012-01-11 17:27:49 UTC (rev 5886)
@@ -15,7 +15,7 @@

.getConfiguration().getAuxiliaryComponent("existAccessManager");
}

- public void testExitDbInitializer() throws Exception {
+ public void testExistDbInitializer() throws Exception {

XMLDBComponent component = getDBAccessManager();


Added: trunk/perfsonar-java-xml-ls/src/test/soapUI/lib/jing-20091111.jar
===================================================================
(Binary files differ)


Property changes on:
trunk/perfsonar-java-xml-ls/src/test/soapUI/lib/jing-20091111.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream

Modified:
trunk/perfsonar-java-xml-ls/src/test/soapUI/perfsonar-LS-base2-soapui-project.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/soapUI/perfsonar-LS-base2-soapui-project.xml
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/test/soapUI/perfsonar-LS-base2-soapui-project.xml
2012-01-11 17:27:49 UTC (rev 5886)
@@ -1,5 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
-<con:soapui-project name="perfsonar-LS-base2" resourceRoot="${projectDir}"
soapui-version="3.0.1" abortOnError="false" runType="SEQUENTIAL"
defaultScriptLanguage="Groovy"
xmlns:con="http://eviware.com/soapui/config";><con:settings/><con:interface
xsi:type="con:WsdlInterface" wsaVersion="NONE"
name="LookupServiceSoap11Binding" type="wsdl"
bindingName="{http://axis2interface.service.base2.perfsonar.org}LookupServiceSoap11Binding";
soapVersion="1_1" anonymous="optional"
definition="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:settings/><con:definitionCache
type="TEXT"
rootPart="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl";><con:part><con:url>http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions
targetNamespace="http://axis2interface.service.base2.perfsonar.org";
xmlns:wsdl="http://schemas.xmlsoap.org/ws
dl/" xmlns:ns1="http://org.apache.axis2/xsd";
xmlns:ns="http://axis2interface.service.base2.perfsonar.org";
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";>
+<con:soapui-project name="perfSONAR - Lookup Service"
resourceRoot="${projectDir}" soapui-version="4.0.1.1" abortOnError="false"
runType="SEQUENTIAL" defaultScriptLanguage="Groovy"
xmlns:con="http://eviware.com/soapui/config";><con:description>Full
functionnal test suite for the perfSONAR Lookup Service.
+
+This test suite targets any LS implementation. Currently, some exceptions
are made in the test cases when the behavior of GEANT and Internet2 services
differ.
+
+For this project to run, two libraries must by available in the bin/ext
soapUI directory:
+- jing.jar (works well with v20091111),
+- org.perfsonar.sopaUI.ls.jar (which contains the TestUtil java class)
+</con:description><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction@values-local"><![CDATA[<xml-fragment
xmlns:con="http://eviware.com/soapui/config";>
+ <con:entry key="Global Properties" value=""/>
+ <con:entry key="TestSuite" value="Initialisation"/>
+ <con:entry key="Report to Generate" value=""/>
+ <con:entry key="Password" value=""/>
+ <con:entry key="soapui-setings.xml Password" value=""/>
+ <con:entry key="TestRunner Path" value=""/>
+ <con:entry key="Tool Args" value=""/>
+ <con:entry key="Ignore Errors" value="false"/>
+ <con:entry key="Host:Port" value=""/>
+ <con:entry key="WSS Password Type" value=""/>
+ <con:entry key="Save Project" value="false"/>
+ <con:entry key="Enable UI" value="false"/>
+ <con:entry key="System Properties" value=""/>
+ <con:entry key="Domain" value=""/>
+ <con:entry key="Coverage Report" value="false"/>
+ <con:entry key="Export JUnit Results" value="false"/>
+ <con:entry key="Open Report" value="false"/>
+ <con:entry key="Project Properties" value=""/>
+ <con:entry key="Project Password" value=""/>
+ <con:entry key="Export All" value="false"/>
+ <con:entry key="Report Format(s)" value=""/>
+ <con:entry key="TestCase" value="Empty DB"/>
+ <con:entry key="Print Report" value="true"/>
+ <con:entry key="Username" value=""/>
+ <con:entry key="Root Folder" value=""/>
+ <con:entry key="Save After" value="false"/>
+ <con:entry key="Add Settings" value="false"/>
+ <con:entry key="Endpoint"
value="http://ls:8180/perfsonar-java-xml-ls/services/LookupService"/>
+</xml-fragment>]]></con:setting></con:settings><con:interface
xsi:type="con:WsdlInterface" wsaVersion="NONE"
name="LookupServiceSoap12Binding" type="wsdl"
bindingName="{http://axis2interface.service.base2.perfsonar.org}LookupServiceSoap12Binding";
soapVersion="1_1" anonymous="optional"
definition="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl";
id="68954cc7-96cd-4b2f-b88c-95ce0dae3dff"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:settings/><con:definitionCache
type="TEXT"
rootPart="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl";><con:part><con:url>http://localhost:8080/perfsonar-java-xml-ls/services/LookupService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions
targetNamespace="http://axis2interface.service.base2.perfsonar.org";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:ns1="http://org.apache.axis2/xsd";
xmlns:ns="http://axis2interface.service.base2.perfsonar.org";
xmlns:wsaw="http://www.w3.org/2006/0
5/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";>
<wsdl:documentation>LookupService</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://axis2interface.service.base2.perfsonar.org";>
@@ -78,7 +114,7 @@
<http:address
location="http://150.254.149.195:8080/perfsonar-java-xml-ls/services/LookupService.LookupServiceHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
-</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.254.149.194:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://ndb1.internet2.edu:9991/perfSONAR_PS/services/gLS</con:endpoint><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://10.0.0.2:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.140.8.15:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.140.8.58:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://localhost:8080/xxx/services/LookupService</con:endpoint><con:endpoint>http://ls.sonar.net.switch.ch:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><
/con:endpoints><con:operation isOneWay="false" action="urn:message"
name="message" bindingOperationName="message" type="Request-Response"
inputName="" receivesAttachments="false" sendsAttachments="false"
anonymous="optional"><con:settings/><con:call name="discovery" outgoingWss=""
incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.254.149.194:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://ndb1.internet2.edu:9991/perfSONAR_PS/services/gLS</con:endpoint><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.140.8.15:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://150.140.8.58:8080/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://ls:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://ls.sonar.net.switch.ch:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint></con:endpoin
ts><con:operation isOneWay="false" action="urn:message" name="message"
bindingOperationName="message" type="Request-Response" inputName=""
receivesAttachments="false" sendsAttachments="false" anonymous="optional"
id="a31dafe9-07ce-48f6-a8b6-f30ba72fa8b8"><con:settings/><con:call
name="discovery" outgoingWss="" incomingWss=""
id="aa5c6df3-469a-4fb9-8dc8-ae2d02be6eef"><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://ls:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
<soapenv:Header/>
<soapenv:Body>

@@ -142,7 +178,7 @@
<!-- End XML -->

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="query" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="query" outgoingWss=""
incomingWss=""
id="4a6f890a-f7c3-467c-897c-9f37e4a941fa"><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
<nmwg:message
@@ -167,7 +203,7 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="dfasva" outgoingWss=""
incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
+</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="dfasva" outgoingWss=""
incomingWss=""
id="b578b2bd-75e7-4f89-9bc4-712e24e1f6da"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Body>

<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
id="message1262167219" type="EchoRequest">
@@ -178,7 +214,7 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="dfasf" outgoingWss=""
incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
+</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call><con:call name="dfasf" outgoingWss=""
incomingWss=""
id="c6a43cf4-5122-4868-93d5-17306a146c5e"><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://ls:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Body>
<nmwg:message type="LSRegisterRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
@@ -241,7 +277,7 @@

</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call></con:operation></con:interface><con:testSuite
name="Registration"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="b9504be0-bb86-4655-b561-e1c060281525" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508" action="urn:message"/><con:wsrmConfig
version="1.2"/></con:call></con:operation></con:interface><con:testSuite
name="Initialisation"
id="a7f72c6e-c45f-4301-abbb-787508f41f93"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Empty DB" searchProperties="true"
id="874b9875-20c3-4bde-9f2f-5a1328af0450"><con:settings/><con:testStep
type="groovy" name="Init Empty DB"
id="188b5050-b1bb-4121-a8d9-685897ebcd5f"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;

def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
@@ -252,467 +288,271 @@
def stream = TestUtil.openStream(urlString,user,pass)
stream.eachLine{
if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
+ log.info("DB can't be initialized : "+urlString)
assert false
}else{
log.info("DB initialized")
}
}
-</script></con:config></con:testStep><con:testStep type="request"
name="2.1.2.1.1"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
+</script></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite
name="Registration"
id="18698594-68e0-4f8b-9e8c-028a8c752e78"><con:description>Test Suite for
registration requests. The tests are divided as follows:
+- Generic Single Registration request
+- Generic Double Registration request (2 services in a single message)
+- Various tests using those generic single and double registration test
steps:
+ - Correct requests
+ - Malformed requests
+ - requests with Invalid data

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+At the beginning of this test suite, the DB is initialised (empty), see
Setup Script. Most of those tests use the variables (properties) defined at
the project level. Some tests are re-used in the following test suites (see
their descriptions).

-
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
+A Load Test of registrations has also been implemented to see how the
service cope with a lot of incoming request
queries.</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Single Registration" searchProperties="true"
id="3e654b7b-53a4-4f13-8628-6d7bfc9c4512"><con:description>Register a single
service and get back the resulting
lsKey</con:description><con:settings/><con:testStep type="request"
name="Single Service Registration"
id="d48c2e06-1479-4918-b27a-fc2d1f6aaba3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Single Service Registration" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:s
etting><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Single Service registration with data -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
+ <soapenv:Header/>
+ <soapenv:Body>
+ <nmwg:message type="LSRegisterRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; id="msg1">
+ <nmwg:metadata id="RegInfo">
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <psservice:serviceName>${#Project#ServiceName} -
${#TestCase#ParentThread} - ${#TestCase#Counter}</psservice:serviceName>
+
<psservice:accessPoint>${#TestCase#accessPoint}</psservice:accessPoint>
+
<psservice:serviceType>${#Project#ServiceType}</psservice:serviceType>
<psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
+ ${#TestCase#ParentThread} - ${#TestCase#Counter}
+ ${#Project#ServiceDescription}
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
+ <nmwg:data id="data0" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta1">
+ <perfsonar:subject id="subj1"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+
<nmwgt:hostName>h${#TestCase#ParentThread}-${#TestCase#Counter}.${#Project#Interface-hostName}</nmwgt:hostName>
+ <nmwgt:ifName>unknown</nmwgt:ifName>
+
<nmwgt:ifDescription>${#Project#Interface-Description}</nmwgt:ifDescription>
+ <nmwgt:ifAddress type="ipv4">
+
${#Project#Interface-AddressIPv4}.${=${#TestCase#ParentThread}+1}.${=Integer.parseInt("${#TestCase#Counter}").mod(254)+1}
+ </nmwgt:ifAddress>
+ <nmwgt:direction>in</nmwgt:direction>
+ <nmwgt:capacity>10000000000</nmwgt:capacity>
+ </nmwgt:interface>
+ </perfsonar:subject>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <nmwg:parameter name="keyword" value="project:GEANT"/>
+ </nmwg:metadata>
</nmwg:data>
-
-
-
</nmwg:message>
-
-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e94084d3-5241-46e3-9c83-9955f75a7cbe"/><con:assertion type="SOAP Fault
Assertion" id="9f41bcdb-12dd-43f7-b33c-1efa7e40330d"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="552febda-0305-479e-9586-0d765b02356f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="2146fc97-c6f4-4817-96a8-efd89eeef2b0"><con:configuration><path>declare
namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
+declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Correct lsKey"
id="ff9947aa-513c-458f-809c-4febb54bf189"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+import com.eviware.soapui.support.XmlHolder

-def noOfeventTypes = 0
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.1.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
+// Check that we have only one lsKey
+def lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+assert lsKeys.size() == 1
+lsKey = lsKeys[0].getAttribute("value")
+// In the GEANT implementation, the lsKey matches the Request key
+//assert lsKeys[0].getAttribute("value") == apKey

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+// Check that the description also matches the key
+def data =
ResponseHolder.getDomNode('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+assert data.toString().contains(lsKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="transfer" name="lsKey"
id="cb5eb897-c325-4b9d-9e4f-b15474d6fa85"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="true" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>Single
Service Registration</con:sourceStep><con:sourcePath>declare namespace
soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;

+for $lsKey in
//nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]
+return if (exists($lsKey/@value))
+then data($lsKey/@value)
+else data($lsKey)
+</con:sourcePath><con:targetType>lsKey</con:targetType><con:targetStep>#TestCase#</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="groovy" name="lsKey exist"
id="ee79633a-964c-49c1-ab43-e1c72dca197c"><con:settings/><con:config><script>//
Set lsKey for exist test case so that it doesn't fail when run on its own
+def tc = testRunner.testCase
+def lsKey = tc.getPropertyValue("lsKey")
+def lsKeyExisttc = tc.testSuite.getTestCaseByName("Test lsKey exist")

- <nmwg:metadata id="meta1">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd1
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:metadata id="meta2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="meta1">
- </nmwg:data>
-
-
- <nmwg:data id="data2" metadataIdRef="meta2">
- </nmwg:data>
-
- </nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.1.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupServic
e</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+lsKeyExisttc.setPropertyValue("lsKey", lsKey)
+</script></con:config></con:testStep><con:properties><con:property><con:name>ParentThread</con:name><con:value>04</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties></con:testCase><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Test lsKey exist" searchProperties="true"
id="064b9943-a570-4d82-9c34-94084cd2286c"><con:settings/><con:testStep
type="request" name="Test lsKey is registred"
id="bbbfca6b-6c68-4446-8b93-14b9de1f296b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12
Binding</con:interface><con:operation>message</con:operation><con:request
name="Test lsKey is registred" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Check the lsKey is present: Keepaliave Request -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

-<nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>
-

- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
-
<psservice:accessPoint>http://reed.man.poznan.pl:8080/axis/services/MA</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>This is my testing
MA</psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
+ <nmwg:metadata id="key_to_keepalive">
+ <nmwg:key>
+ <nmwg:parameters id="keys">
+ <nmwg:parameter name="lsKey">${#TestCase#lsKey}</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1"></nmwg:metadata>
- </nmwg:data>

- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta2"> </nmwg:metadata>
- </nmwg:data>
+ <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>

-
- </nmwg:message>
-
-
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="9b728cd4-33ee-43a5-9895-1ca213313c1d"/><con:assertion type="SOAP Fault
Assertion" id="c46b6da8-848f-4942-82bc-c92b86b8208d"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c10732fc-8cf2-4d00-9321-ebf43f8b1cae"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.1.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
-
- <nmwg123:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar2wsx="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg123="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psserviceZZZ="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
-
- <nmwg123:metadata id="serviceLookupInfo">
- <perfsonar2wsx:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psserviceZZZ:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psserviceZZZ:serviceName>dsdsd</psserviceZZZ:serviceName>
- <psserviceZZZ:accessPoint>
- dsdsd
- </psserviceZZZ:accessPoint>
- <psserviceZZZ:serviceType>MA</psserviceZZZ:serviceType>
- <psserviceZZZ:serviceDescription>
- This is my testing MA
- </psserviceZZZ:serviceDescription>
- </psserviceZZZ:service>
- </perfsonar2wsx:subject>
- </nmwg123:metadata>
-
- <nmwg123:data id="data0" metadataIdRef="serviceLookupInfo">
- </nmwg123:data>
-
-
-
- </nmwg123:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="137d8bd0-2101-4340-9dfd-9bbcfaeffc18"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.keepalive</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - lsKey Check"
id="b7106667-816a-4dcc-954c-0e6f2ffc4b81"><con:configuration><scriptText>//
We should check that:
+// - we have a single result-code
+// - the description matches the lsKey

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+import com.eviware.soapui.support.XmlHolder

-def noOfeventTypes = 0
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+// Get the accessPoint name from the Request, this should be the key in the
LSstore
+def apKey =
RequestHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]').trim()

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="0697fd4c-a651-46e8-97a8-2a5c2cb6a0fa" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")

-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.1.2.2.1 --- a"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.1 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+// Check that we have only one result-code, that only one matadata and data
element has been removed and that it matches the Request key
+def data =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]/nmwgr:datum')
+assert data.size() == 1
+assert data[0].getValueAsString().contains(apKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties><con:property><con:name>lsKey</con:name><con:value>6315c1bc2c8f63267dcd935d22a57a0f</con:value></con:property></con:properties></con:testCase><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Double Registration" searchProperties="true"
id="724f833a-ee9d-46e3-a0ad-02b1d7e11205"><con:settings/><con:testStep
type="request" name="Double Service Registration"
id="c047b0c2-2c93-419b-8713-47dc9c4145fc"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</c
on:interface><con:operation>message</con:operation><con:request name="Double
Service Registration" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Two Services registration with data -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/12";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
+ <nmwg:message type="LSRegisterRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; id="msg1">
+ <nmwg:metadata id="RegInfo-a">
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <psservice:serviceName>${#Project#ServiceName} -
${#TestCase#ParentThread} - ${#TestCase#Counter} - a</psservice:serviceName>
+
<psservice:accessPoint>${#TestCase#accessPointA}</psservice:accessPoint>
+
<psservice:serviceType>${#Project#ServiceType}</psservice:serviceType>
<psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
+ ${#TestCase#ParentThread} - a
+ ${#Project#ServiceDescription}
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
+ <nmwg:data id="data0" metadataIdRef="RegInfo-a">
<nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <perfsonar:subject id="subj1"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
+
<nmwgt:hostName>h${#TestCase#ParentThread}-${#TestCase#Counter}a.${#Project#Interface-hostName}</nmwgt:hostName>
<nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
+
<nmwgt:ifDescription>${#Project#Interface-Description}</nmwgt:ifDescription>
+ <nmwgt:ifAddress type="ipv4">
+
${#Project#Interface-AddressIPv4}.${=${#TestCase#ParentThread}+1}.${=Integer.parseInt("${#TestCase#Counter}").mod(254)+1}
+ </nmwgt:ifAddress>
<nmwgt:direction>in</nmwgt:direction>
<nmwgt:capacity>10000000000</nmwgt:capacity>
</nmwgt:interface>
</perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <nmwg:parameter name="keyword" value="project:GEANT"/>
</nmwg:metadata>
</nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"
disabled="true"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.1 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.1 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/basgge/2.0/lalala";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
+ <nmwg:metadata id="RegInfo-b">
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <psservice:serviceName>${#Project#ServiceName} -
${#TestCase#ParentThread} - ${#TestCase#Counter} - b</psservice:serviceName>
+
<psservice:accessPoint>${#TestCase#accessPointB}</psservice:accessPoint>
+
<psservice:serviceType>${#Project#ServiceType}</psservice:serviceType>
<psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
+ ${#TestCase#ParentThread} - b
+ ${#Project#ServiceDescription}
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
+ <nmwg:data id="data1" metadataIdRef="RegInfo-b">
<nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <perfsonar:subject id="subj1"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
+
<nmwgt:hostName>h${#TestCase#ParentThread}-${#TestCase#Counter}b.${#Project#Interface-hostName}</nmwgt:hostName>
<nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
+
<nmwgt:ifDescription>${#Project#Interface-Description}</nmwgt:ifDescription>
+ <nmwgt:ifAddress type="ipv4">
+
${#Project#Interface-AddressIPv4-B}.${=${#TestCase#ParentThread}+1}.${=Integer.parseInt("${#TestCase#Counter}").mod(254)+1}
+ </nmwgt:ifAddress>
<nmwgt:direction>in</nmwgt:direction>
<nmwgt:capacity>10000000000</nmwgt:capacity>
</nmwgt:interface>
</perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>
+ <nmwg:parameter name="keyword" value="project:DANTE"/>
</nmwg:metadata>
-
</nmwg:data>
</nmwg:message>
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="4cb17b9f-99a6-4167-848d-a4c547abb5e9"/><con:assertion type="SOAP Fault
Assertion" id="9d128846-8545-4ae6-85d8-07246d200ee1"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="266e8ad4-5801-419a-8e75-6d351ff7542a"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes (2)"
id="84a19e2d-ddb0-4e0b-a68a-4989edd19733"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -723,313 +563,260 @@

def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
+ assert it.getValueAsString().trim() == "success.ls.register"
noOfeventTypes++
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
+assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Correct lsKeys (2)"
id="edf172b8-0feb-48b8-b441-43e8b2b33a0e"><con:configuration><scriptText>//
We should check that:
+// - we have a two lsKeys
+// - the data is correctly registered with the corresponding lsKey
+// - the description matches the lsKey

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/vcvxcv";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+import com.eviware.soapui.support.XmlHolder

+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

- <nmwg:metadata id="meta1">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+// Get the accessPoint names from the Request
+// In GEANT implementation, each of those should be a key in the LSstore
(but it's not mandatory as per the protocol), so we can drop the test
+def apKeys =
RequestHolder.getNodeValues('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/perfsonar:subject/psservice:service/psservice:accessPoint')

- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsffffdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsfffdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 2

- <nmwg:data id="data0" metadataIdRef="meta1">
- <nmwg:metadata></nmwg:metadata>
- </nmwg:data>
+metadata.each {
+ // Check we have only one lsKey per metadata element
+ metadataIdRef = it.getAttribute("id")
+ lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata[@id="'+metadataIdRef+'"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+ assert lsKeys.size() == 1
+ lsKey = lsKeys[0].getAttribute("value")

- <nmwg:metadata id="meta2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ // Check that the lsKey matches the one in the data element
+ // ... not sure it's mandatory, but it work both for GEANT and
Internet2 implementations
+ data =
ResponseHolder.getDomNode('//nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+ assert data.toString().contains(lsKey)

- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
+ // From the response message, we have no way to be sure the data is
actually present in the DB
+}
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="transfer" name="lsKeys"
id="13c3e7d8-2058-49c3-a598-a1ad1550c0d6"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="false" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="true"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKeyA-GN</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>Double
Service Registration</con:sourceStep><con:sourcePath>declare namespace
soapenv='http://schemas.xmlsoap.org/soa
p/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;

- <nmwg:data id="data2" metadataIdRef="meta2">
- <nmwg:metadata></nmwg:metadata>
- </nmwg:data>
+//nmwg:metadata[@id="result-code_0"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]/@value
+</con:sourcePath><con:targetType>lsKeyA</con:targetType><con:targetStep>#TestCase#</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers
setNullOnMissingSource="false" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="true"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKeyA-I2</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>Double
Service Registration</con:sourceStep><con:sourcePath>declare namespace
soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;

+//nmwg:metadata[@metadataIdRef="RegInfo-a"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]
+</con:sourcePath><con:targetType>lsKeyA</con:targetType><con:targetStep>#TestCase#</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers
setNullOnMissingSource="false" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="true"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKeyB-GN</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>Double
Service Registration</con:sourceStep><con:sourcePath>declare namespace
soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;

- </nmwg:message>
+//nmwg:metadata[@id="result-code_1"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]/@value
+</con:sourcePath><con:targetType>lsKeyB</con:targetType><con:targetStep>#TestCase#</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers
setNullOnMissingSource="false" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="true"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKeyB-I2</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>Double
Service Registration</con:sourceStep><con:sourcePath>declare namespace
soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;

+//nmwg:metadata[@metadataIdRef="RegInfo-b"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]
+</con:sourcePath><con:targetType>lsKeyB</con:targetType><con:targetStep>#TestCase#</con:targetStep><con:targetPath

xsi:nil="true"/></con:transfers></con:config></con:testStep><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKeyA</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties></con:testCase><con:tes
tCase failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="b9504be0-bb86-4655-b561-e1c060281525" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="Set Herited Properties"
id="01c2f524-0993-490a-809d-890303dcf154"><con:settings/><con:config><script>//
Set Herited properties so that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+["2.1.2.1.1 - Single Reg", "2.1.2.1.2 - Double Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
}
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.1.2.1.1 - Single Reg"
id="5e2233b7-b024-4251-8f60-afcb8411b51d"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer
" name="transfer lsKey"
id="e031e64f-ad57-4ef0-b268-3a5761e80565"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.1.2.1.1
- Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.1.2.1.1
- Test
exist</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="calltestcase" name="2.1.2.1.1 - Test exist"
id="ceda54eb-9896-4ff7-b7db-2c298346b5cf"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><co

n:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="2.1.2.1.2 - Double Reg"
id="1a7fbda6-927f-4858-b361-4a0e2ceeeb71"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKeya</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:valu

e></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.1.2.1.3 - Chained data"
id="2d935c9e-d29c-4f88-8310-7aad92dbfeec"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.3 - Chained data" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting
><con:setting
>id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">false</con:setting><con:setting
>
>id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
> Single Service Registration with chained data-metadata -->

-assert noOfeventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.3 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.3 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-
-<nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/lzlzllz";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>
-

- <nmwg:metadata id="serviceLookupInfo">
+ <nmwg:message type="LSRegisterRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; id="msg1">
+ <nmwg:metadata id="RegInfo">
<perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
-
<psservice:accessPoint>http://reed.man.poznan.pl:8080/axis/services/MA</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>This is my testing
MA</psservice:serviceDescription>
+
<psservice:serviceName>${#Project#ServiceName}</psservice:serviceName>
+
<psservice:accessPoint>http://${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</psservice:accessPoint>
+
<psservice:serviceType>${#Project#ServiceType}</psservice:serviceType>
+ <psservice:serviceDescription>
+ ${#Project#ServiceDescription}
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1"></nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta1">info 1</nmwg:metadata>
</nmwg:data>
-
- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta2"> </nmwg:metadata>
+ <nmwg:data id="data2" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta2">info 2</nmwg:metadata>
</nmwg:data>
-
-
- </nmwg:message>
-
-
- </soapenv:Body>
+ <nmwg:data id="data3" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta3">info 3</nmwg:metadata>
+ </nmwg:data>
+ </nmwg:message>
+ </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="8489e0a7-01a0-4452-9f68-c30c2ba5f23e"/><con:assertion type="SOAP Fault
Assertion" id="9d40a8f7-032e-4e34-82e8-3c23bbf130be"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="069cef48-fc1a-458b-9eef-6f038c871fd4"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="ffc45b79-cca0-49b4-9cad-d4970e8dfaa1"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Correct lsKey"
id="f4d369d0-c3d6-4baa-b23f-a231a52d1b2c"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey (in 1 metadata element - GEANT or 3 metadata
elements - Internet2)
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey

-def noOfeventTypes = 0
+import com.eviware.soapui.support.XmlHolder

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.3 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.3 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() in [1,3]
+metadataIdRef = metadata[0].getAttribute("id")

-<nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/bdsdase/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>
-

- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
-
<psservice:accessPoint>http://reed.man.poznan.pl:8080/axis/services/MA</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>This is my testing
MA</psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1"></nmwg:metadata>
- </nmwg:data>
+def lsKey = ""

- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta2"> </nmwg:metadata>
- </nmwg:data>
+metadata.each {
+ // Check we have only one lsKey per metadata element
+ metadataIdRef = it.getAttribute("id")
+ lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata[@id="'+metadataIdRef+'"]/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+ assert lsKeys.size() == 1
+ if (lsKey != "") {
+ // If we have more than one lsKey element, check it's the
same value
+ assert lsKey == lsKeys[0].getAttribute("value")
+ } else {
+ lsKey = lsKeys[0].getAttribute("value")
+ }

+ // Check that the lsKey matches the one in the data element
+ // ... not sure it's mandatory, but it work both for GEANT and
Internet2 implementations
+ data =
ResponseHolder.getDomNode('//nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+ assert data.toString().contains(lsKey)

- </nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+ // From the response message, we have no way to be sure the data is
actually present in the DB
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 --- a"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.4 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.1.4 - Changed NS"
id="800020c6-6d14-4235-a50b-294cdfef7bb9"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.1.4 - Changed NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><

con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Single Service Registration with modified namespace -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
-
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
+ <nmwg123:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg123="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg123:metadata id="RegInfo">
+ <perfsonar2wax:subject id="commonParameters"
xmlns:perfsonar2wax="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psserviceZZZ:service id="serviceParameters"
xmlns:psserviceZZZ="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+
<psserviceZZZ:serviceName>${#Project#ServiceName}-waxed</psserviceZZZ:serviceName>
+
<psserviceZZZ:accessPoint>http://waxed-${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</psserviceZZZ:accessPoint>
+
<psserviceZZZ:serviceType>${#Project#ServiceType}</psserviceZZZ:serviceType>
+ <psserviceZZZ:serviceDescription>
+ pS Waxed
+ ${#Project#ServiceDescription}
+ </psserviceZZZ:serviceDescription>
+ </psserviceZZZ:service>
+ </perfsonar2wax:subject>
+ </nmwg123:metadata>
+ <nmwg123:data id="data0" metadataIdRef="RegInfo">
+ </nmwg123:data>
+ </nmwg123:message>
+ </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="2e4a4c68-70ea-49c5-8703-40fec5cbd3fc"/><con:assertion type="SOAP Fault
Assertion" id="1fd4b583-a533-48fc-a285-b27eb98dfe2a"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="da4af2e8-4381-43a6-8a74-023fc864f40e"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="dd2f2c68-a2ea-495d-af4b-0a7532f846fc"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Correct lsKey"
id="2a67343a-9664-4a06-ac29-eba24e81a309"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey

-def noOfeventTypes = 0
+import com.eviware.soapui.support.XmlHolder

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 --- b"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.4 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")

+// Check that we have only one lsKey
+def lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+assert lsKeys.size() == 1
+lsKey = lsKeys[0].getAttribute("value")
+// In the GEANT implementation, the lsKey matches the Request key
+//assert lsKeys[0].getAttribute("value") == apKey

+// Check that the description also matches the key
+def data =
ResponseHolder.getDomNode('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+assert data.toString().contains(lsKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:loadTest
name="Simple Registration Empty DB"
id="3058398c-9d2e-4743-80ff-6999a6fb4ca7"><con:settings/><con:threadCount>10</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>300</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type><con:config><testDelay>1000</testDelay><randomFactor>0.5</randomFactor></con:config></con:loadS
trategy><con:assertion type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:statisticsLogFolder/><con:statisticsLogInterval>0</con:statisticsLogInterval><con:logStatisticsOnThreadChange>false</con:logStatisticsOnThreadChange><con:cancelOnReachedLimit>false</con:cancelOnReachedLimit><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB
+def tc = loadTestRunner.loadTest.testCase
+def initscript =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+</con:setupScript><con:updateStatisticsPerTestStep>false</con:updateStatisticsPerTestStep></con:loadTest><con:loadTest
name="Simple Registration Existing DB"
id="305ed745-49c1-427a-8d6b-250f2ec1a210"><con:settings/><con:threadCount>10</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>300</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type><con:config><testDelay>1000</testDelay><randomFactor>0.5</randomFactor></con:config></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
We don't initialis
e the DB in this
one</con:setupScript></con:loadTest><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="0697fd4c-a651-46e8-97a8-2a5c2cb6a0fa" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="request"
name="2.1.2.2.1 - S-Reg - Bad nmwg NS"
id="ade0a0dc-2ba2-4394-a3ee-d2a57fdadc11"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.1 - S-Reg - Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings>

<con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Single Service registration with data -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
+ <soapenv:Header/>
+ <soapenv:Body>
+<!-- nmwg is declared with a wrong identifier -->
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/12";>
<nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>My_test_MA</psservice:serviceName>
<psservice:accessPoint>
http://reed.man.poznan.pl:8080/axis/services/MA
@@ -1043,8 +830,7 @@
</nmwg:metadata>
<nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
<nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <perfsonar:subject id="subj1"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>

<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
<nmwgt:ifName>unknown</nmwgt:ifName>
@@ -1057,61 +843,35 @@
</perfsonar:subject>
<nmwg:eventType>utilisation</nmwg:eventType>
</nmwg:metadata>
-
</nmwg:data>
-
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
-
</nmwg:message>
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="fd190756-617b-44c4-9267-4ab8111c232e"/><con:assertion type="SOAP Fault
Assertion" id="e052f221-89f1-47f4-bb48-16751425b0a8"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="0a8dfd42-a14e-4acb-99b0-ecfa3867e582"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="a4a35636-2bb9-46ce-9bba-ed49c7d780b7"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 --- c"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.4 --- c" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.2 - D-Reg - Bad nmwg NS"
id="8e28db35-9d23-471f-86f0-2bd013868f8c"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.2 -
D-Reg - Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Double Service registration with data -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
-
+<!-- nmwg is declared with a wrong identifier -->
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/basgge/2.2/";>
<nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>My_test_MA</psservice:serviceName>
<psservice:accessPoint>
http://reed.man.poznan.pl:8080/axis/services/MA
@@ -1123,10 +883,9 @@
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
+ <nmwg:data id="data0" metadataIdRef="serviceLookupInfo"
xmlns:nmwg="http://ggf.org/ns/nmwg/basgge/2.2/";>
<nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <perfsonar:subject id="subj1"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>

<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
<nmwgt:ifName>unknown</nmwgt:ifName>
@@ -1139,271 +898,74 @@
</perfsonar:subject>
<nmwg:eventType>utilisation</nmwg:eventType>
</nmwg:metadata>
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
- </nmwg:data>

-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.5" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
-
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
-
- <nmwg:metadata id="meta1">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="meta1">
- <nmwg:metadata></nmwg:metadata>
</nmwg:data>
-
- <nmwg:metadata id="meta2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data2" metadataIdRef="meta2">
- <nmwg:metadata></nmwg:metadata>
- </nmwg:data>
-
-
</nmwg:message>
-
-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="a96c2a9f-509b-4d9d-8de9-1e7cec162029"/><con:assertion type="SOAP Fault
Assertion" id="db0b3e41-c180-4455-aade-7a65b39796aa"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="fb1e9869-8214-4735-9dd8-55d5e764c1ec"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="bc10564d-88a0-4c6d-a751-23be322c629a"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.6 --- a"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.6 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.3 - Chained - Bad nmwg NS"
id="a486fff7-ae37-474f-8c57-bc7ff1ce2f07"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.3
- Chained - Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Single Service Registration with chained data-metadata -->
+<!-- nmwg is declared with a wrong identifier -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-
-<nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>
-
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
-
-

- <nmwg:metadata id="serviceLookupInfo">
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/vcvxcv";>
+ <nmwg:metadata id="RegInfo">
<perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
<psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
-
<psservice:accessPoint>http://reed.man.poznan.pl:8080/axis/services/MA</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>This is my testing
MA</psservice:serviceDescription>
+
<psservice:serviceName>${#Project#ServiceName}</psservice:serviceName>
+
<psservice:accessPoint>http://${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</psservice:accessPoint>
+
<psservice:serviceType>${#Project#ServiceType}</psservice:serviceType>
+ <psservice:serviceDescription>
+ ${#Project#ServiceDescription}
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1"></nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta1">info 1</nmwg:metadata>
</nmwg:data>
-
- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta2"> </nmwg:metadata>
+ <nmwg:data id="data2" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta2">info 2</nmwg:metadata>
</nmwg:data>
-
-
- </nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.6 --- b"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.6 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
-
-<nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>
-
-

- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
-
<psservice:accessPoint>http://reed.man.poznan.pl:8080/axis/services/MA</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>This is my testing
MA</psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1"></nmwg:metadata>
-
-
+ <nmwg:data id="data3" metadataIdRef="RegInfo">
+ <nmwg:metadata id="meta3">info 3</nmwg:metadata>
</nmwg:data>
-
- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta2"> </nmwg:metadata>
- </nmwg:data>
-
- <nmwg:random1 id="serviceLookupInfo">
- random element
- </nmwg:random1>
-
- </nmwg:message>
-
-
- </soapenv:Body>
+ </nmwg:message>
+ </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e7bcf78c-b41f-46cf-bc02-bd64d69b3354"/><con:assertion type="SOAP Fault
Assertion" id="68073179-115e-460c-b6e2-77f14117c38e"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="85cd4161-d52a-4f25-b889-391de78b7f41"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match"
id="ce1986de-adb4-4e70-88ea-5464f8bd6023"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.7 --- a"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.7 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 - No metadata/data pair - a"
id="ebcd917b-d23d-4c25-9e54-645d6b6d6cca"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.
2.4 - No metadata/data pair - a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1415,7 +977,7 @@
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>

-
+<!-- No id attribute declared -->
<nmwg:metadata>
<perfsonar:subject
id="commonParameters"
@@ -1446,33 +1008,23 @@

</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="63aa2c4c-10bd-4750-a554-c5e7386ef7c5"/><con:assertion type="SOAP Fault
Assertion" id="0affc026-e409-4d44-a207-4652b34cc82b"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="9664ce22-24aa-4b94-9782-d7532cef7f16"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="1083dd67-8bf9-48a9-ad52-1361c67f1a94"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.7 --- b"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.7 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 - No metadata/data pair - b"
id="b4ba3d68-c77e-405a-b387-29582656859e"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:re
quest name="2.1.2.2.4 - No metadata/data pair - b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1505,6 +1057,7 @@
</perfsonar:subject>
</nmwg:metadata>

+<!-- No matching metadataIdRef -->
<nmwg:data id="data0">
</nmwg:data>

@@ -1515,33 +1068,23 @@

</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="1ee354f4-7add-41c5-818c-7afbf41d74a5"/><con:assertion type="SOAP Fault
Assertion" id="01279eba-6d4a-4a96-814d-04abf27b8570"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="a08900da-dfb8-4dbc-8b44-360b6f569b92"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match"
id="cc82bbdc-55f4-4f07-8c0a-07ed305bb7c6"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.7 --- c"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.7 --- c" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.4 - No metadata/data pair - c"
id="455e6805-ffe6-4273-870f-cc5c6db6c725"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:re
quest name="2.1.2.2.4 - No metadata/data pair - c" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1574,7 +1117,7 @@
</perfsonar:subject>
</nmwg:metadata>

- <nmwg:data metadataIdRef="serviceLookupInfo">
+ <nmwg:data metadataIdRef="serviceLookupInfo-bad">
</nmwg:data>


@@ -1584,52 +1127,27 @@

</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="1992a2ac-9133-4fc9-91b9-d2435d6aa12e"/><con:assertion type="SOAP Fault
Assertion" id="a748b5f8-4d0d-4041-96f4-728395e1e775"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="8899979e-fa9a-464b-a581-5546e8972e62"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="c3971dc2-1c6b-4774-aa77-718384dafaaa"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true"
id="05b0a611-bf1c-4b25-bb29-dca2251ecd56" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.1.2.3.1"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.5 - No message type"
id="e4374790-1791-4d83-bf29-91872d36539e"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name
="2.1.2.2.5 - No message type" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

+<!-- No nmwg:message type given -->
<nmwg:message
id="msg1"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
@@ -1670,43 +1188,30 @@

</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="030d39b3-a3d3-42c7-91dc-bf2d19b4e793"/><con:assertion type="SOAP Fault
Assertion" id="d7adbda1-ebe7-493f-8f20-f5762688ab31"/><con:assertion
type="XPath Match" name="XPath Match - Result Code"
id="a5a88337-3816-47ac-ba83-b50e6e87aea7"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(no_message_type|common\.action_not_supported)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"
id="290c7e82-a0e6-45a8-af41-3beae910ebef"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/r
esult/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.1.2.2.6 - One correct, one
invalid</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.6 - Missing nmwg:data"
id="fdbf2381-7202-4b7c-864c-3a8488c5b872"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.6 - Missing nmwg:data" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.
xmlsoap.org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

- <nmwg:message type = "LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
-
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>dsdsd</psservice:serviceName>
+ <psservice:accessPoint>
+ dsdsd
+ </psservice:accessPoint>
<psservice:serviceType>MA</psservice:serviceType>
<psservice:serviceDescription>
This is my testing MA
@@ -1715,33 +1220,17 @@
</perfsonar:subject>
</nmwg:metadata>

- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata></nmwg:metadata>
- </nmwg:data>
+<!-- Missing nmwg:data element -->

-
-
</nmwg:message>

-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="d6fa5c19-cf7e-4ac5-a153-2e0326e15789"/><con:assertion type="SOAP Fault
Assertion" id="9a96e53f-3bc6-4c17-8582-d0f972eab15c"/><con:assertion
type="XPath Match" name="XPath Match - Result Code"
id="44f50ef9-f558-489e-8af9-c5e351bd8299"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>error.common.no_metadata_data_pair</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.2.6 - One correct, one invalid"
id="9763fc3a-320d-40ab-a712-9bbeb7df98f0"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.2.6 - One correct, one
invalid" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1754,7 +1243,7 @@

xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>


- <nmwg:metadata id="meta1">
+ <nmwg:metadata id="serviceLookupInfo">
<perfsonar:subject
id="commonParameters"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
@@ -1763,14 +1252,18 @@
xmlns:psservice=

"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>dsdsd</psservice:serviceName>
-
+ <psservice:accessPoint>
+ dsdsd
+ </psservice:accessPoint>
<psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
+ <psservice:serviceDescription>
+ This is my testing MA
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>

- <nmwg:metadata id="meta2">
+ <nmwg:metadata id="serviceLookupInfo2">
<perfsonar:subject
id="commonParameters"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
@@ -1778,33 +1271,28 @@
<psservice:service id="serviceParameters"
xmlns:psservice=

"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>zzz</psservice:serviceName>
+
<psservice:serviceName>dsdsdddd-correct-data</psservice:serviceName>
<psservice:accessPoint>
- dsdsd
+ dsdsdsss-correct-data
</psservice:accessPoint>
<psservice:serviceType>MA</psservice:serviceType>
-
<psservice:serviceDescription></psservice:serviceDescription>
+ <psservice:serviceDescription>
+ This is my testing MA2
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
-
</nmwg:metadata>

- <nmwg:data id="data0" metadataIdRef="meta1">
- <nmwg:metadata></nmwg:metadata>
- </nmwg:data>
+<!-- Missing first data element -->

-
- <nmwg:data id="data2" metadataIdRef="meta2">
- <nmwg:metadata></nmwg:metadata>
+ <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
</nmwg:data>

+ </nmwg:message>

- </nmwg:message>
-
-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="51ee4b83-c2fc-4176-a284-abde2938cc36"/><con:assertion type="SOAP Fault
Assertion" id="a9b86a41-3f28-4889-8744-13ec7fa98867"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Code"
id="6054fb25-4c10-414a-bd27-abd8dd430d86"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -1813,18 +1301,47 @@

def noOfErrors = 0
def noOfSuccess = 0
-
def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==~ /.*error.*/){
+ if(it.getValueAsString() ==~ /.*error.*/){
noOfErrors++
- }else if(it.getValueAsString() ==~ /.*success.*/){
+ }else if(it.getValueAsString() ==~ /.*success.*/){
noOfSuccess++
}
}

-assert noOfErrors == 1
-assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelo
pe/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+assert noOfErrors == 0
+assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - registered"
id="f2070a1a-6476-4410-a8d7-6aca5dd7466b"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey
+
+import com.eviware.soapui.support.XmlHolder
+
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
+
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata[starts-with(nmwg:eventType,
"success.")]')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")
+
+// Check that we have only one lsKey
+def lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+assert lsKeys.size() == 1
+lsKey = lsKeys[0].getAttribute("value")
+
+// Check that the description also matches the key
+def data =
ResponseHolder.getDomNode('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+assert data.toString().contains(lsKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true"
id="05b0a611-bf1c-4b25-bb29-dca2251ecd56" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="request"
name="2.1.2.3.1 - No accessPoint"
id="472b0a30-2970-4bd8-adb7-54b4f40136af"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="
2.1.2.3.1 - No accessPoint" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1845,11 +1362,12 @@
<psservice:service id="serviceParameters"
xmlns:psservice=

"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+<!-- Missing psservice:accessPoint -->
<psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
-
<psservice:serviceDescription></psservice:serviceDescription>
+ <psservice:serviceType>MA</psservice:serviceType>
+ <psservice:serviceDescription>
+ This is my testing MA
+ </psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
@@ -1865,22 +1383,12 @@

</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="0821f258-dd35-4098-9e66-86d89b2ae0e2"/><con:assertion type="SOAP Fault
Assertion" id="77453578-3323-4fb3-83b7-44210a263693"/><con:assertion
type="XPath Match" name="XPath Match - Result code"
id="d32f4d7a-ec62-4b4c-8633-64e797d167c5"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(no_access_point|register\.missing_value)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.2 - One correct, one invalid"
id="fa0b089a-9728-474b-a406-ebb1791782de"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.2 - One correct, one invalid" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
One correct request and one erroneous one in a single message -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

@@ -1892,7 +1400,7 @@
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>

-
+<!-- Malformed service registration, missing accessPoint -->
<nmwg:metadata id="meta1">
<perfsonar:subject
id="commonParameters"
@@ -1902,15 +1410,14 @@
xmlns:psservice=

"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsd
- </psservice:accessPoint>
+
+ <psservice:serviceType>MA</psservice:serviceType>

<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>

-
+<!-- Correct service registration -->
<nmwg:metadata id="meta2">
<perfsonar:subject
id="commonParameters"
@@ -1919,30 +1426,33 @@
<psservice:service id="serviceParameters"
xmlns:psservice=

"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
- <psservice:serviceType>MA</psservice:serviceType>
+
<psservice:serviceName>zzz-correct-withAccessPoint</psservice:serviceName>
<psservice:accessPoint>
- dsdsd
+ dsdsd-correct-withAccessPoint
</psservice:accessPoint>
+ <psservice:serviceType>MA</psservice:serviceType>

<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
+
</nmwg:metadata>

- <nmwg:data id="data2" metadataIdRef="meta2">
+ <nmwg:data id="data0" metadataIdRef="meta1">
<nmwg:metadata></nmwg:metadata>
</nmwg:data>

- <nmwg:data id="data0" metadataIdRef="meta1">
+
+ <nmwg:data id="data2" metadataIdRef="meta2">
<nmwg:metadata></nmwg:metadata>
</nmwg:data>

+
</nmwg:message>


</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="aade63c6-df70-4f47-b60e-cc5b43898b8e"/><con:assertion type="SOAP Fault
Assertion" id="cea72091-8d3e-414f-9e07-01b3c6920302"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="73c47dc4-359d-4cc6-9e93-f9c5ad8fa3fa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -1962,31 +1472,66 @@
}

assert noOfErrors == 1
-assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.6"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.6" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelo
pe/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - registered"
id="b11e0fca-dc1f-4cf5-875f-e84a6332c082"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey
+
+import com.eviware.soapui.support.XmlHolder
+
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
+
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata[starts-with(nmwg:eventType,
"success.")]')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")
+
+// Check that we have only one lsKey
+def lsKeys =
ResponseHolder.getDomNodes('//nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]')
+assert lsKeys.size() == 1
+lsKey = lsKeys[0].getAttribute("value")
+
+// Check that the description also matches the key
+def data =
ResponseHolder.getDomNode('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]')
+assert data.toString().contains(lsKey)
+</scriptText></con:configuration></con:assertion><con:assertion type="XQuery
Match" name="XQuery Match - discarded"
id="72942378-39cd-4831-b492-77f33dfeec4e"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+for $metadata in //nmwg:message/nmwg:metadata[starts-with(nmwg:eventType,
"error.ls.")]
+ let $metadata_id := $metadata/@id
+ let $data :=
//nmwg:message/nmwg:data[@metadataIdRef=$metadata_id]
+ return $data/nmwgr:datum</path><content>&lt;nmwgr:datum
xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/";>*&lt;/nmwgr:datum></content><allowWildcards>true</allowWildcards></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"
id="3210bf72-1767-4694-b9fc-f9801332934c"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>Empty (keep for I2
switch)</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.4 - No serviceType"
id="d0e5c551-11d4-42f5-9728-620683cada87"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.4 - No serviceType" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Missing psservice:serviceType element in serviceParameters
-->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

- <nmwg:message type = "LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+ <nmwg:message type = "LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

-
<nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>dsdsd</psservice:serviceName>
<psservice:accessPoint>
dsdsd
</psservice:accessPoint>
+<!-- Missing psservice:serviceType -->

<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
@@ -1996,71 +1541,40 @@
<nmwg:metadata></nmwg:metadata>
</nmwg:data>

-
-
</nmwg:message>

-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="9ee727db-24f4-46e0-a1d7-15b072ec9f3c"/><con:assertion type="SOAP Fault
Assertion" id="79f906e1-a78d-4a95-899a-799eb445a1b4"/><con:assertion
type="XPath Match" name="XPath Match - Result Code"
id="3c1b03f5-d33a-4a5b-a613-bab6a4250e14"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.7" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>error.ls.no_service_type</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.5 - One correct, one invalid"
id="ee105ce8-6a32-454d-b7ca-5f5a21a868f4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.5 - One correct, one invalid"
outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

-
<nmwg:metadata id="meta1">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
<psservice:serviceName>dsdsd</psservice:serviceName>
+<!-- Missing psservice:serviceType -->
<psservice:accessPoint>
- dsdsd
+ dsdsd
</psservice:accessPoint>

<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>

-
<nmwg:metadata id="meta2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+
<psservice:serviceName>dsdsd-correct-withType</psservice:serviceName>
<psservice:serviceType>MA</psservice:serviceType>
<psservice:accessPoint>
- dsdsd
+ dsdsd-correct-withType
</psservice:accessPoint>

<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
@@ -2074,13 +1588,11 @@
<nmwg:data id="data0" metadataIdRef="meta1">
<nmwg:metadata></nmwg:metadata>
</nmwg:data>
-
</nmwg:message>

-
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="5284ef74-8380-4f44-b96e-94be20119fd6"/><con:assertion type="SOAP Fault
Assertion" id="915b8d9c-9e93-495c-840d-707dd57e2ccd"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="a674d65c-d80e-476d-9cab-e1e8a75a6e18"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -2100,118 +1612,92 @@
}

assert noOfErrors == 1
-assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.8 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.8 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org
/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - registered"
id="84901b04-ed47-4b62-b7c0-4bca3576dc2a"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata[nmwg:eventType="success.ls.register"]/nmwg:key/nmwg:parameters/nmwg:parameter</path><content>&lt;nmwg:parameter
name="lsKey" value="dsdsd-correct-withType"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/></content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XQuery Match" name="XQuery Match - discarded"
id="b6376aca-3f90-4f17-a08c-409f4ef867e6"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+for $metadata in
//nmwg:message/nmwg:metadata[nmwg:eventType="error.ls.no_service_type"]
+ let $metadata_id := $metadata/@id
+ let $data :=
//nmwg:message/nmwg:data[@metadataIdRef=$metadata_id]
+ return $data/nmwgr:datum</path><content>&lt;nmwgr:datum
xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/";>[error.ls.no_service_type]:
[LS Registration] No serviceType or empty in
request&lt;/nmwgr:datum></content><allowWildcards>false</allowWildcards></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.6 - No serviceName"
id="50c8d130-6e4e-4f38-b25d-ff57e65bab9b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.6 - No serviceName" outgoingWss="" incomingWss=
""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
-
+ <nmwg:message type = "LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+<!-- missing psservice:serviceName -->
+ <psservice:serviceType>MA</psservice:serviceType>
<psservice:accessPoint>
dsdsd
</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
+
<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>
- </nmwg:message>

+ <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
+ <nmwg:metadata></nmwg:metadata>
+ </nmwg:data>

+ </nmwg:message>
+
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="1dc5b50b-ac72-47c4-b44f-5b7c1063f38f"/><con:assertion type="SOAP Fault
Assertion" id="ee9277fb-f6c9-48bd-9c8d-b3c00a0426e9"/><con:assertion
type="XPath Match" name="XPath Match - Result Code"
id="2d5cacdf-29dc-496b-be01-2fd3879925e3"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.8 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.8 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>error.ls.no_service_name</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.7 - One correct, one invalid"
id="120d9869-6a52-43fc-ab01-7bbc397c2069"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.7 - One correct, one invalid"
outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>

- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+ <nmwg:message type="LSRegisterRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

-
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsd</psservice:serviceName>
+ <nmwg:metadata id="meta1">
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+<!-- missing psservice:serviceName -->
+ <psservice:serviceType>MA</psservice:serviceType>
<psservice:accessPoint>
dsdsd
</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
+
<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>

- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsdddd</psservice:serviceName>
+ <nmwg:metadata id="meta2">
+ <perfsonar:subject id="commonParameters"
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
+ <psservice:service id="serviceParameters"
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+
<psservice:serviceName>dsdsd-correct-withName</psservice:serviceName>
+ <psservice:serviceType>MA</psservice:serviceType>
<psservice:accessPoint>
- dsdsdsss
+ dsdsd-correct-withName
</psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA2
- </psservice:serviceDescription>
+
<psservice:serviceDescription></psservice:serviceDescription>
</psservice:service>
</perfsonar:subject>
</nmwg:metadata>

- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
+ <nmwg:data id="data2" metadataIdRef="meta2">
+ <nmwg:metadata></nmwg:metadata>
</nmwg:data>

- </nmwg:message>
+ <nmwg:data id="data0" metadataIdRef="meta1">
+ <nmwg:metadata></nmwg:metadata>
+ </nmwg:data>

+ </nmwg:message>
+
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="42ac2aaa-9b6d-44ec-9393-bb9a6659b5e8"/><con:assertion type="SOAP Fault
Assertion" id="1817b270-cbb5-4ea7-b1e0-98f9a8ce4442"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="9fa56798-fd7f-489c-a475-3a65d2b42d3a"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -2220,714 +1706,113 @@

def noOfErrors = 0
def noOfSuccess = 0
+
def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==~ /.*error.*/){
+ if(it.getValueAsString() ==~ /.*error.*/){
noOfErrors++
- }else if(it.getValueAsString() ==~ /.*success.*/){
+ }else if(it.getValueAsString() ==~ /.*success.*/){
noOfSuccess++
}
}

-assert noOfErrors == 0
-assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.1.2.3.9"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.1.2.3.9" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelo
pe/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
-
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
-
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>dsdsdddd</psservice:serviceName>
- <psservice:accessPoint>
- dsdsdsss
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA2
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
-
- <nmwg:data id="data2" metadataIdRef="its_not_here">
- </nmwg:data>
-
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Result Code"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite

name="Deregistration"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="92378658-9e75-495d-85d8-a880281aa939" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit a --- a"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.1.1R --- a"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1R --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert noOfErrors == 1
+assert noOfSuccess ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - registered"
id="45abaee1-06ab-4d01-92b3-611c5e4961c9"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.1 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.1T --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1T --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoa
p.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit a --- b"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.1.1R --- b"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1R --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
-
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MAddd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2222</psservice:serviceName>
- <psservice:accessPoint>
-
http://reed.man.poznan.pl:8080/axis/services/MAddd2222222
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA22222
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta2">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hs2222222222tnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.22</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata[nmwg:eventType="success.ls.register"]/nmwg:key/nmwg:parameters/nmwg:parameter</path><content>&lt;nmwg:parameter
name="lsKey" value="dsdsd-correct-withName"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/></content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XQuery Match" name="XQuery Match - discarded"
id="6c38ae01-8c0c-45d8-8020-eab87d9b2d28"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+for $metadata in
//nmwg:message/nmwg:metadata[nmwg:eventType="error.ls.no_service_name"]
+ let $metadata_id := $metadata/@id
+ let $data :=
//nmwg:message/nmwg:data[@metadataIdRef=$metadata_id]
+ return $data/nmwgr:datum</path><content>&lt;nmwgr:datum
xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/";>[error.ls.no_service_name]:
No serviceName in
request&lt;/nmwgr:datum></content><allowWildcards>false</allowWildcards></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="properties" name="Empty (keep for I2 switch)"
id="2303fed3-af8b-408d-936a-e89fac58238e"><con:settings/><con:config
xsi:type="con:PropertiesStep" saveFirst="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:properties/></con:config></con:testStep><con:properties/></con:testCase><con:properties/><con:setupScript>//
Init an empty DB
+def initscript =
testSuite.getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+</con:setupScript></con:testSuite><con:testSuite name="Deregistration"
id="dfad4ad0-bf72-44e0-abb7-4c8a5c3e7c3a"><con:description>Test Suite for
deregistration requests. The tests are divided as follows:
+- Generic Single Deregistration request
+- Various tests using the generic single and double registration requests
from Registration test suite and this deregistration request test step:
+ - Correct requests
+ - Malformed requests
+ - requests with Invalid data

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+At the beginning of this test suite, the DB is initialised (empty), see
Setup Script. Most of those tests use the variables (properties) defined at
the project level but also set some local test case properties. Some tests
are re-used in the following test suites (see their descriptions).

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.1 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+A Load Test of registrations and deregistrations has also been implemented
to see how the service cope with a lot of incoming request
queries.</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Single Deregistration" searchProperties="true"
id="01c061ba-e53c-42f2-b08b-6f705a53e8af"><con:description>This step tries to
deregister an lsKey. It's ok if the key doesn't exist.
+Then check the lsKey is actually deleted.
+</con:description><con:settings/><con:testStep type="request" name="Single
Service Dereg Attempt"
id="e0cd5ec4-0c1a-4eba-a440-2041e4f75ef7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Single Service Dereg Attempt" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter name="lsKey"
value="http://reed.man.poznan.pl:8080/axis/services/MAddd"/>
+ <nmwg:key id="keyid">
+ <nmwg:parameters id="paramid">
+ <nmwg:parameter
name="lsKey">${#TestCase#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
<nmwg:data id="data1" metadataIdRef="meta1"/>
-
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.1T --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1T --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoa
p.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MAddd</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.1T --- b2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.1T --- b2" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MAddd2222222
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit b"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.1.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MAddd
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="f3cc5939-5c7c-4cea-8fed-a41913a433ce"/><con:assertion type="SOAP Fault
Assertion" id="267ad31e-4152-4dda-b0ed-8ad18a78cb60"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="698525cc-ba45-4877-b1ed-808701b2bc12"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Code and lsKey"
id="fec284ee-59cd-4716-98d0-fd1f081fe1aa"><con:configuration><scriptText>//
We should check that:
+// - we have a single removal
+// - the description matches the lsKey

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+import com.eviware.soapui.support.XmlHolder
+import org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-def noOfeventTypes = 0
+// Check the metadata element and get the metadataIdRef
+def metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+def metadataIdRef = metadata[0].getAttribute("id")

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+def resultCode =
ResponseHolder.getNodeValue("//nmwg:metadata/nmwg:eventType");
+if (resultCode == "success.ls.deregister") {
+ // Get the accessPoint name from the Request, this should be the key
in the LSstore
+ def apKey =
RequestHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]').trim()

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+ // Check that we have only one result-code data, that only one
matadata and data element has been removed and that it matches the Request key
+ def resultData =
ResponseHolder.getDomNodes('//nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]/nmwgr:datum')
+ assert resultData.size() == 1
+ assert resultData[0].getValueAsString().contains(apKey)

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter name="lsKey"
value="http://reed.man.poznan.pl:8080/axis/services/MAddd"/>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.2T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.2T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+} else assert resultCode ==~ "error.ls.(deregister.)?key_not_found"
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="Test is deleted"
id="4b89f216-457c-4ea2-a637-f9169fda19e7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Test is deleted" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>U

TF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Check the first Service has been deleted -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MAddd</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${#TestCase#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
@@ -2938,413 +1823,117 @@


</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="fc180ee9-8ff0-4e59-b4b5-0840b9442042"/><con:assertion type="SOAP Fault
Assertion" id="e9e861d0-bc75-4c44-b07a-57cdcef06ab0"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4ca0efd9-7110-4fed-925e-ae468f950d53"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="cc442184-44e0-4c94-b000-531daed36720" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="5b27b77a-1826-4b61-89cb-2d92b146a558"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(keepalive\.)?key_not_found')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - lsKey Check"
id="bd443baa-57c4-4f5e-bce9-120ba4235542"><con:configuration><scriptText>//
We should check that:
+// - we have a single result-code
+// - the description matches the lsKey

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+import com.eviware.soapui.support.XmlHolder

-def noOfeventTypes = 0
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+// Get the accessPoint name from the Request, this should be the key in the
LSstore
+def apKey =
RequestHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]').trim()

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
-
xmlns:nmwg="http://ggf.org/ns/nmwg/basffffffffffffffffffffffffffffffffe/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
+// Check that we have only one result-code, that only one matadata and data
element has been removed and that it matches the Request key
+def data =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]/nmwgr:datum')
+assert data.size() == 1
+assert data[0].getValueAsString().contains(apKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties><con:property><con:name>lsKey</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="92378658-9e75-495d-85d8-a880281aa939" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:description>This test case does register
a new MA, then de-register it and check if it is indeed removed. This is
done for a single and doubl
e registration, with single and double deletion.

+In each of the 3 registrations, the lsKeys are stored inside a test property
so that we can retreive it later to de-register and check if the key is still
present.

- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
+The Set Herited Properties script takes care of passing the thread, counter
and lsKey values to the main registration test case. This is needed because
we use the "Run TestCase" steps.
+</con:description><con:settings/><con:testStep type="groovy" name="Set
Registration Properties"
id="3772f23f-c640-4931-ab3f-f815ecec211d"><con:settings/><con:config><script>//
Set Herited properties so that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+["2.2.2.1.1 - Single Reg", "2.2.2.1.2 - Double Reg", "2.2.2.1.3 - Double
Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.1T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.1T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.2.2.1.1 - Single Reg"
id="1f2a0b5a-7e45-432f-96b9-ee2fb54f492a"><con:settings/><con:config
xsi:type="con:RunTestCaseStep" copyLoadTestProperties="false"
copyHttpSession="false" ignoreEmptyProperties="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-jav

a-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer" name="2.2.2.1.1 - transfer lsKey"
id="6d5e1f85-0adc-47ff-8f79-de9e425d8068"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.1.1
- Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.1.1
-
Dereg</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.1.1 - Dereg"
id="3adf63aa-0059-42f7-9fed-06c223bc
733a"><con:settings/><con:config xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>01c061ba-e53c-42f2-b08b-6f705a53e8af</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.1.2 - Double Reg"
id="33246791-0a60-4c44-8e0c-e70d3db00bb6"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:propert

y><con:property><con:name>lsKeya</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKeyA</con:entry><con:entry>lsKeyB</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer" name="2.2.2.1.2 - transfer lsKeys"
id="26717627-f3b2-41b0-8da7-713148684301"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchem
a-instance"><con:transfers setNullOnMissingSource="true"
transferTextContent="true" failOnError="true" ignoreEmpty="false"
transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKeyB</con:name><con:sourceType>lsKeyB</con:sourceType><con:sourceStep>2.2.2.1.2
- Double
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.1.2
- Test B exist</con:targetStep></con:transfers><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="false"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKeyA</con:name><con:sourceType>lsKeya</con:sourceType><con:sourceStep>2.2.2.1.2
- Double Reg</con:sourceStep><con:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.1.2
- Dereg A</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers></con:config></con:testStep><con:testStep
type=
"calltestcase" name="2.2.2.1.2 - Dereg A"
id="cc3ee1f1-ce1f-4451-a42a-d99a7d98c12d"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>01c061ba-e53c-42f2-b08b-6f705a53e8af</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.1.2 - Test B exist"
id="4430b970-7a19-47e5-a6ae-6fb10e7d311f"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL<
/con:runMode></con:config></con:testStep><con:testStep type="calltestcase"
name="2.2.2.1.3 - Double Reg"
id="91f3e65a-5710-401a-937c-c7faec8e93e3"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKeya</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</c

on:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKeyA</con:entry><con:entry>lsKeyB</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.3 - Double Dereg"
id="c7b3be15-6cd4-4fec-a62b-d4d39b987248"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.3 - Double Dereg" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></c

on:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Deregister the 2 previously registered services -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 1"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.2"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
<nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
<!--You have a CHOICE of the next 2 items at this level-->
<nmwg:metadata id="meta1" >
<nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter name="lsKey">hfiuas fiasuf iasf
basiubfaisufbi</nmwg:parameter>
+ <nmwg:parameter name="lsKey" value="${2.2.2.1.3 - Double
Reg#lsKeyA}"/>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.3 --- a"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.3 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- </nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.3 --- b"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.3 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
+ <nmwg:metadata id="meta2" >
<nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter name="lsKey"/>
+ <nmwg:parameter name="lsKey" value="${2.2.2.1.3 - Double
Reg#lsKeyB}"/>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>

<nmwg:data id="data1" metadataIdRef="meta1"/>
+ <nmwg:data id="data2" metadataIdRef="meta2"/>

</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="503d66c0-ffb0-4636-b1c8-4a10484a263e"/><con:assertion type="SOAP Fault
Assertion" id="96a1deaf-5936-483e-867e-e9696ca97050"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="251e8e81-9747-4263-acb6-b0d4f8d2d271"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Code (2)"
id="6145fb24-05ae-4e77-b0c9-c21683a9be3c"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -3355,161 +1944,44 @@

def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
assert it.getValueAsString() ==~ /.*success.*/
noOfeventTypes++
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Correct lsKeys (2)"
id="ca17d470-3d6c-48a9-9193-db65543e047a"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
+import com.eviware.soapui.support.XmlHolder

+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <psservice:key
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </psservice:key>
- </nmwg:metadata>
+// Get the accessPoint names from the Request, each of those should be a key
in the LSstore
+def apKeys =
RequestHolder.getNodeValues('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/perfsonar:subject/psservice:service/psservice:accessPoint')

- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+apKeys.each {
+ // Check that we have a single lsKey per accessPoint and that it
matches the Request key
+ key = it.trim()
+ lsKeys =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"][@value="'+key+'"]')
+ assert lsKeys.size() == 1
+ lsKeyAncestors =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"][@value="'+key+'"]/ancestor::*')
+ // The 3rd one is the nmwg:metadata element, which will get us the
metadataIdRef
+ idRef = lsKeyAncestors[3].getAttribute("id")
+ // Check that the description also matches the key
+ ResultCodeDesc =
ResponseHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+idRef+'"]/nmwgr:datum')
+ assert ResultCodeDesc.contains(key)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.4T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.4T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.1.3 - Test Deleted"
id="599331d0-5fc0-4072-9417-9cbc5a318043"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.1.3 - Test Deleted" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settin

gs><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Check the 2 service have been deleted -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
<nmwg:message type="LSKeepaliveRequest"
@@ -3520,229 +1992,41 @@
<nmwg:key>
<nmwg:parameters id="keys">
<nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
+ ${2.2.2.1.3 - Double Reg#lsKeyA}
</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 5"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.5R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.5R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
-
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter name="lsKey"
>http://reed.man.poznan.pl:8080/axis/services/MA </nmwg:parameter>
- </nmwg:parameters>
-
- </nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.5T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.5T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
+ <nmwg:metadata id="2nd_key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
<nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
+ ${2.2.2.1.3 - Double Reg#lsKeyB}
+ </nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>

<nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
+ <nmwg:data id="data1" metadataIdRef="2nd_key_to_keepalive"/>

</nmwg:message>


</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="fc180ee9-8ff0-4e59-b4b5-0840b9442042"/><con:assertion type="SOAP Fault
Assertion" id="e9e861d0-bc75-4c44-b07a-57cdcef06ab0"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4ca0efd9-7110-4fed-925e-ae468f950d53"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Code (2)"
id="d0b0c45f-3c0e-4de0-a918-0ec7dc3a2f4f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -3753,1834 +2037,442 @@

def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
+ assert it.getValueAsString() ==~ /.*key_not_found.*/
noOfeventTypes++
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 6"
disabled="true"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
+assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - lsKey Check"
id="bd443baa-57c4-4f5e-bce9-120ba4235542"><con:configuration><scriptText>//
We should check that:
+// - we have a single lsKey
+// - the data is correctly registered with the lsKey
+// - the description matches the lsKey

-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
+import com.eviware.soapui.support.XmlHolder

-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.6R" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.6R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+// Get the accessPoint names from the Request, each of those should be a key
in the LSstore
+def apKeys =
RequestHolder.getNodeValues('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/perfsonar:subject/psservice:service/psservice:accessPoint')

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
+apKeys.each {
+ // Check that we have a single lsKey per accessPoint and that it
matches the Request key
+ key = it.trim()
+ lsKeys =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"][@value="'+key+'"]')
+ assert lsKeys.size() == 1
+ lsKeyAncestors =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"][@value="'+key+'"]/ancestor::*')
+ // The 3rd one is the nmwg:metadata element, which will get us the
metadataIdRef
+ idRef = lsKeyAncestors[3].getAttribute("id")
+ // Check that the description also matches the key
+ ResultCodeDesc =
ResponseHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+idRef+'"]/nmwgr:datum')
+ assert ResultCodeDesc.contains(key)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.6" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.6" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:loadTest
name="Reg-Dereg Empty DB"
id="b2219f28-c69c-4e89-99b9-7e7b5f32817e"><con:settings/><con:threadCount>5</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>300</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type></con:loadStrategy><con:assertion
type="Step Status" name="Step Status"/><con:maxAssertionErrors>100</con:

maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB
+def tc = loadTestRunner.loadTest.testCase
+def initscript =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+</con:setupScript></con:loadTest><con:setupScript/><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="cc442184-44e0-4c94-b000-531daed36720" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep
type="calltestcase" name="2.2.2.2.1 - Single Reg"
id="f1f11e2f-b280-44cb-b7f7-42af0a96a4eb"><con:settings/><con:config
xsi:type="con:RunTestCaseStep" copyLoadTestProperties="false"
copyHttpSession="false" ignoreEmptyProperties="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>s00-0.load.service.geant.

net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer" name="2.2.2.2.1 - transfer lsKey"
id="f952e309-5cc4-4361-b42e-a5f6d673a476"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey 2</con:name><con:
sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.2.1 - Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.2.2
- Test still exist</con:targetStep></con:transfers><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="false"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKey
4</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.2.1 -
Single Reg</con:sourceStep><con:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.2.4
- Test still exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers setNullOnMissingSource="true"
transferTextContent="true" failOnError="true" disabled="false"
entitize="false" ignoreEmpty="false" transferChildNodes="false"
transferToAll="false" useXQuery="false"><con:name>lsKey
5</con:name><con:sourceType>lsKey</con:sourceT
ype><con:sourceStep>2.2.2.2.1 - Single Reg</con:sourceStep><con:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.2.5
- Test still exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.1 - Dereg Bad nmwg NS"
id="8369e9ee-7818-4b69-8a5b-62cd64f69046"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.1 - Dereg Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS
</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>
<nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/12";>

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
<!--You have a CHOICE of the next 2 items at this level-->
<nmwg:metadata id="meta1" >
<nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.2.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>

<nmwg:data id="data1" metadataIdRef="meta1"/>

- <random> Hello randomness ! </random>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6c347b6a-e445-484c-ba63-339f5a1d0b3e"/><con:assertion type="SOAP Fault
Assertion" id="def56d3c-db9a-43ec-a8fe-3f34e5a446c6"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="50d7890d-658b-415a-b1d8-354a870376fa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="f5b73c11-6bb7-47de-8887-2b85747e222a"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 7"
disabled="true"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.2.7R" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.7R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.common\.(internal_error|parse_error)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"
id="7472b55c-3f78-464d-b712-44884d37c1e1"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/
';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.7" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.7" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.2.2.2.4 - Dereg no
name:lsKey</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.2 - Dereg no nmwg:data"
id="35efb8f0-6b93-43ff-8edf-c59114de2fd0"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.2 - Dereg no nmwg:data" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="sdfasfasfas">fasfasafafasfasfasf</nmwg:parameter>
+ <nmwg:key id="keyid">
+ <nmwg:parameters id="paramid">
+ <nmwg:parameter name="lsKey">${2.2.2.3.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>

- <nmwg:data id="data1" metadataIdRef="meta1"/>
+<!-- No nmwg:data element -->

- <random> Hello randomness ! </random>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid Data" searchProperties="true"
id="a6b85723-2ab1-48fa-97d2-ec8281fb300a" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit 1"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="995d25df-06bb-4b71-8db4-b6f277b7ab36"/><con:assertion type="SOAP Fault
Assertion" id="d1f5a71e-cad6-4158-9376-0e0c30636529"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="b928e560-9893-4849-82a6-dd41bc144ea0"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="ce6a50d0-eb0d-472c-beb9-41acee880e96"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>error.common.no_metadata_data_pair</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.2.2 - Test still exist"
id="78d90d27-112b-46cb-8906-3568243842dd"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:val

ue>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.4 - Dereg no name:lsKey"
id="8cf1c93c-fa7e-4088-beb2-7c10a8bb0658"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.4 - Dereg no name:lsKey" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+<!-- No nmwg:message id -->
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg:metadata id="meta1">
+ <nmwg:key id="keyid">
+ <nmwg:parameters id="paramid">
+ <nmwg:parameter>${2.2.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
-
-
+ <nmwg:data id="data1" metadataIdRef="meta1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.1T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.1T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="00ec95df-1172-45b2-bc2d-0075a4b16c64"/><con:assertion type="SOAP Fault
Assertion" id="7bfabeb6-7b07-40b0-a540-59d4d80304c7"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4a4e8fdd-2b57-43c8-b546-7a98bc18eafa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="e3785dae-c617-466c-98b4-59c73d744671"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(deregister\.key_not_found|no_key)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="Simple NotContains" name="Not Contains - lsKey"
id="8bebbd23-ec38-4a95-a85e-543114f144ad"><con:configuration><token>${2.2.2.2.1
- Single
Reg#lsKey}</token><ignoreCase>true</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.2.4 - Test still exist"
id="c66082ac-4fdb-4fc7-8708-6c0e05fdb095"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.2.5 - Dereg no metadata/data pair"
id="42055c05-f58b-4384-aedb-87213a7d05c0"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.2.5 - Dereg no metadata/data pair" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setti
ng><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
+ <nmwg:message id="blah1" metadataIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg:metadata id="meta1">
+ <nmwg:key id="keyid">
+ <nmwg:parameters id="paramid">
+ <nmwg:parameter name="lsKey">${2.2.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
-
-
+<!--- nmwg:data element not refering to nmwg:metadata -->
+ <nmwg:data id="data1" metadataIdRef="blahblah"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.2T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.2T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="00ec95df-1172-45b2-bc2d-0075a4b16c64"/><con:assertion type="SOAP Fault
Assertion" id="7bfabeb6-7b07-40b0-a540-59d4d80304c7"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4a4e8fdd-2b57-43c8-b546-7a98bc18eafa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="ca968308-d51e-45b9-a9ce-806accafc9dc"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common\.no_metadata_data_pair|ls\.data_trigger)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="Simple NotContains" name="Not Contains - lsKey"
id="f920269f-0e8e-45a8-89c6-c781cd4feb5c"><con:configuration><token>${2.2.2.2.1
- Single
Reg#lsKey}</token><ignoreCase>true</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.2.5 - Test sti
ll exist"
id="574d4f5f-9eaf-45cc-9e86-bfe8f6d40c40"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid Data" searchProperties="true"
id="a6b85723-2ab1-48fa-97d2-ec8281fb300a" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep
type="calltestcase" name="2.2.2.3.1 - Single Reg"
id="f46db85f-80b3-41d9-b74f-01873aa76aac"><con:settings/><con:config
xsi:type="con:RunTestCaseStep" copyLoadTestProperties="false"
copyHttpSession="false" ignore
EmptyProperties="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer" name="2.
2.2.3.1 - transfer lsKey"
id="5d74bdf5-e903-491e-b191-4919b59fd892"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey
1</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.3.1 -
Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.3.1
- Test still exist</con:targetStep></con:transfers><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
disabled="false" entitize="false" ignoreEmpty="false"
transferChildNodes="false" transferToAll="false"
useXQuery="false"><con:name>lsKey
4</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.3.1 -
Single Reg</con:sourceStep><con:sourcePath xsi:nil="true"/><con:ta
rgetType>lsKey</con:targetType><con:targetStep>2.2.2.3.4 - Test still
exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers setNullOnMissingSource="true"
transferTextContent="true" failOnError="true" disabled="false"
entitize="false" ignoreEmpty="false" transferChildNodes="false"
transferToAll="false" useXQuery="false"><con:name>lsKey
5</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.3.1 -
Single Reg</con:sourceStep><con:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.3.5
- Test still exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers setNullOnMissingSource="true"
transferTextContent="true" failOnError="true" disabled="false"
entitize="false" ignoreEmpty="false" transferChildNodes="false"
transferToAll="false" useXQuery="false"><con:name>lsKey
3</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.3.1 -
Single Reg</con:sourceStep><con
:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.3.3
- Test still exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers><con:transfers setNullOnMissingSource="true"
transferTextContent="true" failOnError="true" disabled="false"
entitize="false" ignoreEmpty="false" transferChildNodes="false"
transferToAll="false" useXQuery="false"><con:name>lsKey
2</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.2.2.3.1 -
Single Reg</con:sourceStep><con:sourcePath
xsi:nil="true"/><con:targetType>lsKey</con:targetType><con:targetStep>2.2.2.3.2
- Test still exist</con:targetStep><con:targetPath
xsi:nil="true"/></con:transfers></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.1 - Dereg no key element"
id="f2100238-ba5a-45eb-aefb-06322a2fffd9"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interfac
e><con:operation>message</con:operation><con:request name="2.2.2.3.1 - Dereg
no key element" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">his/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg:metadata id="meta1">
+<!-- No lsKey nmwg:parameters element -->
</nmwg:metadata>
-
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
+ <nmwg:data id="data1" metadataIdRef="meta1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.3T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.3T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="4edff6b4-360f-43e4-aca2-e59aae5063fe"/><con:assertion type="SOAP Fault
Assertion" id="b1e417fd-98bb-4876-9ee4-aba25ecb43be"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="6962ff86-64f2-4492-8eab-7cefee9f7a44"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="8d1b2e22-7d81-445f-b9d4-aaddaec6733b"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(no_key|deregister\.key_not_found)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.3.1 - Test still exist"
id="0f739824-04df-4d2f-b725-50d1e4925d5e"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:n

ame>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.2 - Dereg empty lsKey"
id="3c8400ee-77d9-4f49-a34f-9371f9fbd40b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.2 - Dereg empty lsKey" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to deregister a service --
>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message messageIdRef="blah2" type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata id="meta1" >
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg:metadata id="meta1">
<nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
id="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+<!-- Empty key element -->
+ <nmwg:parameter name="lsKey"/>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
+ <nmwg:data id="data1" metadataIdRef="meta1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.4T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.4T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 5"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.5R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.5R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="d934eee6-afc2-4b46-bed6-1fe6be9d000c"/><con:assertion type="SOAP Fault
Assertion" id="8dd49872-3b8e-4c12-b491-df667df70eb4"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="6636a48d-283f-46f2-9e94-eb2a7f1be833"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="048a50be-2b71-498b-9b7c-57bea944a516"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(deregister\.)?key_not_found')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.3.2 - Test still exist"
id="1d9a5abf-427d-4860-9ba4-31a05ded142f"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>ls

Key</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.3 - Dereg lsKey not existing"
id="29555808-12be-4047-bd80-ef928438af90"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.3 - Dereg lsKey not existing" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Deregister a service -
->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
+ <nmwg:message id="blah1" messageIdRef="blah2"
type="LSDeregisterRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
- <nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
>http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:key id="keyid">
+ <nmwg:parameters id="paramid">
+ <nmwg:parameter name="lsKey">some non existing
lsKey</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
-
- <nmwg:data id="data1" metadataIdRef="meta1"/>
+ <nmwg:data id="data1" metadataIdRef="meta1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.5T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.5T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 6"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.6R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.6R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="00ec95df-1172-45b2-bc2d-0075a4b16c64"/><con:assertion type="SOAP Fault
Assertion" id="7bfabeb6-7b07-40b0-a540-59d4d80304c7"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4a4e8fdd-2b57-43c8-b546-7a98bc18eafa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="a7c6bb6d-7639-4d2f-8134-2eab6b6f7afe"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(deregister\.)?key_not_found')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - lsKey Check"
id="c96f6247-d933-4e7a-a373-9fc246700caa"><con:configuration><scriptText>//
We should check that:
+// - we have a single result-code
+// - the description matches the lsKey

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+import com.eviware.soapui.support.XmlHolder

-def noOfeventTypes = 0
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+// Get the accessPoint name from the Request, this should be the key in the
LSstore
+def apKey =
RequestHolder.getNodeValue('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]').trim()

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.6"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.6" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 1
+metadataIdRef = metadata[0].getAttribute("id")
+
+// Check that we have only one result-code, that only one matadata and data
element has been removed and that it matches the Request key
+def data =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data[@metadataIdRef="'+metadataIdRef+'"]/nmwgr:datum')
+assert data.size() == 1
+assert data[0].getValueAsString().contains(apKey)
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.3.3 - Test still exist"
id="f251a12c-07ce-4952-a8c2-1479008d3a1b"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.4 - Dereg bad key element" id="5391a988-aea7-4
91b-b775-6b943f47e0d4"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.4 - Dereg bad key element" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to deregister a service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
<nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
<!--You have a CHOICE of the next 2 items at this level-->
- <nmwg:metadata >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
+ <nmwg:metadata id="meta1" >
+<!-- Bad psservice:key item instead of nmwg:key -->
+ <psservice:key
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.2.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
- </nmwg:key>
+ </psservice:key>
</nmwg:metadata>

-
<nmwg:data id="data1" metadataIdRef="meta1"/>
+
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="a1e53699-efb0-42b3-b98d-6eba42965635"/><con:assertion type="SOAP Fault
Assertion" id="f452243c-fb80-43f6-9927-0b93aa1e4358"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="655ef4f0-dff2-4861-a1e3-7bc6bf9c9b60"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.6T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.6T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 7"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.2.2.3.7R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.7R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="77b47fd6-23ce-4487-8339-77738d72ef17"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.7" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(no_key|deregister\.key_not_found)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.3.4 - Test still exist"
id="38d93545-e0e6-4c17-bbde-890d0ec328b2"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:n

ame>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.5 - Dereg missing nmwg:key"
id="2d9f27b8-3a6d-41ed-b14a-947251783523"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.5 - Dereg missing nmwg:key" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:s
oapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
<soapenv:Header/>
<soapenv:Body>
<nmwg:message id = "blah1" messageIdRef="blah2"
type="LSDeregisterRequest"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

-<!--
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/"; -->
-
-
- <!--You have a CHOICE of the next 2 items at this level-->
<nmwg:metadata id="meta1" >
- <nmwg:key id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc4">
+<!-- Missing nmwg:key -->
<nmwg:parameters
id="localhost.localdomain.-6236687d:116c5a2ab6a:-7fc3">
- <nmwg:parameter
name="lsKey">http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:parameter name="lsKey"
>http://reed.man.poznan.pl:8080/axis/services/MA </nmwg:parameter>
</nmwg:parameters>
- </nmwg:key>
+
</nmwg:metadata>

+ <nmwg:data id="data1" metadataIdRef="meta1"/>

- <nmwg:data id="data1" metadataIdRef="meta11"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="8721561c-fb98-431e-9211-58b0d37abee1"/><con:assertion type="SOAP Fault
Assertion" id="ccb8463d-b2fe-4e4d-bcdd-1d69af3c6a78"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1e0f5f79-e488-46a0-8cd8-a1ffd45cde65"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Deregister/LSDeregisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="66aae2a4-81ff-45ae-8335-9234cff3c7c3"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(no_key|deregister\.key_not_found)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.2.2.3.5 - Test still exist"
id="5993dfdd-6cc5-4e97-8103-ed2e2a0ead34"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:n

ame>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:properties/></con:testCase><con:properties/><con:setupScript>//
Init an empty DB
+def initscript =
testSuite.getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+</con:setupScript></con:testSuite><con:testSuite name="Keepalive"
id="8a5b81fe-a6a1-4a18-8b82-00f1b8c7f19b"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="52e5f6af-468f-4811-bc30-54c5ed797319" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="Set Registration Properties"
id="6649eac6-84ca-41be-8a4a-6e0201b26ba5"><con:settings/><con:config><script>//
Set Herited properties so that the Test Run have correct values
+// We store the accessPoint and the lsKey in a property to keep it safe and
be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+["2.3.2.1.1 - Single Reg", "2.3.2.1.2 - Double Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.2.2.3.7T"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.2.2.3.7T" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.3.2.1.1 - Single Reg"
id="f55da2cc-484b-4ef7-8346-e5cdc3f51b7b"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer
" name="2.3.2.1.1 - transfer lsKey"
id="62cbd31d-df3a-4a2b-98fb-c6d9a13ee4f9"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.3.2.1.1
- Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.3.2.1.1
- Single
Keepalive</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="calltestcase" name="2.3.2.1.1 - Single Keepalive"
id="25f36856-83be-4a18-9594-7e2914d95874"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:

name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="2.3.2.1.2 - Double Reg"
id="fa0997f5-8373-417c-b34f-0006354e3f28"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKeyA</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.n

et:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKeyA</con:entry><con:entry>lsKeyB</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.3.2.1.2 - Double Keepalive"
id="dd765ac0-4d97-4e05-b40d-f537da89baf6"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.1.2 - Double Keepalive" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting
id="com.

eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Check the lsKeys are present: Double Keepaliave Request -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+ <nmwg:metadata id="key_to_keepalive_a">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
- http://reed.man.poznan.pl:8080/axis/services/MA
- </nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.3.2.1.2 - Double
Reg#lsKeyA}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite

name="Keepalive"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true"
id="52e5f6af-468f-4811-bc30-54c5ed797319" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit a"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.1.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.1.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.1.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.1.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
+ <nmwg:metadata id="key_to_keepalive_b">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.3.2.1.2 - Double
Reg#lsKeyB}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>

- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
+ <nmwg:data id="data0" metadataIdRef="key_to_keepalive_a"/>
+ <nmwg:data id="data1" metadataIdRef="key_to_keepalive_b"/>
</nmwg:message>
-
-
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="8212a42c-1bc4-4edb-97b2-86d56dcf1a28"/><con:assertion type="SOAP Fault
Assertion" id="c7356230-3ec3-4ec8-82f1-ef7ebc4b9ee4"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="33d2a61f-d69c-4d83-960d-090692180464"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Code (2)"
id="783dc82b-9ba0-4ac7-bd59-376be23d5897"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
@@ -5591,1631 +2483,425 @@

def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
+ assert it.getValueAsString() ==~ /.*success.ls.keepalive.*/

noOfeventTypes++
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit b"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
+assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - lsKey Check (2)"
id="1afab015-3fd3-4570-8f34-71e37f9075f0"><con:configuration><scriptText>//
We should check that:
+// - we have a two lsKeys
+// - the record is correctly kept alive with the corresponding lsKey

-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
+import com.eviware.soapui.support.XmlHolder

-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.1.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.1.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
+def ResponseHolder = new XmlHolder( messageExchange.responseContentAsXml )
+def RequestHolder = new XmlHolder( messageExchange.requestContentAsXml )
+ResponseHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+ResponseHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+ResponseHolder.namespaces["nmwgr"]="http://ggf.org/ns/nmwg/result/2.0/";
+RequestHolder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+RequestHolder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+RequestHolder.namespaces["perfsonar"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+RequestHolder.namespaces["psservice"]="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";

- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
+// Get the accessPoints name from the Request, this should be the key in the
LSstore
+def lsKeys =
RequestHolder.getNodeValues('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:key/nmwg:parameters/nmwg:parameter[@name="lsKey"]').toList()

- <nmwg:metadata id="serviceLookupInfo1">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA1
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
+// Check the metadata element and get the metadataIdRef
+metadata =
ResponseHolder.getDomNodes('/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata')
+assert metadata.size() == 2

- <nmwg:data id="data1" metadataIdRef="serviceLookupInfo1">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
-
-
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
+metadata.each {
+ // Check we have only one data element per metadata element
+ metadataIdRef = it.getAttribute("id")
+ datums =
ResponseHolder.getNodeValues('//nmwg:data[@metadataIdRef="'+metadataIdRef+'"]/nmwgr:datum')
+ assert datums.size() == 1
+ datum = datums[0]
+ match = 0
+ lsKeys.each {
+ if (datum.contains(it)) {
+ match++
+ key = it
+ }
+ }
+ assert match == 1
}
+</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="a78fec81-1f82-4a3e-b462-7f54447a6a88" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="Set Registration Properties"
id="582a5a05-4873-4df8-9d4a-a16cb3001497"><con:settings/><con:config><script>//
Set Herited properties so that the Test Run have correct values
+// We store the accessPoint and the lsKey in a property to keep it safe and
be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.1.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.1.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+["2.3.2.2.1 - Single Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
+}
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.3.2.2.1 - Single Reg"
id="fb317709-f9a8-4daf-9738-809b233807f6"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer
" name="2.3.2.2.1 - transfer lsKey"
id="30d17ee8-c6b4-42a7-b7d3-b83bcb73e93d"><con:settings/><con:config
xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.3.2.2.1
- Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.3.2.2.1
- Check
registration</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="calltestcase" name="2.3.2.2.1 - Check registration"
id="5641cbbd-b1d8-44c6-b2a2-62def5e96ec3"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><

con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.1 - Keepalive Bad nmwg NS"
id="875f8315-3731-4eb6-9523-adb1b10cd525"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.1 - Keepalive Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the
lsKey is present -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
+<!-- Bad NMWG NS -->
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/326";>
<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.3.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
<nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
- <nmwg:metadata id="key_to_keepalive1">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA1</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data1" metadataIdRef="key_to_keepalive1"/>
-
</nmwg:message>
-
-
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="8e492d6d-bfba-4104-8522-2ea90174f557"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"
id="2c29addd-fb94-4a5d-993b-58f82352001a"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true"
id="a78fec81-1f82-4a3e-b462-7f54447a6a88" timeout="0" wsrmEnabled="false"
wsrmVersion="1.0" wsrmAckTo=""><con:settings/><con:testStep type="groovy"
name="DbInit"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.2.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.3.2.2.4 - Keepalive Bad
nmwg:parameter</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.2 - Keepalive empty message"
id="14729f17-10f7-4943-a167-9bdd9bb094aa"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.2 - Keepalive empty message" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the lsKey is p
resent -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<!-- empty message -->
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="17e2db0f-fadc-4072-9b76-76f2984b0331"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.4 - Keepalive Bad nmwg:parameter"
id="f27f58ba-b0f5-48f7-bb30-72474b62613c"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con
:request name="2.3.2.2.4 - Keepalive Bad nmwg:parameter" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the lsKey is present -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base22/2.0/";>
-
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
+<!-- Missing nmwg:parameters element -->
+ <nmwg:parameter name="lsKey">${2.3.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:key>
</nmwg:metadata>
-
<nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
-
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.2.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="8c338c58-466e-41b6-a61c-5d6a467ff709"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error(/ls/no_key|\.ls\.keepalive\.key_not_found)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.5 - Keepalive No metadata/data pair"
id="c5bbe983-46f6-42ba-8817-b1d3d7112422"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:requ
est name="2.3.2.2.5 - Keepalive No metadata/data pair" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the lsKey is present -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
+<!-- Bad NMWG NS -->
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MADFDSDS</nmwg:parameter>
+ <nmwg:parameter name="lsKey">${2.3.2.2.1 - Single
Reg#lsKey}</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
-
+<!--- nmwg:data element not refering to nmwg:metadata -->
+ <nmwg:data id="data0" metadataIdRef="bad_reference"/>
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.2.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="c13e9c2e-eac7-4c0c-a4c2-9f86234927f2"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid Data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1926f550-515f-4d45-bd50-b45b4da5e834"><con:settings/><con:testStep
type="calltestcase"
name="2.3.2.3.1 - Single Reg"
id="eead877b-a515-481a-92bf-10b58b859b68"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="transfer" name="2.3.2.3.1 - transfer lsKey"
id="2fb43156-0b76-46a6-887a-0207a5
6cfae2"><con:settings/><con:config xsi:type="con:PropertyTransfersStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:transfers
setNullOnMissingSource="true" transferTextContent="true" failOnError="true"
ignoreEmpty="false" transferToAll="false" useXQuery="false" entitize="false"
transferChildNodes="false"><con:name>lsKey</con:name><con:sourceType>lsKey</con:sourceType><con:sourceStep>2.3.2.3.1
- Single
Reg</con:sourceStep><con:targetType>lsKey</con:targetType><con:targetStep>2.3.2.3.1
- Check
registration</con:targetStep></con:transfers></con:config></con:testStep><con:testStep
type="calltestcase" name="2.3.2.3.1 - Check registration"
id="c174a762-885e-4e66-b45a-7cfbf70fb9a9"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>064b9943-a570-4d82-9c34-94084cd2286c</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</

con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.3.2.3.1 - Keepalive lsKey not existing"
id="6cbed944-acd1-47f0-b70f-ea2e5528c4a8"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.1 - Keepalive lsKey not existing" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the lsKey is present -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
+ <nmwg:parameter name="lsKey">some non existing
lsKey</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
<nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
-
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.2.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="0d68fdc7-f5f1-4a18-a00d-c8cf988f435c"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.(keepalive\.)?key_not_found')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.3.2 - Keepalive no key element"
id="9ad1c48c-d2e8-4483-b67f-2d6192fd4a7e"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3
.2 - Keepalive no key element" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Try to check the lsKey is present -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
+<nmwg:message type="LSKeepaliveRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="key_to_keepalive">
<nmwg:key>
<nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MAssss</nmwg:parameter>
+<!-- No lsKey, no nmwg:parameter element -->
</nmwg:parameters>
</nmwg:key>
</nmwg:metadata>
-
<nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
</nmwg:message>
-
-
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="6040efdf-b273-4047-8a3e-56953a0c6fe3"/><con:assertion type="SOAP Fault
Assertion" id="4599e375-d837-4a04-8445-268530b783f9"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="1bf7b028-2dd6-4b3f-b941-0bb7a137e86d"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 5"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.2.5R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.5R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"
id="45254722-dd1c-4d95-aedc-88562ba93810"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.2.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.2.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error(/ls/no_key|\.ls\.keepalive\.key_not_found)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite
name="Query"
id="82c8ef23-4bdd-4f4c-be65-7f1d8f1dedfe"><con:description/><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="true" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Discovery" searchProperties
="true"
id="d2073c66-232a-40b8-98ef-14c90fdb8454"><con:settings/><con:testStep
type="request" name="IPv4 Address through xQuery"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="IPv4 Address through xQuery" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- XPath query: lookup for an IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
+ <nmwg:metadata id="meta1">
+ <xquery:subject id="sub1">
+ declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
-
+ for $data in
/nmwg:store/nmwg:data[contains(descendant::nmwgt:ifAddress,
"${#TestCase#IPv4}")]
+ let $metadata_id := $data/@metadataIdRef
+ let $metadata :=
/nmwg:store/nmwg:metadata[@id=$metadata_id]
+ return ($metadata, $data)
+ </xquery:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ <xquery:parameters id="param.1">
+ <nmwg:parameter name="lsOutput">native</nmwg:parameter>
+ </xquery:parameters>
+ </nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="xDbInit 4"
disabled="true"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="x2.3.1.2.4R" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="x2.3.1.2.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
+ </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="XPath Match" name="XPath
Match - Msg Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="x2.3.1.2.4" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="x2.3.1.2.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xm
lsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MA</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
- <nmwg:random/>
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid Data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1926f550-515f-4d45-bd50-b45b4da5e834"><con:settings/><con:testStep
type="groovy" name="DbInit a"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.3.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - accessPoint
Quantity"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+count(//perfsonar:subject/psservice:service/psservice:accessPoint['${#TestCase#accessPoint}'])</path><content>${#TestCase#Quantity}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - IPv4
Quantity"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.3.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
-
-</nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit b"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.3.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+count(//perfsonar:subject/nmwgt:interface/nmwgt:ifAddress[@type="ipv4"]['${#TestCase#IPv4}'])</path><content>${#TestCase#Quantity}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests (no summary)"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.3.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>Empty (keep for I2
switch)</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="IPv4 Address through
summary"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="IPv4 Address through summary" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit c"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.3.2.3.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
+
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
+
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
+ <nmwg:metadata id="meta1">
+ <summary:subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmtb:address type="ipv4">${#TestCase#IPv4}</nmtb:address>
+ </summary:subject>
+ <!-- need this... -->
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

+ </nmwg:metadata>
+
+ <nmwg:data metadataIdRef="meta1" id="d1"/>
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="XPath Match" name="XPath
Match - Msg Type"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
nmtb='http://ogf.org/schema/network/topology/base/20070828/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
summary='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Quantity"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.3.2.3.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.3.2.3.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message type="LSKeepaliveRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
- <nmwg:metadata id="key_to_keepalive">
- <nmwg:key>
- <nmwg:parameters id="keys">
- <nmwg:parameter name="lsKey">
-
http://reed.man.poznan.pl:8080/axis/services/MADFDSDS</nmwg:parameter>
- </nmwg:parameters>
- </nmwg:key>
- </nmwg:metadata>
-
- <nmwg:data id="data0" metadataIdRef="key_to_keepalive"/>
- </nmwg:message>
-
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Keepalive/LSKeepaliveResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite

name="Query"><con:description/><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1bf181e4-8dcb-464e-b2de-fc03dd6140a8"><con:settings/><con:testStep
type="groovy" name="DbInit 1 --- a"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.1R --- a"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1R --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+count(/soapenv:Envelope//perfsonar:subject)</path><content>${#TestCase#Quantity}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Same
IPv4"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace
nmtb='http://ogf.org/schema/network/topology/base/20070828/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace
summary='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/';
+
+//nmwg:metadata/summary:subject/nmtb:address[@type="ipv4"]</path><content>${#TestCase#IPv4}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XQuery Match" name="XQuery Match - Given
accessPoint"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace
nmtb='http://ogf.org/schema/network/topology/base/20070828/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace
summary='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/';
+declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+for $metadata in
//nmwg:message/nmwg:metadata[contains(summary:subject/nmtb:address,
"${#TestCase#IPv4}")]
+ let $metadata_id := $metadata/@id
+ let $data :=
//nmwg:message/nmwg:data[@metadataIdRef=$metadata_id]
+ return if ($data//psservice:service)
+ then data($data//psservice:accessPoint)
+ else
""</path><content>${#TestCase#accessPoint}</content><allowWildcards>false</allowWildcards></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="properties" name="Empty (keep for I2
switch)"><con:settings/><con:config xsi:type="con:PropertiesStep"
saveFirst="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:properties/></con:config></con:testStep><con:properties><con:property><con:name>IPv4</con:name><con:value>1.1.1.1</con:value></con:property><con:property><con:name>Quantity</con:name><con:value>0</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value/></con:property></con:properties></con:testCase><con:testCa
se failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1bf181e4-8dcb-464e-b2de-fc03dd6140a8"><con:description>The load test
cannot be run in a threaded environment, the test conditions will not be
correct.</con:description><con:settings/><con:testStep type="groovy"
name="Set Registration Properties"><con:settings/><con:config><script>// Set
Herited properties so that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def IPv4prefix =
tc.testSuite.project.getPropertyValue("Interface-AddressIPv4")
+def IPv4prefixB =
tc.testSuite.project.getPropertyValue("Interface-AddressIPv4-B")
+def thread = String.format('%02d', context.ThreadIndex)
+def discProps = null

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
+["Thread Properties", "2.4.2.1.1 - Single Reg", "2.4.2.1.1 - Double
Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ switch (it) {
+ case ~/.*Single.*/:
+ AP =
"http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath
+ IPv4 = IPv4prefix+"."+String.format('%d',
context.ThreadIndex+1)+"."+String.format('%d',
Integer.parseInt(counter).mod(254)+1)
+ props.setPropertyValue("accessPoint",AP)
+ discProps = tc.getTestStepByName("2.4.2.1.4 - Double
IPv4 discovery")
+ quantity = "2"
+ break
+ case ~/.*Double.*/:
+ APa =
"http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath
+ AP =
"http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath
+ IPv4 = IPv4prefixB+"."+String.format('%d',
context.ThreadIndex+1)+"."+String.format('%d',
Integer.parseInt(counter).mod(254)+1)
+ props.setPropertyValue("accessPointA",APa)
+ props.setPropertyValue("accessPointB",AP)
+ discProps = tc.getTestStepByName("2.4.2.1.4 - Single
IPv4 discovery")
+ quantity = "1"
+ break
+ }
+ // We must also set the properties of the Discovery Test Runs with
appropriate values
+ if (discProps) {
+ discProps.setPropertyValue("IPv4", IPv4)
+ discProps.setPropertyValue("Quantity", quantity)
+ discProps.setPropertyValue("accessPoint", AP)
+ }
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</script></con:config></con:testStep><con:testStep type="properties"
name="Thread Properties"><con:settings/><con:config
xsi:type="con:PropertiesStep" saveFirst="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>ServicesCount</con:name><con:value>3</con:value></con:property></con:properties></con:config></con:testStep><con:testStep
type="calltestcase" name="2.4.2.1.1 - Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property>

<con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 - XPath ServType Test"
id="fde41be2-6f6e-4da6-84a2-75135236863c"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 - XPath ServType Test" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting
id="com.eviware.soapui.impl.ws

dl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
+<nmwg:message type="LSQueryRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.1.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -7223,788 +2909,238 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Event
Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//lookup-storage-from-query/nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="My_test_MA"]/psservice:accessPoint</path><content>http://reed.man.poznan.pl:8080/axis/services/MA</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 1 --- b"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.1R --- b"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1R --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta12">
- <perfsonar:subject id="subj2"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng2.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p3p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.9.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.query</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result"
id="c600469b-d008-4499-9b44-c652273a279d"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+contains(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/psservice:datum,
"${2.4.2.1.1 - Single
Reg#accessPoint}")</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.4.2.1.1 - Double Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:

property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKeyA</con:name><con:value>1010db014f0eccec3b6a78590d35ff12</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>67e0c1024c55064c61838515d3833520</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKeyA</con:entry><con:entry>lsKeyB</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 - XPath Double ServType Test"
id="3cf11671-20ea-4c2e-9dee-03613d9ee6ac"><con:set
tings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 - XPath Double ServType Test" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
+<nmwg:message type="LSQueryRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
-
- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.1.1
- Double Reg#lsKeyA}" or @id="${2.4.2.1.1 - Double Reg#lsKeyB}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return $metadata
</xquery:subject>
+ <xquery:parameters id="param.1">
+ <nmwg:parameter name="lsOutput">native</nmwg:parameter>
+ </xquery:parameters>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
-
</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="3dae1725-9fc6-48d3-9c16-0b27970dec63"/><con:assertion type="SOAP Fault
Assertion" id="85d115da-c9fc-427b-bfc4-cebb257cb1af"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="84ec2c3e-4932-4a4c-9e83-157a8e92f5ba"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="47dd7bcc-c25d-4ebc-8d5c-dc44dde5da94"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Event
Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//lookup-storage-from-query/nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="My_test_MA"]/psservice:accessPoint</path><content>http://reed.man.poznan.pl:8080/axis/services/MA</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result2"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.query</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result"
id="2dcc3433-9642-4403-8f5a-c80dfef0534d"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//lookup-storage-from-query/nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="My_test_MA2"]/psservice:accessPoint</path><content>http://reed.man.poznan.pl:8080/axis/services/MA2</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 1 --- c"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.1R --- c"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1R --- c" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta12">
- <perfsonar:subject id="subj2"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng2.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p3p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.9.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+/soapenv:Envelope//nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="${#Project#ServiceName}
- ${Thread Properties#ParentThread} - ${Thread Properties#Counter} -
a"]/psservice:accessPoint</path><content>http://s${Thread
Properties#ParentThread}-${Thread
Properties#Counter}-a.${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result2"
id="c6e3735c-5bc8-4e64-8e9e-b46e92ce52d6"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 --- c"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 --- c" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+/soapenv:Envelope//nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="${#Project#ServiceName}
- ${Thread Properties#ParentThread} - ${Thread Properties#Counter} -
b"]/psservice:accessPoint</path><content>http://s${Thread
Properties#ParentThread}-${Thread
Properties#Counter}-b.${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 - XPath ServType and ServName
Test"><con:settings/><con:co
nfig xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 - XPath ServType and ServName Test" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType and
serviceName -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
+<nmwg:message type="LSQueryRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA" and
$metadata//psservice:serviceName="My_test_MA2"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[descendant::psservice:serviceName="${#Project#ServiceName}
- ${Thread Properties#ParentThread} - ${Thread Properties#Counter} - b"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return $metadata
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ <xquery:parameters id="param.1">
+ <nmwg:parameter name="lsOutput">native</nmwg:parameter>
+ </xquery:parameters>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="3dae1725-9fc6-48d3-9c16-0b27970dec63"/><con:assertion type="SOAP Fault
Assertion" id="85d115da-c9fc-427b-bfc4-cebb257cb1af"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="84ec2c3e-4932-4a4c-9e83-157a8e92f5ba"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Msg Type"
id="47dd7bcc-c25d-4ebc-8d5c-dc44dde5da94"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Event
Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//lookup-storage-from-query/nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="My_test_MA2"]/psservice:accessPoint</path><content>http://reed.man.poznan.pl:8080/axis/services/MA2</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 1 --- d"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.1R --- d"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1R --- d" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta12">
- <perfsonar:subject id="subj2"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng2.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p3p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.9.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.query</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result - serviceName"
id="2dcc3433-9642-4403-8f5a-c80dfef0534d"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope//nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="${#Project#ServiceName}
- ${Thread Properties#ParentThread} - ${Thread Properties#Counter} -
b"]/psservice:accessPoint</path><content>http://s${Thread
Properties#ParentThread}-${Thread
Properties#Counter}-b.${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result - serviceType"
id="2dcc3433-9642-4403-8f5a-c80dfef0534d"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 --- d"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 --- d" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+/soapenv:Envelope//nmwg:metadata/perfsonar:subject/psservice:service[psservice:serviceName="${#Project#ServiceName}
- ${Thread Properties#ParentThread} - ${Thread Properties#Counter} -
b"]/psservice:serviceType</path><content>${#Project#serviceType}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.1 - XPath count registered Services"
id="52feed01-0381-47fe-b0e8-f83f17ba7f5c"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:int

erface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.1 - XPath count registered Services" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Count registered Services -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;

- let $metadata :=
/nmwg:store[@type="LSStore"]/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- return <val>{count($metadata)}</val>
+ let $metadata :=
/nmwg:store/nmwg:metadata[contains(descendant::psservice:accessPoint,"http://s${Thread
Properties#ParentThread}-${Thread Properties#Counter}")]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]

+ return count($metadata)
</xquery:subject>
-
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="07463912-d733-472a-8fd7-a344b8b2c7cb"/><con:assertion type="SOAP Fault
Assertion" id="c74c144b-7d58-4c8b-8be5-6e25b3cd02fa"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4f8a2a4c-6a7e-41f0-9344-8c0178eab2f5"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
-
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="cd264b45-0179-425f-b2ad-90d3250f9e70"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.query</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result Value"
id="b2d750a2-4005-4bbc-8ce4-dd36cb6da6fc"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-//val</path><content>2</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2 --- a"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.2R --- a"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.2R --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+contains(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/psservice:datum,
${Thread Properties#ServicesCount} cast as
xs:string?)</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.2 - XPath non existing ServName"
id="71031270-b2d2-4b0c-a965-5227b5bd36c9"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.2 - XPath non existing ServName" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Query for a non existing service -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.2 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.2 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
<nmwg:metadata id="meta1">

<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceName="My_test_MA2"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[descendant::psservice:serviceName="Some non
existing service"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ return $metadata
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -8012,69 +3148,52 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="696ef542-303f-4d3f-8e2c-818a4f1ac807"/><con:assertion type="SOAP Fault
Assertion" id="6bb8caf7-cf73-4237-82f5-5fb764dc19c2"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="4a819668-258d-4d63-a3c8-235191a8c550"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="f9afa5c4-4345-460c-a2a1-fb103d26a8b9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'(success\.ls\.query|error\.ls\.query\.empty_results)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No Result"
id="f60b29c3-2799-4876-98f1-08a8dcbb681c"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//psservice:datum</path><content>&lt;psservice:datum
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/></content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.2 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.2 --- b" outgoingWss="" incomingWss=""><con:settings><con:setti
ng
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+not(exists(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data//perfsonar:subject))</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.2 - XPath non existing ServType"
id="557417f8-fb15-4ae2-98cb-1304689faeb0"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.2 - XPath non existing ServType" o
utgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
Query for non existing serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">

<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MAXXX"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[descendant::psservice:serviceType="Non existing
service type"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ return $metadata
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -8082,162 +3201,50 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="ee1838b2-4f2c-4b48-b687-19863f167f00"/><con:assertion type="SOAP Fault
Assertion" id="9e326eab-0dea-41c2-a1d6-4d30a11b2934"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="2d4c3877-457d-429b-9653-3bc4300bd326"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="80c2ea7c-0bb1-4561-aaaf-255f669358af"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'(success\.ls\.query|error\.ls\.query\.empty_results)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No Result"
id="243b6174-3b95-4898-8136-d51ec783f8f7"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//psservice:datum</path><content>&lt;psservice:datum
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/></content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+not(exists(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data//perfsonar:subject))</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.3 - XPath non valid exp"
id="d4d1a993-b994-48a1-81f6-f375637298a8"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.3 - XPath non valid exp" outgoingWss="" in
comingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query but asking for non existing data -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
- <soapenv:Header/>
- <soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
<nmwg:metadata id="meta1">

<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;

/nmwg:storeaaa/nmwg:metadata
-
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -8245,391 +3252,160 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="9adee378-926b-448b-9c97-ebe4027a9e62"/><con:assertion type="SOAP Fault
Assertion" id="9930c796-57c6-4ba0-bb26-60248483d49f"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="433e0ba9-f0b1-4a33-9815-b24ac8189634"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="8b7e67f9-236e-4a2a-977e-185d8c2f001b"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'(success\.ls\.query|error\.ls\.query\.empty_results)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No Result"
id="d54838ca-67be-4c6a-9600-ba06cfb76e8d"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//psservice:datum</path><content>&lt;psservice:datum
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/></content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA2</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA2
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid2.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown2</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud2</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.234</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>100000000002</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+not(exists(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data//perfsonar:subject))</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.4.2.1.4 - Single IPv4
discovery"><con:settings/><con:config xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>d2073c66-232a-40b8-98ef-14c90fdb8454</con:targetTestCase><con:properties><con:property><con:name>IPv4</con:name><con:value>62.42.1.1</con:value></con:property><con:property><c

on:name>Quantity</con:name><con:value>1</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests (no summary)"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.4 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.4 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/"
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.4.2.1.4 - Double IPv4
discovery</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.4 - Discovery Summary double IP"
id="4154158b-731d-4b5f-b096-7ea34e89e2d0"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.4 - Discovery Summary double IP" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='U
TF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
-<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmtb:address
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
type="ipv4">198.32.8.34</nmtb:address>
+ <summary:subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmtb:address type="ipv4">${2.4.2.1.4 - Double IPv4
discovery#IPv4}</nmtb:address>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</summary:subject>
-
- <!-- need this... -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="31f8487e-1cfe-4510-b3df-1041d9174e93"/><con:assertion type="SOAP Fault
Assertion" id="8984df65-9591-4d39-8c01-8a1d1f9385af"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-<!-- End XML -->
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="XPath Match" name="XPath Match - Type"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="e0984531-93b7-4276-af09-75c9e7300bff"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
quantity"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result quantity"
id="e3d52dc1-a285-4074-a828-1a9936fba4c7"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-count(/soapenv:Envelope//perfsonar:subject)</path><content>1</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
content"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+count(/soapenv:Envelope//perfsonar:subject)</path><content>2</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result content 1"
id="50044a06-0fef-47c0-a627-aa5804caf78f"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope//perfsonar:subject//psservice:accessPoint</path><content>http://reed.man.poznan.pl:8080/axis/services/MA</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.4 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.4 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UT

F-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+/soapenv:Envelope//perfsonar:subject//psservice:accessPoint</path><content>http://s${Thread
Properties#ParentThread}-${Thread
Properties#Counter}.${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result content 2"
id="50044a06-0fef-47c0-a627-aa5804caf78f"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope//perfsonar:subject//psservice:accessPoint</path><content>http://s${Thread
Properties#ParentThread}-${Thread
Properties#Counter}-a.${#Project#AccessPoint-name}:${#Project#AccessPoint-port}${#Project#AccessPoint-path}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Discovery IPv4
address"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace
nmtb='http://ogf.org/schema/network/topology/base/20070828/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace
summary='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/summary:subject/nmtb:address</path><content>${#Project#Interface-AddressIPv4}.${=${Thread
Properties#ParentThread}+1}.${=Integer.parseInt("${Thread
Properties#Counter}").mod(254)+1}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="calltestcase" name="2.4.2.1.4 - Double IPv4
discovery"><con:settings/><con:config xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>d2073c66-232a-40b8-98ef-14c90fdb8454</con

:targetTestCase><con:properties><con:property><con:name>IPv4</con:name><con:value>62.40.1.1</con:value></con:property><con:property><con:name>Quantity</con:name><con:value>2</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="2.4.2.1.5 - Non existing IPv4
discovery"><con:settings/><con:config xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>d2073c66-232a-40b8-98ef-14c90fdb8454</con:targetTestCase><con:properties><con:property><con:name>IPv4</con:name><con:value>62.30.1.1</con:value></con:property><con:property><con:name>Quantity</con:name><con:value>0</con:value></con:property><con:property><con:name>accessPoint</con:name></co

n:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.4 - Discovery utilization eventType"
id="f7e3ec2a-57c4-4b17-8336-d973038d19df"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.4 - Discovery utilization eventType" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for all the utilisation data registered -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
<soapenv:Header/>
<soapenv:Body>
-
-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";>

<nmwg:metadata id="meta1">
<summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmwg:eventType>utilisation</nmwg:eventType>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</summary:subject>
-
<!-- need this... -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>


-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="5216d440-db89-43e5-a83f-ff3d083e31cd"/><con:assertion type="SOAP Fault
Assertion" id="72f9e18a-33bc-4e62-b2c9-16769498f74f"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-<!-- End XML -->
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="XPath Match" name="XPath Match - Type"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="4cc7edd7-78bb-44fc-8051-c98df7ae49a3"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
quantity"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result quantity (minimum)"
id="9a8160d4-accb-4c7a-abc8-07938d237de7"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-count(/soapenv:Envelope//perfsonar:subject)</path><content>2</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 5"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.1.5R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.5R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+count(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/perfsonar:subject)>=2</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.6 - Discovery non valid
exp"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.6 - Discovery non valid exp" outgoingWss=""
incomingWss=""><con:settin
gs><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.1.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.1.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
- <soapenv:Header/>
- <soapenv:Body>

-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
<nmwg:message type="LSQueryRequest"
id="LSDiscoveryRequest"

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
@@ -8641,161 +3417,87 @@

xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
-<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmtb:address
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
type="ipv4">198.32.18.34</nmtb:address>
+ <summary:subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmwg:eventType>capacity</nmwg:eventType>
</summary:subject>
-
<!-- need this... -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>


-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="31f8487e-1cfe-4510-b3df-1041d9174e93"/><con:assertion type="SOAP Fault
Assertion" id="8984df65-9591-4d39-8c01-8a1d1f9385af"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-<!-- End XML -->
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="XPath Match" name="XPath Match - Type"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="e0984531-93b7-4276-af09-75c9e7300bff"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result quantity"
id="e3d52dc1-a285-4074-a828-1a9936fba4c7"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="5c0d8561-72ef-4588-b3b0-138fbeb15fef"><con:settings/><con:testStep
type="groovy" name="DbInit 1"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:loadTest
name="Registrations and
queries"><con:settings/><con:threadCount>20</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>60</con:testLimit><con:limitType>TIME</con:lim

itType><con:loadStrategy><con:type>Simple</con:type><con:config><testDelay>1000</testDelay><randomFactor>0.5</randomFactor></con:config></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB
+def tc = loadTestRunner.loadTest.testCase
+def initscript =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+// Set the ServicesCounter properties to match the number of threads
+//tc.setPropertyValue("ServicesCount", String.format("%d",
loadTestRunner.getRunningThreadCount()*3))
+//tc.setPropertyValue("ServicesCount", "6")
+</con:setupScript></con:loadTest><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="5c0d8561-72ef-4588-b3b0-138fbeb15fef"><con:settings/><con:testStep
type="groovy" name="Set Registration
Properties"><con:settings/><con:config><script>// Set Herited properties so
that the Test Run have correct values
+// We store the accessPoint and the lsKey in a property to keep it safe and
be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.2.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
-declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
-
-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
+["2.4.2.2.1 - Single Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.4.2.2.1 - Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.1 - Bad nmwg NS"><con:setti
ngs/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.1 - Bad nmwg NS" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwffasfasfg/base/2.0/";
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.2.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -8803,1449 +3505,443 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.2.2R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.2 - Bad xquery tag"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.2 - Bad xquery tag" outgoingWss="" incomingWss=""><
con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
+ <xquery:not_a_subject id="sub1">
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- <xquery:NOT_A_subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
-
- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
- </xquery:NOT_A_subject>
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.2.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
+ </xquery:not_a_subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.2.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA2</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA2
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid2.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown2</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud2</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.234</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>100000000002</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.3 - Summary Bad nmwg
NS"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.3 - Summary Bad nmwg NS" outgoingWss="" incomi
ngWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
-
xmlns:nmwg="http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.org/ns/XXXXXXXXXXXXXXXXX/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
-<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmtb:address
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
type="ipv4">198.32.8.34</nmtb:address>
+ <summary:subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmtb:address type="ipv4">${2.4.2.2.1 - Single
Reg#IPv4}</nmtb:address>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</summary:subject>
-
- <!-- need this... -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
-
-<!-- End XML -->
-
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Result"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.2.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
-
-
- <nmwg:metadata id="serviceLookupInfo2">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA2</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA2
- </psservice:accessPoint>
- <psservice:serviceType>MA2</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA2
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data2" metadataIdRef="serviceLookupInfo2">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid2.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown2</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud2</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.234</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>100000000002</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
2</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.4 - Summary Bad tag"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.4 - Summary Bad tag" outgoingWss="" incomingWss=""
><con:settings><con:setting
>id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting
>
>id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
> version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:xxx
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
-<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmtb:address
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
type="ipv4">198.32.8.34</nmtb:address>
- </summary:xxx>
-
- <!-- need this... -->
+ <summary:not_a_subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmtb:address type="ipv4">${2.4.2.2.1 - Single
Reg#IPv4}</nmtb:address>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ </summary:not_a_subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
-
-<!-- End XML -->
-
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Result"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1d4bc99a-33e8-4555-bc94-1a29d3324c03"><con:settings/><con:testStep
type="groovy" name="DbInit 1"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.1R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.1R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.4.2.2.6 - No message
type</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.5 - No metadata/data
pair"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.5 - No metadata/data pair" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>
+
<nmwg:metadata id="meta1">
-
- <xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
-
- for $m in /nmwg:store/nmwg:metadata
- let $s := $m/perfsonar:subject/psservice:service
- let $accessPoint := $s/psservice:accessPoint
- return $accessPoint
-
- </xquery:subject>
-
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
-
+ <summary:subject id="subject.1">
+ <!-- can have multiples of each, note that this creates an 'or'
relationship -->
+ <nmtb:address type="ipv4">${2.4.2.2.1 - Single
Reg#IPv4}</nmtb:address>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ </summary:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

</nmwg:metadata>

</nmwg:message>
-
-</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 2"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.2R" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.2R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
</soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.2" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.6 - No message type"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.6 - No message type" outgoingWss
="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-
-<nmwg:message
- type="LSQueryRequest"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+<nmwg:message id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $m in /nmwg:store/nmwg:metadata
- let $s := $m/perfsonar:subject/psservice:service
- let $accessPoint := $s/psservice:accessPoint
- return $accessPoint
-
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.2.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
-
-</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 3"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.3R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.3R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
+ </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(no_message_type|transport\.parse_error)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.7 - Bad eventType"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.7 - Bad eventType" outgoingWss="" incomingW
ss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- id="msg1"
+<nmwg:message type="LSQueryRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.2.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
</xquery:subject>
-
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+<!-- Bad eventType -->
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0/bad</nmwg:eventType>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 4"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.4R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.4R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,
'error(/unsupported query
message|\.ls\.query\.eventType)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.2.8 - No eventType"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.2.8 - No eventType" outgoingWss="" in
comingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
+<nmwg:message type="LSQueryRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ for $metadata in
/nmwg:store/nmwg:metadata[@id="${2.4.2.2.1
- Single Reg#lsKey}"]
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ return
data($metadata/perfsonar:subject/psservice:service/psservice:accessPoint)
</xquery:subject>
+<!-- No eventType -->

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 5"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.5R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.5R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(no_event_type|ls\.query\.eventType)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="1d4bc99a-33e8-4555-bc94-1a29d3324c03"><con:settings/><con:testStep
type="groovy" name="Set Registra
tion Properties"><con:settings/><con:config><script>// Set Herited
properties so that the Test Run have correct values
+// We store the accessPoint and the lsKey in a property to keep it safe and
be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
+["2.4.2.3.1 - Single Reg"].each {
+ props = tc.getTestStepByName(it)
+ counter = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="2.4.2.3.1 - Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>01e5e306ee28c68cda13d78fb2feac9c</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties><con:entry>lsKey</con:entry></con:returnProperties><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.1 - Missing xquery"><con:se
ttings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.1 - Missing xquery" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
+<!-- Missing xquery -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 6"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.6R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.6R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.6"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.6" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.2 - Missing xquery
content"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.2 - Missing xquery content" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
-Litwo! Ojczyzno moja! ty jesteÅ› jak zdrowie.
-Ile cię trzeba cenić, ten tylko się dowie,
-Kto cię stracił. Dziś piękność twą w całej ozdobie
-Widzę i opisuję, bo tęsknię po tobie
+ No xquery content
</xquery:subject>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

@@ -10253,678 +3949,354 @@
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 7"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.7R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.7R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
- </soapenv:Body>
</soapenv:Envelope>
-]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:assertion type="GroovyScriptAssertion"
name="Script Assertion - Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.7" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.3 - Bad xquery
content"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.3 - Bad xquery content" outgoingWss="" incoming
Wss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+<nmwg:message type="LSQueryRequest" id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/bad";

xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>

<nmwg:metadata id="meta1">
-
<xquery:subject id="sub1">
- declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
-
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ bad-declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;

- for $metadata in /nmwg:store/nmwg:metadata
- let $metadata_id := $metadata/@id
- let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
- where $metadata//psservice:serviceType="MA"
- return &lt;lookup-storage-from-query&gt;
- {$metadata} {$data}
- &lt;/lookup-storage-from-query&gt;
+ /nmwg:badstore/nmwg:metadata
</xquery:subject>
-
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/sfasfasfservice/lookup/query/xquery/2.0</nmwg:eventType>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>

</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1" />
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>ErrorResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 8"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.8R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.8R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|transport)\.parse_error')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
-declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.8"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.8" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.4.2.3.8 - Missing Summary
element</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.4 - Summary Bad
content"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.4 - Summary Bad content" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-<nmwg:message
- type="LSQueryRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
-
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
+ xmlns:nmtbad="http://ogf.org/schema/network/topology/bad/";>
+
<nmwg:metadata id="meta1">
-
- <xquery:subject id="sub1">
- decrrrlare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
- declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
- declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
- declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
-
- /nmwg:storeaaa/nmwg:metadata
-
- </xquery:subject>
-
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
-
+ <summary:subject id="subject.1">
+ <nmtbad:address>bad request</nmtbad:address>
+ </summary:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

</nmwg:metadata>
- <nmwg:data id="data1" metadataIdRef="meta1" />
+
+ <nmwg:data metadataIdRef="meta1" id="d1"/>
</nmwg:message>
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+ </soapenv:Body>
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Query/LSQueryResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 9"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.9R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.9R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
- <soapenv:Header/>
- <soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
-
-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.query')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
-
-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.9 --- a"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.9 --- a" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.
org/soap/envelope/"
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.5 - Summary Bad
element"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.5 - Summary Bad element" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@in
line-response-attachments">false</con:setting><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
- <xxx:address xmlns:xxx="http://this.url.is/incorrect/";
type="ipv4">198.32.8.34</xxx:address>
+ <summary:subject id="subject.1">
+<!-- Unsupported element -->
+ <nmtb:bad>bad request</nmtb:bad>
</summary:subject>
-

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
</nmwg:metadata>
- <nmwg:data metadataIdRef="meta1" id="d1"/>
+
+ <nmwg:data metadataIdRef="meta1" id="d1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="XPath Match" name="XPath Match - Type"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.query')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.9 --- b"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.9 --- b" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsona

r-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.6 - Summary No
element"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.6 - Summary No element" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inli
ne-response-attachments">false</con:setting><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>

-<!-- Begin XML -->
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
-
-<!-- can have multiples of each, note that this creates an 'or' relationship
-->
- <nmtb:xxx
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
type="ipv4">198.32.8.34</nmtb:xxx>
+ <summary:subject id="subject.1">
+<!-- No search element -->
</summary:subject>
-
- <!-- need this... -->

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
-
</nmwg:metadata>

<nmwg:data metadataIdRef="meta1" id="d1"/>
-
</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-<!-- End XML -->
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

- </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="XPath Match" name="XPath Match - Type"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match -
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.ls\.query')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="groovy" name="DbInit 10"><con:settings/><con:config><script>import
org.perfsonar.soapUI.ls.TestUtil;
-
-def protocol =
testRunner.testCase.testSuite.project.getPropertyValue("lsProtocol")
-def host = testRunner.testCase.testSuite.project.getPropertyValue("lsHost")
-def user =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistUser")
-def pass =
testRunner.testCase.testSuite.project.getPropertyValue("lsExistPass")
-def urlString = protocol+host+"/initDb"
-
-def stream = TestUtil.openStream(urlString,user,pass)
-stream.eachLine{
- if(it != "DbInitializer - success"){
- log.info("DB can't be initialized")
- assert false
- }else{
- log.info("DB initialized")
- }
-}</script></con:config></con:testStep><con:testStep type="request"
name="2.4.2.3.10R"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.10R" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns="http://ggf.org/ns/nmwg/base/2.0/";>
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.7 - Summary and
xquery"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.7 - Summary and xquery" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inli
ne-response-attachments">false</con:setting><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
- <nmwg:message type="LSRegisterRequest"
- id="msg1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/";>
- <nmwg:metadata id="serviceLookupInfo">
- <perfsonar:subject
- id="commonParameters"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <psservice:service id="serviceParameters"
- xmlns:psservice=
-
"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
- <psservice:serviceName>My_test_MA</psservice:serviceName>
- <psservice:accessPoint>
- http://reed.man.poznan.pl:8080/axis/services/MA
- </psservice:accessPoint>
- <psservice:serviceType>MA</psservice:serviceType>
- <psservice:serviceDescription>
- This is my testing MA
- </psservice:serviceDescription>
- </psservice:service>
- </perfsonar:subject>
- </nmwg:metadata>
- <nmwg:data id="data0" metadataIdRef="serviceLookupInfo">
- <nmwg:metadata id="meta1">
- <perfsonar:subject id="subj1"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";>
- <nmwgt:interface
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
-
<nmwgt:hostName>atlang-hstnng.abilene.ucaid.edu</nmwgt:hostName>
- <nmwgt:ifName>unknown</nmwgt:ifName>
- <nmwgt:ifDescription>
-
hstn:oc192(p2p)::show:intracloud</nmwgt:ifDescription>
- <nmwgt:ifAddress
type="ipv4">198.32.8.34</nmwgt:ifAddress>
- <nmwgt:direction>in</nmwgt:direction>
- <nmwgt:capacity>10000000000</nmwgt:capacity>
- </nmwgt:interface>
- </perfsonar:subject>
- <nmwg:eventType>utilisation</nmwg:eventType>
- </nmwg:metadata>
-
- </nmwg:data>
- </nmwg:message>
-
+
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>
+
+ <nmwg:metadata id="meta1">
+<!-- Double query -->
+ <xquery:subject id="sub1">
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ /nmwg:store/nmwg:metadata
+ </xquery:subject>
+ <xquery:parameters id="param.1">
+ <nmwg:parameter name="lsOutput">native</nmwg:parameter>
+ </xquery:parameters>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ <summary:subject id="subject.1">
+ <nmtb:address>some bad IP</nmtb:address>
+ </summary:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

+ </nmwg:metadata>
+
+ <nmwg:data metadataIdRef="meta1" id="d1"/>
+</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Register/LSRegisterResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
-declare namespace select='http://ggf.org/ns/nmwg/ops/select/2.0/';
-declare namespace errors='http://ggf.org/ns/nmwg/characteristic/errors/2.0/';
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
-declare namespace fn="http://www.w3.org/2005/xpath-functions";;
-declare namespace nmwgr="http://ggf.org/ns/nmwg/result/2.0/";;
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.ls.register</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(no_subject|ls\.query\.eventType)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.10"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.10" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
nvelope/" xmlns:axis="http://axis2interface.service.base2.perfsonar.org";>
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.4.2.3.8 - Missing Summary
element"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.4.2.3.8 - Missing Summary element" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRe

quest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<?xml
version='1.0' encoding='UTF-8'?>
+<!-- Query for an existing IP address -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header/>
<soapenv:Body>
-
-<?xml version='1.0' encoding='UTF-8'?>
-<nmwg:message type="LSQueryRequest"
- id="LSDiscoveryRequest"
-
xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
+
+<nmwg:message type="LSQueryRequest" id="LSDiscoveryRequest"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";

xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";>
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";
+
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>

<nmwg:metadata id="meta1">
- <summary:subject
xmlns:summary="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/";
id="subject.1">
- </summary:subject>
-
+<!-- Missing subject element -->
+ <nmtb:address type="ipv4">${2.4.2.2.1 - Single
Reg#IPv4}</nmtb:address>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>

<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/discovery/summary/2.0</nmwg:eventType>

-
</nmwg:metadata>
- <nmwg:data metadataIdRef="meta1" id="d1"/>
+
+ <nmwg:data metadataIdRef="meta1" id="d1"/>
</nmwg:message>
</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"
id="e5254558-b975-4b34-b5d4-38ea71425c58"/><con:assertion type="SOAP Fault
Assertion" id="3e60b293-f303-4671-8065-8619a64228cf"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="c7d059be-0f16-405f-bced-68d1b4a93ab8"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Type"
id="77c6e84e-e17c-4237-b19c-3ce012b68cf9"><con:configuration><path>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite

name="Echo"><con:description/><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Correct requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="6a908806-14bd-43c0-a930-c286101f7e67"><con:settings/><con:testStep
type="request" name="2.5.2.1.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</c
on:operation><con:request name="2.5.2.1.1" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/@type</path><content>LSQueryResponse</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - Result
Code"><con:configuration><path>declare namespace
nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(no_subject|ls\.query\.eventType)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion
type="XPath Match" name="XPath Match - No
Result"><con:configuration><path>declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+count(/soapenv:Envelope//perfsonar:subject)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/><con:setupScript>//
Init an empty DB
+def initscript =
testSuite.getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initscript.run(null, false)
+</con:setupScript></con:testSuite><con:testSuite name="Echo"
id="737cc852-3a97-439e-a52e-416664706e62"><con:description>Echo Requests
messages. GEANT service support DBConnection and DBSchema tests, but I2
services don't.
+
+The invalid data request actually gives no errored result... not sure it is
intended.</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="true"
maxResults="0" name="Correct requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="6a908806-14bd-43c0-a930-c286101f7e67" amfAuthorisation="false"
amfEndpoint="" amfLogin=""
amfPassword=""><con:description/><con:settings/><con:testStep type="request"
name="2.5.2.1.1 - Echo Request"
id="788efbc0-de8e-47de-adc7-99b16fdaf4e4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.1 - Echo Request" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">fal
se</con:setting><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">

<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
@@ -10934,22 +4306,31 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="5b84a67a-0f7f-42cf-baca-d600fbcaafc8"/><con:assertion type="SOAP Fault
Assertion" id="ec191b3d-a630-4a0c-ae6a-0f68281b08db"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="e437a626-29fd-4e51-b83e-3a75a317a894"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*success.*/
- noOfeventTypes++
-}
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.echo</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>Empty (keep for I2
switch)</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.2 - Selftest DBConnection yes"
id="aafa6fb0-065a-4b09-8838-164530d29505"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.2 - Selftest DBConnection yes" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://sc
hemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -10970,23 +4351,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="f7619e7d-780d-4a07-89a6-8b46a9ab9723"/><con:assertion type="SOAP Fault
Assertion" id="ab084c62-8f4d-4380-bab6-2e2a399bfef5"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="82dfb107-19ec-491d-bf0e-65388ab6740c"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.3 - Selftest DBConnection true"
id="a3430915-d0c4-405a-9538-c53f8cb599e1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.3 - Selftest DBConnection true" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@requ

est-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11008,23 +4405,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="37d70fe9-6ad2-4921-8e2f-2997bd455bd2"/><con:assertion type="SOAP Fault
Assertion" id="e5d89c4a-04c8-427e-a9e6-c798756b4c0d"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="dc151818-d58c-48fb-b9a2-fcc2667e73c1"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.4 - Selftest DBConnection test"
id="901d3d5b-399c-49ba-8602-4b2ebcdb9a89"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.4 - Selftest DBConnection test" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@requ

est-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11046,23 +4459,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="70a03d23-c653-4341-a51e-48f585634534"/><con:assertion type="SOAP Fault
Assertion" id="04167252-5340-4ab0-9c7d-29b8f0fbb031"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="75d8ccfe-24cb-4ffb-95f5-04eb49a0bd13"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.5"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.5" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.5 - Selftest DBSchema true"
id="3a1cba9a-9edd-4b9b-a686-b7201e41bda1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.5 - Selftest DBSchema true" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-head

ers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11084,23 +4513,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="cd4d7983-b208-46c8-809b-a27b9aadbfbd"/><con:assertion type="SOAP Fault
Assertion" id="1910d792-0b05-4a9e-9ab8-d9aae9beff05"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="c1efcf39-545a-466e-998e-74900712e1aa"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.6"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.6" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.6 - Selftest DBSchema test"
id="f27ad163-7f2c-4d6e-9237-6115ed7669db"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.6 - Selftest DBSchema test" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-head

ers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11122,23 +4567,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="669decd1-ba65-42f4-bf41-07b8d52f7ae6"/><con:assertion type="SOAP Fault
Assertion" id="2d45d3d4-6660-4368-9af8-250b62546b54"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="8800d0a0-93b7-456c-8790-50abaa4afb2f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.7"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.7" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.7 - Selftest DBSchema
yes"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.7 - Selftest DBSchema yes" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:s

ettings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11149,6 +4610,7 @@
<nmwg:metadata id="meta">

<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/selftest/1.0</nmwg:eventType>
<nmwg:parameters>
+

<nmwg:parameter name="testDBSchema" value="yes"/>

@@ -11159,23 +4621,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="669decd1-ba65-42f4-bf41-07b8d52f7ae6"/><con:assertion type="SOAP Fault
Assertion" id="2d45d3d4-6660-4368-9af8-250b62546b54"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="8800d0a0-93b7-456c-8790-50abaa4afb2f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.8"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.8" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.1.8 - Selftest DBConnectionSchema
yes"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.1.8 - Selftest DBConnectionSchema yes" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/><

/con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11189,6 +4667,7 @@

<nmwg:parameter name="testDBConnection" value="yes"/>
<nmwg:parameter name="testDBSchema" value="yes"/>
+
</nmwg:parameters>
</nmwg:metadata>

@@ -11196,146 +4675,175 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="669decd1-ba65-42f4-bf41-07b8d52f7ae6"/><con:assertion type="SOAP Fault
Assertion" id="2d45d3d4-6660-4368-9af8-250b62546b54"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="8800d0a0-93b7-456c-8790-50abaa4afb2f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- if(it.getValueAsString() ==
"http://schemas.perfsonar.net/tools/admin/selftest/1.0";){
+ if(it.getValueAsString().contains("success.ls")){
noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
}
}

-assert noOfcorrectEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="43f43874-cc59-4e93-9fa9-5fe0fc90d8e1"><con:settings/><con:testStep
type="request" name="2.5.2.2.1"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapu

i.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes >= 1
+assert noOfbadEventTypes ==
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="properties" name="Empty (keep for I2
switch)"><con:settings/><con:config xsi:type="con:PropertiesStep"
saveFirst="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:properties/></con:config></con:testStep><con:loadTest
name="Echo LoadTest"
id="e5a889b1-7125-4aac-a5bd-c6e5e331be0a"><con:settings/><con:threadCount>32</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountCh

ange><con:historyLimit>-1</con:historyLimit><con:testLimit>30</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:statisticsLogFolder/><con:statisticsLogInterval>0</con:statisticsLogInterval><con:logStatisticsOnThreadChange>false</con:logStatisticsOnThreadChange><con:cancelOnReachedLimit>false</con:cancelOnReachedLimit><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:updateStatisticsPerTestStep>false</con:updateStatisticsPerTestStep></con:loadTest><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Malformed Requests" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="43f43874-cc59-4e93-9fa9-5fe0fc90d8e1"><con:settings/>
<con:testStep type="request" name="2.5.2.2.1 - No nmwg:data"
id="b568eef6-931b-4b3f-84ba-680b4d824467"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.1 - No nmwg:data" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">

<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
<nmwg:parameters>
-
<nmwg:parameter name="testDBConnection" value="yes"/>
<nmwg:parameter name="testDBSchema" value="yes"/>
-
</nmwg:parameters>
</nmwg:metadata>
-

</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="83bc93d9-6d52-4f16-8850-9130e6ad348e"/><con:assertion type="SOAP Fault
Assertion" id="a1e43c7c-380d-42b6-b106-d8d766c71016"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="dd06dcad-ea60-4a22-89ee-9e43afaff5f3"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Echo/LSEchoResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.2 - No nmwg:metadata"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.2 - No nmwg:metadata" outgoingW
ss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+ <soapenv:Header/>
+ <soapenv:Body>
+
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+
+ <nmwg:data id="data" metadataIdRef="meta"/>
+
+</nmwg:message>
+
+ </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="83bc93d9-6d52-4f16-8850-9130e6ad348e"/><con:assertion type="SOAP Fault
Assertion" id="a1e43c7c-380d-42b6-b106-d8d766c71016"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="dd06dcad-ea60-4a22-89ee-9e43afaff5f3"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.2"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.3 - Bad message type"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.3 - Bad message type" outgoingW
ss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="BadMsgType" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

- <nmwg:data id="data" metadataIdRef="meta"/>
+ <nmwg:metadata id="meta">
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
+ <nmwg:parameters>
+ <nmwg:parameter name="testDBConnection" value="yes"/>
+ <nmwg:parameter name="testDBSchema" value="yes"/>
+ </nmwg:parameters>
+ </nmwg:metadata>
+ <nmwg:data id="data" metadataIdRef="meta"/>
+
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="83bc93d9-6d52-4f16-8850-9130e6ad348e"/><con:assertion type="SOAP Fault
Assertion" id="a1e43c7c-380d-42b6-b106-d8d766c71016"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="dd06dcad-ea60-4a22-89ee-9e43afaff5f3"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Echo/LSEchoResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error(/message_type_not_support|\.common\.action_not_supported)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
Service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';

-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.3"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>2.5.2.2.5 - Selftest No
metadata/data
pair</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.4 - Bad eventType"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.4 - Bad eventType" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xs="http:/
/www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRquest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/badecho/2.0</nmwg:eventType>
<nmwg:parameters>
-
<nmwg:parameter name="testDBConnection" value="yes"/>
<nmwg:parameter name="testDBSchema" value="yes"/>
-
</nmwg:parameters>
</nmwg:metadata>
-
<nmwg:data id="data" metadataIdRef="meta"/>
+
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="83bc93d9-6d52-4f16-8850-9130e6ad348e"/><con:assertion type="SOAP Fault
Assertion" id="a1e43c7c-380d-42b6-b106-d8d766c71016"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="dd06dcad-ea60-4a22-89ee-9e43afaff5f3"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.event(_)?type_not_supported')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.2.5 - Selftest No metadata/data
pair"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.2.5 - Selftest No metadata/d
ata pair" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11344,7 +4852,7 @@
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.dddperfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/selftest/1.0</nmwg:eventType>
<nmwg:parameters>

<nmwg:parameter name="testDBConnection" value="yes"/>
@@ -11352,88 +4860,77 @@

</nmwg:parameters>
</nmwg:metadata>
-
- <nmwg:data id="data" metadataIdRef="meta"/>
+
+<!-- Bad metadataIdRef -->
+ <nmwg:data id="data" metadataIdRef="badref"/>
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="669decd1-ba65-42f4-bf41-07b8d52f7ae6"/><con:assertion type="SOAP Fault
Assertion" id="2d45d3d4-6660-4368-9af8-250b62546b54"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

+// Get NMWG message and RNG grammar for validation
def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
-def root = context.expand( '${projectDir}' )
-def xsdLocation = root+"/xsd/Echo/LSEchoResponse.xsd"
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-assert TestUtil.validate(""+s,new
File(xsdLocation),log);</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
-holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
-holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
-
-def noOfeventTypes = 0
-
-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
-
-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="695bccb0-a8e3-46c8-924a-a3cd89dc7ac4"><con:settings/><con:testStep
type="request" name="2.5.2.3.1" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.1" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.so

apui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+matches(/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType,

'error\.(common|ls)\.(data_trigger|no_metadata_data_pair)')</path><content>true</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Invalid data" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="695bccb0-a8e3-46c8-924a-a3cd89dc7ac4"><con:settings/><con:testStep
type="request" name
="2.5.2.3.0 - Echo Request"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.0 - Echo Request" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/ls/2.0</nmwg:eventType>
- <nmwg:parameters>
-
- <nmwg:parameter name="testDBSchema" value="yeees"/>
-
- </nmwg:parameters>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
</nmwg:metadata>

<nmwg:data id="data" metadataIdRef="meta"/>
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="5b84a67a-0f7f-42cf-baca-d600fbcaafc8"/><con:assertion type="SOAP Fault
Assertion" id="ec191b3d-a630-4a0c-ae6a-0f68281b08db"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Schema"
id="e437a626-29fd-4e51-b83e-3a75a317a894"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

-def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
-def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
-eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
-}
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion type="XPath
Match" name="XPath Match - Result Code"><con:configuration><path>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.2" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.2" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType</path><content>success.echo</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="No I2 tests" disabled="true"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>I2
Service</con:name><con:type>XPATH</con:type><con:expression>declare
namespace nmwgr='http://ggf.org/ns/nmwg/result/2.0/';
+declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilisation/2.0/';
+declare namespace
psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//nmwg:message[starts-with(@id,
"message")])</con:expression><con:targetStep>Empty (keep for I2
switch)</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.1 - Selftest bad DBSchema !"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.1 - Selftest bad DBSchema !" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop
e/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

-<nmwg:message type="EchoRequest"
- id="msg1"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-
+<nmwg:message type="EchoRequest" id="msg1"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+
<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/ls/2.0</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/selftest/1.0</nmwg:eventType>
<nmwg:parameters>
-
- <nmwg:parameter name="testDBConnection" value="yeeees"/>
-
-
+<!-- Bad parameter -->
+ <nmwg:parameter name="testDBSchema"
value="fdqs">fqfdsq</nmwg:parameter>
</nmwg:parameters>
</nmwg:metadata>

@@ -11441,22 +4938,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="669decd1-ba65-42f4-bf41-07b8d52f7ae6"/><con:assertion type="SOAP Fault
Assertion" id="2d45d3d4-6660-4368-9af8-250b62546b54"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="8800d0a0-93b7-456c-8790-50abaa4afb2f"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+ if(it.getValueAsString().contains("success.ls")){
+ noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
+ }
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.3" disabled="true"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.3" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmls
oap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes == 0
+assert noOfbadEventTypes >=
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.2 - Selftest bad DBConnection !"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.2 - Selftest bad DBConnection !" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fra

gment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11465,11 +4979,10 @@
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/ls/2.0</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/selftest/1.0</nmwg:eventType>
<nmwg:parameters>

- <nmwg:parameter name="testConnection" value="yes"/>
-
+ <nmwg:parameter name="testDBConnection" value="bad"/>

</nmwg:parameters>
</nmwg:metadata>
@@ -11478,22 +4991,39 @@
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="f7619e7d-780d-4a07-89a6-8b46a9ab9723"/><con:assertion type="SOAP Fault
Assertion" id="ab084c62-8f4d-4380-bab6-2e2a399bfef5"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="82dfb107-19ec-491d-bf0e-65388ab6740c"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+ if(it.getValueAsString().contains("success.ls")){
+ noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
+ }
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.4"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap11Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.4" outgoingWss="" incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8180/perfsonar-java-xml-ls/services/LookupService</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+assert noOfcorrectEventTypes == 0
+assert noOfbadEventTypes >
0</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="request" name="2.5.2.3.3 - Selftest bad parameter !"
disabled="true"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="2.5.2.3.3 - Selftest bad parameter !" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@inline-response-attachments">false</con:setting><con:setting

id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/>

</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<soapenv:Header/>
<soapenv:Body>

@@ -11502,32 +5032,274 @@
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>

<nmwg:metadata id="meta">
-
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/ls/2.0</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/selftest/1.0</nmwg:eventType>
<nmwg:parameters>

- <nmwg:parameter name="testDBConnection" value="yes"/>
- <nmwg:parameter name="testDBSchema" value="yes"/>
+ <nmwg:parameter name="badTest" value="yes"/>

</nmwg:parameters>
</nmwg:metadata>

- <nmwg:data id="data" metadataIdRef="mta"/>
+ <nmwg:data id="data" metadataIdRef="meta"/>
</nmwg:message>

</soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP
Response"/><con:assertion type="SOAP Fault Assertion"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result
Code"><con:configuration><scriptText>import org.perfsonar.soapUI.ls.TestUtil;
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"
id="f7619e7d-780d-4a07-89a6-8b46a9ab9723"/><con:assertion type="SOAP Fault
Assertion" id="ab084c62-8f4d-4380-bab6-2e2a399bfef5"/><con:assertion
type="GroovyScriptAssertion" name="Script Assertion -
Schema"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;

+def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
+def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
+holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
+holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";
+
+// Get NMWG message and RNG grammar for validation
+def s = holder.getDomNode("soapenv:Envelope/soapenv:Body/nmwg:message");
+def rncLocation = context.expand('${projectDir}')+"/rnc/nmbase.rnc"
+
+assert TestUtil.validateRNC(""+s,new File(rncLocation),log);
+</scriptText></con:configuration></con:assertion><con:assertion
type="GroovyScriptAssertion" name="Script Assertion - Result Codes"
id="82dfb107-19ec-491d-bf0e-65388ab6740c"><con:configuration><scriptText>import
org.perfsonar.soapUI.ls.TestUtil;
+
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
holder.namespaces["soapenv"]="http://schemas.xmlsoap.org/soap/envelope/";
holder.namespaces["nmwg"]="http://ggf.org/ns/nmwg/base/2.0/";

-def noOfeventTypes = 0
+def noOfcorrectEventTypes = 0
+def noOfbadEventTypes = 0

-def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:metadata/nmwg:eventType");
+def eventTypes =
holder.getDomNodes("/soapenv:Envelope/soapenv:Body/nmwg:message/nmwg:data/nmwg:metadata/nmwg:eventType");
eventTypes.each{
- assert it.getValueAsString() ==~ /.*error.*/
- noOfeventTypes++
+ if(it.getValueAsString().contains("success.ls")){
+ noOfcorrectEventTypes++
+ } else {
+ noOfbadEventTypes++
+ }
}

-assert noOfeventTypes ==
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE"
version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>lsProtocol</con:name><con:value>http://</con:value></con:property><con:property><con:name>lsHost</con:name><con:value>localhost:8180/perfsonar-java-xml-ls</con:value></con:property><con:property><con:name>lsExistUser</con:name><con:value>admin</con:value></con:property><con:property><con:name>lsExistPass</con:name><con:value/></con:property></con:properties><con:wssContainer/></con:soapui-project>
\ No newline at end of file
+assert noOfcorrectEventTypes == 0
+assert noOfbadEventTypes >
1</scriptText></con:configuration></con:assertion><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="properties" name="Empty (keep for I2 switch)"
disabled="true"><con:settings/><con:config xsi:type="con:PropertiesStep"
saveFirst="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:properties/></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite
name="Load Tests"
id="d4277068-0d20-49d1-aaa7-e3d31804df68"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Registrations" searchProperties="true" tim
eout="0" wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="5d8b6bc0-8038-4d7d-9229-a3129bd0ddbf"><con:description>Lots of
registrations.</con:description><con:settings/><con:testStep type="groovy"
name="Set Herited Properties"><con:settings/><con:config><script>// Set
Herited properties so that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)
+
+["Threaded Single Reg"].each {
+ props = tc.getTestStepByName(it)
+ counterValue = props.getPropertyValue("Counter")
+ props.setPropertyValue("ParentThread", thread)
+ if (counterValue)
+ count = counterValue as Integer
+ else
+ count = 0
+ counter = String.format('%04d', ++count)
+ props.setPropertyValue("Counter", counter)
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
+}
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="Threaded Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0007</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>http://s00-0001.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0007.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:loadTest
name="Lots of Registrations" id="6c

2383df-9e36-4bc7-89f3-b464f710407c"><con:settings/><con:threadCount>30</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>300</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB
+def tc = loadTestRunner.loadTest.testCase
+def initdbtc =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initdbtc.run(null, false)
+
+// Reset thread counters
+def props = tc.getTestStepByName("Threaded Single Reg")
+props.getPropertyList().each {
+ if (it.getName().startsWith("Counter"))
+ props.removeProperty(it.getName())
+}
+</con:setupScript></con:loadTest><con:setupScript/><con:properties/></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Regs and Deregs" searchProperties="true" timeout="0"
wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="7f654c1c-d38d-4b5e-99bb-d6f95b40fe5e"><con:description>Updates the
existing registrations.</con:description><con:settings/><con:testStep
type="groovy" name="Set Herited
Properties"><con:settings/><con:config><script>// Set Herited properties so
that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)
+def random = new Random()
+def countMax = tc.getPropertyValue("CountMax").toInteger()
+
+["Threaded Single Reg", "Threaded Double Reg", "Threaded Dereg"].each {
+ props = tc.getTestStepByName(it)
+ props.setPropertyValue("ParentThread", thread)
+ counter = String.format('%04d', random.nextInt(countMax))
+ props.setPropertyValue("Counter", counter)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
+}
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="Threaded Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0001</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>http://s00-0039.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0001.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="Threaded
Double Reg"><con:settings/><con:config xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0033</con:value></con:property><con:property><con:name>lsKeyA</con:name><con:value>http://s00-0007-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>http://s00-0007-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0033-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointB</con:name><con:

value>http://s00-0033-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="calltestcase" name="Threaded Dereg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>01c061ba-e53c-42f2-b08b-6f705a53e8af</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>http://s00-0009.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:loadTest
name="Lots of Random
Reg-Dereg"><con:settings/><con:threadCount>8</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>tr

ue</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>3600</con:testLimit><con:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB or keep the existing one
+def tc = loadTestRunner.loadTest.testCase
+def initdbtc =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initdbtc.run(null, false)
+
+// Reset thread counters
+def props = tc.getTestStepByName("Properties")
+props.getPropertyList().each {
+ if (it.getName().startsWith("Numbering-"))
+ props.removeProperty(it.getName())
+}
+</con:setupScript></con:loadTest><con:setupScript/><con:properties><con:property><con:name>CountMax</con:name><con:value>50</con:value></con:property></con:properties></con:testCase><con:testCase
failOnError="false" failTestCaseOnErrors="true" keepSession="false"
maxResults="0" name="Regs - Deregs - Queries" searchProperties="true"
timeout="0" wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo=""
id="3e6eac2b-01e3-410d-9e21-d3d3f5c44268"><con:description>Creates and
updates registrations and do lots of
queries.</con:description><con:settings/><con:testStep type="groovy"
name="Set Herited Properties"><con:settings/><con:config><script>// Set
Herited properties so that the Test Run have correct values
+// We store the lsKey in a property to keep it safe and be able to re-use it
+def tc = testRunner.testCase
+def apName = tc.testSuite.project.getPropertyValue("AccessPoint-name")
+def apPort = tc.testSuite.project.getPropertyValue("AccessPoint-port")
+def apPath = tc.testSuite.project.getPropertyValue("AccessPoint-path")
+def thread = String.format('%02d', context.ThreadIndex)
+def random = new Random()
+def countMax = tc.getPropertyValue("CountMax").toInteger()
+
+["Threaded Single Reg", "Threaded Double Reg", "Threaded Dereg"].each {
+ props = tc.getTestStepByName(it)
+ props.setPropertyValue("ParentThread", thread)
+ counter = String.format('%04d', random.nextInt(countMax))
+ props.setPropertyValue("Counter", counter)
+ if (it.contains("Double")) {
+
props.setPropertyValue("accessPointA","http://s"+thread+"-"+counter+"-a."+apName+":"+apPort+apPath)
+
props.setPropertyValue("accessPointB","http://s"+thread+"-"+counter+"-b."+apName+":"+apPort+apPath)
+ } else
+
props.setPropertyValue("accessPoint","http://s"+thread+"-"+counter+"."+apName+":"+apPort+apPath)
+}
+</script></con:config></con:testStep><con:testStep type="request" name="Test
Single Service exist"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Test Single Service exist" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType and
serviceName -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+ <soapenv:Header/>
+ <soapenv:Body>
+<nmwg:message
+ type="LSQueryRequest"
+ id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
+ <nmwg:metadata id="meta1">
+ <xquery:subject id="sub1">
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
+
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ for $metadata in /nmwg:store/nmwg:metadata
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ and $metadata//psservice:serviceName="${#Project#ServiceName}
- ${Threaded Single Reg#ParentThread} - ${Threaded Single Reg#Counter}"
+ return &lt;lookup-storage-from-query&gt;
+ {$metadata} {$data}
+ &lt;/lookup-storage-from-query&gt;
+ </xquery:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ </nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="meta1" />
+</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="Condition Single Service"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>Count
results</con:name><con:type>XPATH</con:type><con:expression>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//lookup-storage-from-query/nmwg:metadata/perfsonar:subject[@id="commonParameters"])</con:expression><con:targetStep>Increment
Single
ServicesCounter</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="groovy" name="Increment Single
ServicesCounter"><con:settings/><con:config><script>// The current lsKey is
already registered, so we increment the ServicesCounter
+
+def ts = testRunner.testCase.getTestStepByName("Threaded Single Reg")
+def prop = ts.getPropertyValue("ServicesCounter")
+if (prop) counter = prop.toInteger()
+else counter = 0
+ts.setPropertyValue("ServicesCounter", String.format('%d',++counter))
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="Threaded Single Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>3e654b7b-53a4-4f13-8628-6d7bfc9c4512</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0006</con:value></con:property><con:property><con:name>lsKey</con:name><con:value>http://s00-0028.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPoint</con:name><con:value>http://s00-0006.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="Test Double Se
rvice exist"><con:settings/><con:config xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Test Double Service exist" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serviceType and
serviceName -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+ <soapenv:Header/>
+ <soapenv:Body>
+<nmwg:message
+ type="LSQueryRequest"
+ id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
+ <nmwg:metadata id="meta1">
+ <xquery:subject id="sub1">
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
+
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ for $metadata in /nmwg:store/nmwg:metadata
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ and $metadata//psservice:serviceName="${#Project#ServiceName}
- ${Threaded Double Reg#ParentThread} - ${Threaded Double Reg#Counter} - a"
+ return &lt;lookup-storage-from-query&gt;
+ {$metadata} {$data}
+ &lt;/lookup-storage-from-query&gt;
+ </xquery:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ </nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="meta1" />
+</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="Condition Double Service"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>Count
results</con:name><con:type>XPATH</con:type><con:expression>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//lookup-storage-from-query/nmwg:metadata/perfsonar:subject[@id="commonParameters"])</con:expression><con:targetStep>Threaded
Double
Reg</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="groovy" name="Increment Double
ServicesCounter"><con:settings/><con:config><script>// The current lsKey is
already registered, so we increment the ServicesCounter
+
+def ts = testRunner.testCase.getTestStepByName("Threaded Double Reg")
+def prop = ts.getPropertyValue("ServicesCounter")
+if (prop) counter = prop.toInteger()
+else counter = 0
+ts.setPropertyValue("ServicesCounter", String.format('%d',++counter))
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="Threaded Double Reg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>724f833a-ee9d-46e3-a0ad-02b1d7e11205</con:targetTestCase><con:properties><con:property><con:name>ParentThread</con:name><con:value>00</con:value></con:property><con:property><con:name>Counter</con:name><con:value>0023</con:value></con:property><con:property><con:name>lsKeyA</con:name><con:value>http://s00-0020-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>lsKeyB</con:name><con:value>http://s00-0020-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>accessPointA</con:name><con:value>http://s00-0023-a.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchive

Service</con:value></con:property><con:property><con:name>accessPointB</con:name><con:value>http://s00-0023-b.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:testStep
type="request" name="Test Dereg Service exist"><con:settings/><con:config
xsi:type="con:RequestStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:interface>LookupServiceSoap12Binding</con:interface><con:operation>message</con:operation><con:request
name="Test Dereg Service exist" outgoingWss=""
incomingWss=""><con:settings><con:setting
id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://psls:9995/perfSONAR_PS/services/hLS</con:endpoint><con:request><![CDATA[<!--
XPath query: lookup for registered services of given serv
iceType and serviceName -->
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+ <soapenv:Header/>
+ <soapenv:Body>
+<nmwg:message
+ type="LSQueryRequest"
+ id="msg1"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+
xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";>
+ <nmwg:metadata id="meta1">
+ <xquery:subject id="sub1">
+ declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";;
+ declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";;
+ declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";;
+ declare namespace
+
xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";;
+ for $metadata in /nmwg:store/nmwg:metadata
+ let $metadata_id := $metadata/@id
+ let $data :=
/nmwg:store/nmwg:data[@metadataIdRef=$metadata_id]
+ where $metadata//psservice:serviceType="${#Project#ServiceType}"
+ and $metadata//psservice:serviceName="${#Project#ServiceName}
- ${Threaded Dereg#ParentThread} - ${Threaded Dereg#Counter}"
+ return &lt;lookup-storage-from-query&gt;
+ {$metadata} {$data}
+ &lt;/lookup-storage-from-query&gt;
+ </xquery:subject>
+
<nmwg:eventType>http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/query/xquery/2.0</nmwg:eventType>
+ </nmwg:metadata>
+ <nmwg:data id="data1" metadataIdRef="meta1" />
+</nmwg:message>
+ </soapenv:Body>
+</soapenv:Envelope>
+]]></con:request><con:assertion type="SOAP Response"/><con:assertion
type="SOAP Fault Assertion"/><con:credentials><con:username
xsi:nil="true"/><con:password xsi:nil="true"/><con:domain
xsi:nil="true"/></con:credentials><con:jmsConfig
JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig
mustUnderstand="NONE" version="200508"/><con:wsrmConfig
version="1.2"/></con:request></con:config></con:testStep><con:testStep
type="goto" name="Condition Dereg Service"><con:settings/><con:config
xsi:type="con:GotoStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:condition><con:name>Count
results</con:name><con:type>XPATH</con:type><con:expression>declare
namespace psservice='http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/';
+declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
+declare namespace
perfsonar='http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/';
+declare namespace nmwgt='http://ggf.org/ns/nmwg/topology/2.0/';
+
+exists(//lookup-storage-from-query/nmwg:metadata/perfsonar:subject[@id="commonParameters"])</con:expression><con:targetStep>Threaded

Dereg</con:targetStep></con:condition></con:config></con:testStep><con:testStep
type="groovy" name="Decrement Single
ServicesCounter"><con:settings/><con:config><script>// The current lsKey is
already registered, so we increment the ServicesCounter
+
+def ts = testRunner.testCase.getTestStepByName("Threaded Single Reg")
+def prop = ts.getPropertyValue("ServicesCounter")
+if (prop) counter = prop.toInteger()
+else counter = 0
+ts.setPropertyValue("ServicesCounter", String.format('%d',--counter))
+</script></con:config></con:testStep><con:testStep type="calltestcase"
name="Threaded Dereg"><con:settings/><con:config
xsi:type="con:RunTestCaseStep"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><con:targetTestCase>01c061ba-e53c-42f2-b08b-6f705a53e8af</con:targetTestCase><con:properties><con:property><con:name>lsKey</con:name><con:value>http://s00-0039.load.service.geant.net:8080/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property></con:properties><con:returnProperties/><con:runMode>PARALLELL</con:runMode></con:config></con:testStep><con:loadTest
name="Lots of Random
Reg-Dereg-Queries"><con:settings/><con:threadCount>4</con:threadCount><con:startDelay>0</con:startDelay><con:sampleInterval>250</con:sampleInterval><con:calculateTPSOnTimePassed>true</con:calculateTPSOnTimePassed><con:resetStatisticsOnThreadCountChange>true</con:resetStatisticsOnThreadCountChange><con:historyLimit>-1</con:historyLimit><con:testLimit>3600</con:testLimit><c

on:limitType>TIME</con:limitType><con:loadStrategy><con:type>Simple</con:type></con:loadStrategy><con:assertion
type="Step Status" name="Step
Status"/><con:maxAssertionErrors>100</con:maxAssertionErrors><con:cancelExcessiveThreads>true</con:cancelExcessiveThreads><con:strategyInterval>500</con:strategyInterval><con:setupScript>//
Init an empty DB or keep the existing one
+def tc = loadTestRunner.loadTest.testCase
+def initdbtc =
tc.getTestSuite().getProject().getTestSuiteByName("Initialisation").getTestCaseByName("Empty
DB")
+initdbtc.run(null, false)
+
+// Reset services counters
+["Threaded Single Reg", "Threaded Double Reg", "Threaded Dereg"].each {
+ ts = tc.getTestStepByName(it)
+ ts.setPropertyValue("ServicesCounter", "0")
+}
+</con:setupScript></con:loadTest><con:setupScript/><con:properties><con:property><con:name>CountMax</con:name><con:value>50</con:value></con:property></con:properties></con:testCase><con:properties><con:property><con:name>ServiceName</con:name><con:value>Load
Test
Service</con:value></con:property><con:property><con:name>AccessPoint-name</con:name><con:value>load.service.geant.net</con:value></con:property><con:property><con:name>AccessPoint-port</con:name><con:value>8080</con:value></con:property><con:property><con:name>AccessPoint-path</con:name><con:value>/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>ServiceType</con:name><con:value>RRD

MA</con:value></con:property><con:property><con:name>ServiceDescription</con:name><con:value>soapUI
XML LS Load Testing Service - RRD
MA</con:value></con:property><con:property><con:name>Interface-hostName</con:name><con:value>loadtest.router.geant.net</con:value></con:property>

<con:property><con:name>Interface-Description</con:name><con:value>hstn:oc192(p2p)::show:intracloud</con:value></con:property><con:property><con:name>Interface-AddressIPv4</con:name><con:value>62.40.96.1</con:value></con:property></con:properties></con:testSuite><con:properties><con:property><con:name>lsProtocol</con:name><con:value>http://</con:value></con:property><con:property><con:name>lsHost</con:name><con:value>ls:8180/perfsonar-java-xml-ls</con:value></con:property><con:property><con:name>lsExistUser</con:name><con:value>admin</con:value></con:property><con:property><con:name>lsExistPass</con:name><con:value/></con:property><con:property><con:name>ServiceName</con:name><con:value>Testing

Service</con:value></con:property><con:property><con:name>AccessPoint-name</con:name><con:value>load.service.geant.net</con:value></con:property><con:property><con:name>AccessPoint-port</con:name><con:value>8080</con:value></con:property><con:property><con:name>AccessPoint-path</con:n

ame><con:value>/perfsonar-java-rrd-ma/services/MeasurementArchiveService</con:value></con:property><con:property><con:name>ServiceType</con:name><con:value>RRD

MA</con:value></con:property><con:property><con:name>ServiceDescription</con:name><con:value>soapUI
XML LS Registration Testing Service - RRD
MA</con:value></con:property><con:property><con:name>Interface-hostName</con:name><con:value>test.router.geant.net</con:value></con:property><con:property><con:name>Interface-Description</con:name><con:value>hstn:oc192(p2p)::show:intracloud</con:value></con:property><con:property><con:name>Interface-AddressIPv4</con:name><con:value>62.40</con:value></con:property><con:property><con:name>Interface-AddressIPv4-B</con:name><con:value>62.42</con:value></con:property></con:properties><con:wssContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file

Added: trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/filter.rnc
===================================================================
--- trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/filter.rnc
(rev 0)
+++ trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/filter.rnc 2012-01-11
17:27:49 UTC (rev 5886)
@@ -0,0 +1,162 @@
+# ##############################################################
+#
+# File: filter.rnc - Extensions to support different
+# namespaced parameters.
+# Version: $Id$
+# Purpose: This extension to the basic parameters could be
+# used to help make any implementation code decide
+# on unmarshalling how to handle special cases.
+# Our particular purpose with these constructs is
+# to apply database or statistical operations to
+# datasets.
+# Reference: http://books.xmlschemata.org/relaxng/page2.html
+#
+# ##############################################################
+
+
+# ##############################################################
+# Namespace definitions
+# ##############################################################
+namespace select = "http://ggf.org/ns/nmwg/ops/select/2.0/";
+namespace average = "http://ggf.org/ns/nmwg/ops/average/2.0/";
+namespace mean = "http://ggf.org/ns/nmwg/ops/mean/2.0/";
+namespace median = "http://ggf.org/ns/nmwg/ops/median/2.0/";
+namespace max = "http://ggf.org/ns/nmwg/ops/max/2.0/";
+namespace min = "http://ggf.org/ns/nmwg/ops/min/2.0/";
+namespace cdf = "http://ggf.org/ns/nmwg/ops/cdf/2.0/";
+namespace histogram = "http://ggf.org/ns/nmwg/ops/histogram/2.0/";
+
+
+# ##############################################################
+# TBD
+#
+# Example (using select):
+#
+#
+# ##############################################################
+
+FilterMetadataBlock =
+ (
+ SelectSubject? &
+ (
+ SelectParameters |
+ Parameters
+ )?
+ ) |
+ (
+ AverageSubject? &
+ (
+ AverageParameters |
+ Parameters
+ )?
+ ) |
+ (
+ MeanSubject? &
+ (
+ MeanParameters |
+ Parameters
+ )?
+ ) |
+ (
+ MedianSubject? &
+ (
+ MedianParameters |
+ Parameters
+ )?
+ ) |
+ (
+ MaxSubject? &
+ (
+ MaxParameters |
+ Parameters
+ )?
+ ) |
+ (
+ MinSubject? &
+ (
+ MinParameters |
+ Parameters
+ )?
+ ) |
+ (
+ CDFSubject? &
+ (
+ CDFParameters |
+ Parameters
+ )?
+ ) |
+ (
+ HistogramSubject? &
+ (
+ HistogramParameters |
+ Parameters
+ )?
+ )
+
+FilterParameters =
+ (
+ SelectParameters |
+ AverageParameters |
+ MeanParameters |
+ MedianParameters |
+ MaxParameters |
+ MinParameters |
+ CDFParameters |
+ HistogramParameters
+ )
+
+
+SelectSubject =
+ element select:subject { SubjectContent }
+
+SelectParameters =
+ element select:parameters { ParametersContent }
+
+
+AverageSubject =
+ element average:subject { SubjectContent }
+
+AverageParameters =
+ element average:parameters { ParametersContent }
+
+
+MeanSubject =
+ element mean:subject { SubjectContent }
+
+MeanParameters =
+ element mean:parameters { ParametersContent }
+
+
+MedianSubject =
+ element median:subject { SubjectContent }
+
+MedianParameters =
+ element median:parameters { ParametersContent }
+
+
+MaxSubject =
+ element max:subject { SubjectContent }
+
+MaxParameters =
+ element max:parameters { ParametersContent }
+
+
+MinSubject =
+ element min:subject { SubjectContent }
+
+MinParameters =
+ element min:parameters { ParametersContent }
+
+
+CDFSubject =
+ element cdf:subject { SubjectContent }
+
+CDFParameters =
+ element cdf:parameters { ParametersContent }
+
+
+HistogramSubject =
+ element histogram:subject { SubjectContent }
+
+HistogramParameters =
+ element histogram:parameters { ParametersContent }


Added: trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmbase.rnc
===================================================================
--- trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmbase.rnc
(rev 0)
+++ trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmbase.rnc 2012-01-11
17:27:49 UTC (rev 5886)
@@ -0,0 +1,441 @@
+# ##############################################################
+#
+# File: nmbase.rnc - Main schema definition
+# Version: $Id$
+# Purpose: This is the main schema file, it defines the
+# general structure of an NMWG message or store
+#
+# ##############################################################
+
+
+# ##############################################################
+# Namespace definitions
+# ##############################################################
+namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/";
+
+
+# ##############################################################
+# Include additional functionality from other files
+# ##############################################################
+include "nmtime.rnc"
+include "filter.rnc"
+
+# ##############################################################
+# Every NMWG document should begin with either a 'store' or
+# 'message' element
+# Patterns are defined for the content of each element.
+#
+# Example (using message):
+#
+# <nmwg:message id="OPTIONAL_ID"
+# messageIdRef="OPTIONAL_REFERENCE_ID"
+# type="REQUIRED_TYPE"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- OPTIONAL PARAMETERS -->
+#
+# <!-- OPTIONAL (MULTIPLE) METADATA -->
+#
+# <!-- OPTIONAL (MULTIPLE) DATA -->
+#
+# </nmwg:message>
+#
+# ##############################################################
+
+start =
+ (
+ element nmwg:message {
+ MessageContent
+ } |
+ element nmwg:store {
+ StoreContent
+ }
+ )
+
+MessageContent =
+ Identifier? &
+ MessageIdentifierRef? &
+ Type &
+ Parameters? &
+ (
+ Metadata |
+ Data
+ )+
+
+
+StoreContent =
+ Identifier? &
+ MessageIdentifierRef? &
+ Type &
+ Parameters? &
+ (
+ Metadata |
+ Data
+ )+
+
+
+# ##############################################################
+# Metadata is the information that describes data. This
+# information doesn't change over time
+#
+#
+# Example:
+#
+# <nmwg:metadata id="REQUIRED_ID"
+# metadataIdRef="OPTIONAL_REFERENCE_ID"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- TBD OPTIONAL SUBJECT -->
+#
+# <!-- TBD OPTIONAL PARAMETERS -->
+#
+# <!-- TBD OPTIONAL EVENTTYPE -->
+#
+# <!-- TBD OPTIONAL KEY -->
+#
+# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
+#
+# </nmwg:metadata>
+#
+# ##############################################################
+
+Metadata =
+ element nmwg:metadata {
+ (
+ Identifier &
+ MetadataIdentifierRef? &
+ MetadataContent
+ ),
+ anyElement*
+ }
+
+MetadataBlock =
+ Subject? &
+ Parameters?
+
+MetadataContent =
+ (
+ MetadataBlock |
+ FilterMetadataBlock
+ ) &
+ EventType? &
+ Key?
+
+
+# ##############################################################
+# Subject identifies an endPoint (or points), perhaps the name of
+# a service or some other form of physical location. For the
+# purpose of the general case, we make no assumptions on potential
+# elements and allow all elements, in any namespace. Verification
+# can be handled in subsequent schema files.
+#
+# Example:
+#
+# <nmwg:subject id="REQUIRED_ID"
+# metadataIdRef="OPTIONAL_REFERENCE_ID"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- ANY ELEMENT IN ANY NAMESPACE -->
+#
+# </nmwg:subject>
+#
+# ##############################################################
+
+Subject =
+ element nmwg:subject {
+ SubjectContent
+ }
+
+SubjectContent =
+ (
+ Identifier &
+ MetadataIdentifierRef?
+ ),
+ anyElement*
+
+
+# ##############################################################
+# Parameters and Parameter elements can be used in a number of
+# ways in: 1) the message to signify items such as time stamp
+# or authorization or 2) metadata or data to specify filters or
+# special cases for the information. A 'parameters' block
+# has an id and encloses one to many 'parameter' elements.
+# These elements have a required 'name', and may contain
+# an attribute, element, or text value (only one please;
+# software using this should consider complex elements, then
+# text, and finally the value attribute; exceptions should
+# be thrown on duplicates).
+#
+# Example:
+#
+# <nmwg:parameters id="REQUIRED_ID"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <nmwg:parameter name="REQUIRED_NAME" value="OPTIONAL_VALUE"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- ANY TEXT, OR ANY ELEMENT ANY NAMESPACE (IF YOU DID NOT
+# USE THE VALUE ATTRIBUTE) -->
+#
+# </nmwg:parameter>
+#
+# <!-- MORE PARAMETERS -->
+#
+# </nmwg:parameters>
+#
+# The namespaces can of course be different.
+#
+# ##############################################################
+
+Parameters =
+ element nmwg:parameters {
+ ParametersContent
+ }
+
+ParametersContent =
+ Identifier &
+ Parameter+
+
+Parameter =
+ element nmwg:parameter {
+ attribute name { xsd:string } &
+ (
+ attribute value { xsd:string } |
+ (
+ anyElement |
+ text
+ )
+ )
+ }
+
+
+# ##############################################################
+# Event type is a simple text element used to describe the
+# characteristic or event of the data.
+#
+# Example:
+#
+# <nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- TEXT -->
+#
+# </nmwg:eventType>
+#
+# ##############################################################
+
+EventType =
+ element nmwg:eventType { xsd:string }
+
+
+# ##############################################################
+# The key is used to return a 'pointer' or otherwise special piece
+# of identifying information in response to a request. For now,
+# this information is enclosed only within a parameters block.
+# The optional ID can be used to track past searches.
+#
+# Example:
+#
+# <nmwg:key id="OPTIONAL_ID"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- OPTIONAL PARAMETERS -->
+#
+# </nmwg:key>
+#
+# ##############################################################
+
+Key =
+ element nmwg:key {
+ Identifier? &
+ (
+ Parameters |
+ FilterParameters
+ )
+ }
+
+
+# ##############################################################
+# The data block is complex and has the potential to contain
+# many things. The data block can be used to return a metadata
+# block from a request, commonTime or datum elements, keys,
+# or something that we have perhaps not defined as of yet.
+#
+# Example:
+#
+# <nmwg:data id="REQUIRED_ID"
+# metadataIdRef="OPTIONAL_REFERENCE_ID"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- OPTIONAL (MULTIPLE) METADATA -->
+#
+# <!-- OR -->
+#
+# <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
+# OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
+#
+# <!-- OR -->
+#
+# <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
+#
+# <!-- OR -->
+#
+# <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
+#
+# <!-- OR -->
+#
+# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
+#
+# </nmwg:data>
+#
+# ##############################################################
+
+Data =
+ element nmwg:data {
+ (
+ Identifier &
+ MetadataIdentifierRef? &
+ (
+ Metadata* |
+ (
+ commonTime+ &
+ Datum*
+ ) |
+ Datum* |
+ Key*
+ )
+ ),
+ anyElement*
+ }
+
+# ##############################################################
+# CommonTime is used as a shortcut that is able to 'factor out'
+# a frequently occurring time range that a group of datum (or
+# other) elements might share, thus reducing the verbosity of the
+# XML representation. CommonTime is similar to the other NMWG time
+# stamps (from nmtime.rnc) in its potential time representations.
+#
+# It is unfortunate that it needs to be in this file and not
+# nmtime.rnc, but as it occurs outside the datum, it is here.
+#
+# Example:
+#
+# <nmwg:commonTime type="REQUIRED_TYPE" value="OPTIONAL_VALUE"
+# duration="OPTIONAL_DURATION"
+# inclusive="OPTIONAL_INCLUSIVE_FLAG"
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR
+# DURATION) -->
+#
+# <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
+#
+# <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE
+# ATTRIBUTE) -->
+#
+# <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
+#
+# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
+# </nmwg:commonTime>
+#
+# ##############################################################
+
+commonTime =
+ element nmwg:commonTime {
+ (
+ Type &
+ (
+ TimeStamp |
+ (
+ StartTime &
+ (
+ EndTime |
+ Duration
+ )
+ )
+ ) &
+ Datum*
+ ),
+ anyElement*
+ }
+
+
+# ##############################################################
+# The datum is meant to be generic in this case because specific
+# namespace declarations should be used to better define what
+# format that datum should have.
+#
+# Example:
+#
+# <nmwg:datum ANY_ATTRIBUTE
+# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
+#
+# <!-- ANY ELEMENT IN ANY NAMESPACE OR ANY TEXT -->
+#
+# </nmwg:datum>
+#
+# ##############################################################
+
+Datum =
+ element nmwg:datum {
+ anyThing
+ }
+
+
+# ##############################################################
+# Common elements are defined as named patterns as they are re-
+# used several times.
+# ##############################################################
+
+Identifier =
+ attribute id { xsd:string }
+
+MetadataIdentifierRef =
+ attribute metadataIdRef { xsd:string }
+
+MessageIdentifierRef =
+ attribute messageIdRef { xsd:string }
+
+Type =
+ attribute type { xsd:string }
+
+
+# ##############################################################
+# This sequence allows any element, attribute, or text (regardless
+# of name or namespace) into the document when invoked.
+# ##############################################################
+
+anyElement =
+ element * {
+ anyThing
+ }
+
+anyAttribute =
+ attribute * { text }
+
+anyThing =
+ (
+ anyElement |
+ anyAttribute |
+ text
+ )*
+
+
+# ##############################################################
+# This sequence allows any element, attribute, or text (only in the
+# NMWG namespace) into the document when invoked.
+# ##############################################################
+
+anyNMWGElement =
+ element nmwg:* {
+ anyNMWGThing
+ }
+
+anyNMWGAttribute =
+ attribute * { text }
+
+anyNMWGThing =
+ (
+ anyNMWGElement |
+ anyNMWGAttribute |
+ text
+ )*

Added: trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmtime.rnc
===================================================================
--- trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmtime.rnc
(rev 0)
+++ trunk/perfsonar-java-xml-ls/src/test/soapUI/rnc/nmtime.rnc 2012-01-11
17:27:49 UTC (rev 5886)
@@ -0,0 +1,154 @@
+# ##############################################################
+#
+# File: nmtime.rnc - NMWG Time definitions
+# Version: $Id$
+# Purpose: This describes a set of time formats for
+# representing measurements.
+#
+# ##############################################################
+
+
+# ##############################################################
+# Namespace definitions
+# ##############################################################
+namespace nmtm = "http://ggf.org/ns/nmwg/time/20070914/";
+
+
+# ##############################################################
+# Regular time is attached to a specific datum instance; it is
+# essentially the same as before, but cannot have anything
+# 'inside' of it. The type can be simple, like UNIX, or it
+# could be something like timeRange or timeInterval. If this is
+# the case, we would then see the two extra time designators for
+# the start and end (or duration)
+#
+# Example:
+#
+# <nmtm:time type="REQUIRED_TYPE" value="OPTIONAL_VALUE"
+# duration="OPTIONAL_DURATION"
+# inclusive="OPTIONAL_INCLUSIVE_FLAG"
+# xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/";>
+#
+# <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR
+# DURATION) -->
+#
+# <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
+#
+# <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE
+# ATTRIBUTE) -->
+#
+# </nmtm:time>
+#
+#
+# Time types are enumerated as follows:
+#
+# * unix: integral seconds since Jan 1, 1970 (UTC)
+#
+# * iso9601/rfc3339:
+#
+# full date/time representation. Examples from RFC-339:
+#
+# Here are some examples of Internet date/time format.
+#
+# 1985-04-12T23:20:50.52Z
+#
+# This represents 20 minutes and 50.52 seconds after the 23rd hour of
+# April 12th, 1985 in UTC.
+#
+# 1996-12-19T16:39:57-08:00
+#
+# This represents 39 minutes and 57 seconds after the 16th hour of
+# December 19th, 1996 with an offset of -08:00 from UTC (Pacific
+# Standard Time). Note that this is equivalent to
1996-12-20T00:39:57Z
+# in UTC.
+#
+# 1990-12-31T23:59:60Z
+#
+# This represents the leap second inserted at the end of 1990.
+#
+# 1990-12-31T15:59:60-08:00
+#
+# This represents the same leap second in Pacific Standard Time, 8
+# hours behind UTC.
+#
+# 1937-01-01T12:00:27.87+00:20
+#
+# This represents the same instant of time as noon, January 1, 1937,
+# Netherlands time. Standard time in the Netherlands was exactly 19
+# minutes and 32.13 seconds ahead of UTC by law from 1909-05-01
through
+# 1937-06-30. This time zone cannot be represented exactly using the
+# HH:MM format, and this timestamp uses the closest representable UTC
+# offset.
+#
+# ##############################################################
+
+Time =
+ element nmtm:time {
+ attribute type { xsd:string } &
+ (
+ TimeStamp |
+ (
+ StartTime &
+ (
+ EndTime |
+ Duration
+ )
+ )
+ )
+ }
+
+# precisionUnits must be one of the recognized SI units
+# The most complete list I could currently find is at:
+# http://en.wikipedia.org/wiki/Orders_of_magnitude_%28time%29
+#
+# synchronized SHOULD be set true if the party generating the timestamp
+# has a clock that is synchronized to UTC using an external source
+# (e.g., the attribute should be set true if GPS hardware is used and it
+# indicates that it has acquired current position and time or if NTP is
+# used and it indicates that it has synchronized to an external source,
+# which includes stratum 0 source, etc.). If there is no notion of
+# external synchronization for the time source, the attribute SHOULD be set
+# to false. If the attribute is not set at all, the synchronization
+# status of the timestamp can not be determined except through external
+# knowledge.
+Precision =
+ (
+ (
+ attribute precision { xsd:unsignedInt } &
+ attribute precisionUnits { xsd:string } &
+ attribute synchronized { xsd:boolean }?
+ ) |
+ element nmtm:precision {
+ attribute precisionUnits { xsd:string } &
+ attribute synchronized { xsd:boolean }? &
+ xsd:unsignedInt
+ }
+ )
+
+
+TimeStamp =
+ (
+ (
+ attribute value { xsd:string } |
+ element nmtm:value { xsd:string }
+ ) &
+ Precision?
+ )
+
+Duration =
+ attribute duration { xsd:string }
+
+TimeContent =
+ attribute type { text } &
+ attribute inclusive { text }? &
+ TimeStamp
+
+StartTime =
+ element nmtm:start {
+ TimeContent
+ }
+
+EndTime =
+ element nmtm:end {
+ TimeContent
+ }

Modified:
trunk/perfsonar-java-xml-ls/src/test/soapUI/src/org/perfsonar/soapUI/ls/TestUtil.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/soapUI/src/org/perfsonar/soapUI/ls/TestUtil.java
2011-10-20 09:48:23 UTC (rev 5885)
+++
trunk/perfsonar-java-xml-ls/src/test/soapUI/src/org/perfsonar/soapUI/ls/TestUtil.java
2012-01-11 17:27:49 UTC (rev 5886)
@@ -20,6 +20,8 @@
import org.apache.log4j.Logger;
import org.xml.sax.SAXException;

+import com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory;
+
public class TestUtil {

public static InputStream openStream(String urlString, String user,
String pass)
@@ -29,14 +31,9 @@
return url.openStream();
}

- static{
- System.setProperty(SchemaFactory.class.getName() + ":" +
XMLConstants.RELAXNG_NS_URI,
-
"com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory");
- }
-
public static boolean validateRNC(String xmlDocument, File
schemaFile, Logger log)
throws IOException, ParserConfigurationException,
SAXException {
- SchemaFactory factory =
SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);
+ SchemaFactory factory = new CompactSyntaxSchemaFactory();

File schemaLocation = schemaFile;
Schema schema = factory.newSchema(schemaLocation);
@@ -66,13 +63,14 @@

public static void main(String[] args) throws IOException,
ParserConfigurationException,
SAXException {
- rngValidationTest();
+ rncValidationTest();
+ xmlValidationTest();
}

private static void xmlValidationTest() throws FileNotFoundException,
IOException,
ParserConfigurationException, SAXException {
- String f =
"/home/kjedrzejewski/Pulpit/LS_API/LS-soapUI-base2/xsd/Query/LSQueryResponse.xsd";
- File file = new File("/home/kjedrzejewski/Pulpit/a.xml");
+ String f = "src/test/soapUI/xsd/Echo/LSEchoRequest.xsd";
+ File file = new File("samples/requests/EchoRequest.xml");
FileReader reader = new FileReader(file);
StringBuilder sb = new StringBuilder();
char c;
@@ -82,14 +80,14 @@
sb.append(c);
}
String s = sb.toString();
- System.out.println(s);
- System.out.println(validateXSD(s, new File(f),
Logger.getLogger(TestUtil.class)));
+// System.out.println(s);
+ System.out.println("XSD validation: "+validateXSD(s, new
File(f), Logger.getLogger(TestUtil.class)));
}

- private static void rngValidationTest() throws FileNotFoundException,
IOException,
+ private static void rncValidationTest() throws FileNotFoundException,
IOException,
ParserConfigurationException, SAXException {
- String f = "/home/kjedrzejewski/Pulpit/EchoRequest.rnc";
- File file = new File("/home/kjedrzejewski/Pulpit/Echo.xml");
+ String f = "src/test/soapUI/rnc/nmbase.rnc";
+ File file = new File("samples/requests/EchoRequest.xml");
FileReader reader = new FileReader(file);
StringBuilder sb = new StringBuilder();
char c;
@@ -99,7 +97,7 @@
sb.append(c);
}
String s = sb.toString();
- System.out.println(s);
- System.out.println(validateRNC(s, new File(f),
Logger.getLogger(TestUtil.class)));
+// System.out.println(s);
+ System.out.println("RNC validation: "+validateRNC(s, new
File(f), Logger.getLogger(TestUtil.class)));
}
}



  • [pS-dev] [GEANT/SA2/ps-java-services] r5886 - in trunk/perfsonar-java-xml-ls: . doc/test samples/requests samples/responses src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/storage/exist/dao src/test/java/org/perfsonar/tests/utilities src/test/soapUI src/test/soapUI/lib src/test/soapUI/rnc src/test/soapUI/src/org/perfsonar/soapUI/ls, svn-noreply, 01/11/2012

Archive powered by MHonArc 2.6.16.

Top of Page