Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frascati
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frascati
frascati
Commits
ff910e52
Commit
ff910e52
authored
Mar 28, 2013
by
Gwenael Cattez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add JSONRPC, REST, SCA and UPNP Binding processors
parent
7e2027c7
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
225 additions
and
124 deletions
+225
-124
frascati/modules/frascati-introspection/frascati-introspection-api/src/main/java/org/ow2/frascati/remote/introspection/RemoteScaDomain.java
...rg/ow2/frascati/remote/introspection/RemoteScaDomain.java
+1
-0
frascati/modules/frascati-introspection/frascati-introspection-impl/pom.xml
...rascati-introspection/frascati-introspection-impl/pom.xml
+15
-0
frascati/modules/frascati-introspection/frascati-introspection-impl/src/main/java/org/ow2/frascati/remote/introspection/DeploymentImpl.java
...org/ow2/frascati/remote/introspection/DeploymentImpl.java
+1
-2
frascati/modules/frascati-introspection/frascati-introspection-impl/src/main/java/org/ow2/frascati/remote/introspection/RemoteScaDomainImpl.java
...w2/frascati/remote/introspection/RemoteScaDomainImpl.java
+1
-1
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/IntrospectionTestSuite.java
.../java/org/ow2/frascati/remote/IntrospectionTestSuite.java
+13
-12
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/DeploymentTest.java
...org/ow2/frascati/remote/introspection/DeploymentTest.java
+4
-4
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/BindingManagerTest.java
...cati/remote/introspection/binding/BindingManagerTest.java
+21
-15
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/BindingProcessorTest.java
...introspection/binding/processor/BindingProcessorTest.java
+56
-75
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/JSONRPCBindingProcessorTest.java
...ection/binding/processor/JSONRPCBindingProcessorTest.java
+21
-2
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/RestBindingProcessorTest.java
...ospection/binding/processor/RestBindingProcessorTest.java
+60
-7
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/SCABindingProcessorTest.java
...rospection/binding/processor/SCABindingProcessorTest.java
+20
-4
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/UPnPBindingProcessorTest.java
...ospection/binding/processor/UPnPBindingProcessorTest.java
+1
-1
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/WSBindingProcessorTest.java
...trospection/binding/processor/WSBindingProcessorTest.java
+11
-1
No files found.
frascati/modules/frascati-introspection/frascati-introspection-api/src/main/java/org/ow2/frascati/remote/introspection/RemoteScaDomain.java
View file @
ff910e52
...
...
@@ -106,6 +106,7 @@ public interface RemoteScaDomain
@POST
@Path
(
"/port/{id:.*}"
)
@Consumes
(
"application/x-www-form-urlencoded"
)
@Produces
({
"text/plain"
})
public
String
invokeMethod
(
@PathParam
(
"id"
)
String
fullInterfaceId
,
MultivaluedMap
<
String
,
String
>
params
);
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/pom.xml
View file @
ff910e52
...
...
@@ -101,6 +101,7 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
...
...
@@ -208,6 +209,13 @@
<type>
jar
</type>
<destFileName>
helloworld-ws-client.jar
</destFileName>
</artifactItem>
<artifactItem>
<groupId>
org.ow2.frascati.examples
</groupId>
<artifactId>
helloworld-annotations
</artifactId>
<version>
1.5-SNAPSHOT
</version>
<type>
jar
</type>
<destFileName>
helloworld-annotated.jar
</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
...
...
@@ -314,6 +322,13 @@
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.ow2.frascati.mojo
</groupId>
<artifactId>
frascati-contribution-plugin
</artifactId>
<version>
${project.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
frascati/modules/frascati-introspection/frascati-introspection-impl/src/main/java/org/ow2/frascati/remote/introspection/DeploymentImpl.java
View file @
ff910e52
...
...
@@ -114,11 +114,10 @@ public class DeploymentImpl implements Deployment
public
String
deployComposite
(
String
compositeName
,
String
encodedComposite
)
{
File
destFile
=
null
;
JarFile
jarFile
=
null
;
try
{
destFile
=
FileUtil
.
decodeFile
(
encodedComposite
,
"jar"
);
jarFile
=
new
JarFile
(
destFile
);
new
JarFile
(
destFile
);
}
catch
(
Base64Exception
b64e
)
{
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/src/main/java/org/ow2/frascati/remote/introspection/RemoteScaDomainImpl.java
View file @
ff910e52
...
...
@@ -329,7 +329,7 @@ public class RemoteScaDomainImpl implements RemoteScaDomain
throw
new
MyWebApplicationException
(
bpte
);
}
String
invocationResponse
;
String
invocationResponse
=
null
;
try
{
Object
invokationReturn
=
method
.
invoke
(
itf
,
arguments
);
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/IntrospectionTestSuite.java
View file @
ff910e52
...
...
@@ -30,7 +30,6 @@ package org.ow2.frascati.remote;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
import
java.io.File
;
...
...
@@ -73,7 +72,6 @@ import org.ow2.frascati.util.FrascatiException;
*/
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
DeploymentTest
.
class
,
FractalUtilTest
.
class
,
SCAModelUtilTest
.
class
,
BindingManagerTest
.
class
,
ResourceUtilTest
.
class
})
//@SuiteClasses({ResourceUtilTest.class})
public
class
IntrospectionTestSuite
{
/** REST binding URI */
...
...
@@ -162,39 +160,42 @@ public class IntrospectionTestSuite
return
bindingManager
;
}
public
static
String
getResourcePath
(
String
resourceName
)
public
static
File
getResource
(
String
resourceName
)
{
return
RESOURCES_FOLDER
+
resourceName
;
String
resourcePath
=
RESOURCES_FOLDER
+
resourceName
;
File
resource
=
new
File
(
resourcePath
);
if
(!
resource
.
exists
())
{
resourcePath
=
"src/test/resources/"
+
resourceName
;
resource
=
new
File
(
resourcePath
);
}
return
resource
;
}
/** Helper methods */
public
static
StringList
deployContribution
(
String
contributionName
)
{
//TODO remove comment when contribution file will be imported from maven repo
// String contributionPath=getResourcePath(contributionName+".zip");
String
contributionPath
=
"src/test/resources/"
+
contributionName
+
".zip"
;
File
contribution
=
getResource
(
contributionName
+
".zip"
);
String
contrib
=
null
;
try
{
contrib
=
FileUtil
.
getStringFromFile
(
new
File
(
contributionPath
)
);
contrib
=
FileUtil
.
getStringFromFile
(
contribution
);
}
catch
(
IOException
e
)
{
fail
(
"Cannot read the contribution "
+
contributionName
);
}
StringList
deployedComponents
=
IntrospectionTestSuite
.
deployment
.
deployContribution
(
contrib
);
assertTrue
(
deployedComponents
.
getStringList
().
size
()>
0
);
return
deployedComponents
;
}
public
static
String
deployComposite
(
String
compositeFinaleName
,
String
compositeName
)
{
String
compositePath
=
getResourcePath
(
compositeFinaleName
+
".jar"
);
File
composite
=
getResource
(
compositeFinaleName
+
".jar"
);
String
compositeFile
=
null
;
try
{
compositeFile
=
FileUtil
.
getStringFromFile
(
new
File
(
compositePath
)
);
compositeFile
=
FileUtil
.
getStringFromFile
(
composite
);
}
catch
(
IOException
e
)
{
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/DeploymentTest.java
View file @
ff910e52
...
...
@@ -63,20 +63,20 @@ public class DeploymentTest
deployment
=
IntrospectionTestSuite
.
getDeployment
();
String
contributionName
=
"helloworld-multiple-reference.zip"
;
String
contributionPath
=
IntrospectionTestSuite
.
getResourcePath
(
contributionName
);
File
contributionFile
=
IntrospectionTestSuite
.
getResource
(
contributionName
);
try
{
contributionString
=
FileUtil
.
getStringFromFile
(
new
File
(
contributionPath
)
);
contributionString
=
FileUtil
.
getStringFromFile
(
contributionFile
);
}
catch
(
IOException
e
)
{
fail
(
"Cannot read the contribution "
+
contributionName
);
}
String
compositeName
=
"helloworld-multiple-reference.jar"
;
String
compositePath
=
IntrospectionTestSuite
.
getResourcePath
(
compositeName
);
File
compositeFile
=
IntrospectionTestSuite
.
getResource
(
compositeName
);
try
{
compositeString
=
FileUtil
.
getStringFromFile
(
new
File
(
compositePath
)
);
compositeString
=
FileUtil
.
getStringFromFile
(
compositeFile
);
}
catch
(
IOException
e
)
{
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/BindingManagerTest.java
View file @
ff910e52
...
...
@@ -31,11 +31,16 @@ import static org.junit.Assert.assertEquals;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
fail
;
import
java.io.IOException
;
import
org.jdom.JDOMException
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.objectweb.fractal.api.Interface
;
import
org.objectweb.fractal.api.NoSuchInterfaceException
;
import
org.objectweb.fractal.api.control.IllegalLifeCycleException
;
import
org.ow2.frascati.remote.IntrospectionTestSuite
;
import
org.ow2.frascati.remote.introspection.binding.exception.NoBindingKindException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingComponentException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingException
;
import
org.ow2.frascati.remote.introspection.binding.processor.BindingProcessorException
;
...
...
@@ -148,7 +153,7 @@ public class BindingManagerTest
}
@Test
public
void
jsonrpcBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
public
void
jsonrpcBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
,
IllegalLifeCycleException
,
NoBindingKindException
{
JSONRPCBindingProcessorTest
jsonrpcBindingProcessorTest
=
new
JSONRPCBindingProcessorTest
();
jsonrpcBindingProcessorTest
.
startTest
();
...
...
@@ -160,7 +165,7 @@ public class BindingManagerTest
}
@Test
public
void
restBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
public
void
restBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
,
IllegalLifeCycleException
,
NoBindingKindException
{
RestBindingProcessorTest
restBindingProcessorTest
=
new
RestBindingProcessorTest
();
restBindingProcessorTest
.
startTest
();
...
...
@@ -171,20 +176,21 @@ public class BindingManagerTest
restBindingProcessorTest
.
finishTest
();
}
// @Test
// public void rmiBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException, BindingProcessorException
// {
// RMIBindingProcessorTest rmiBindingProcessorTest=new RMIBindingProcessorTest();
// rmiBindingProcessorTest.startTest();
// this.getBindinProcessor(rmiBindingProcessorTest);
// this.getClientBindingBundle(rmiBindingProcessorTest);
// //TODO RMI server is not proceed
// rmiBindingProcessorTest.testSuite();
// rmiBindingProcessorTest.finishTest();
// }
//FIXME
//@Test
public
void
rmiBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
{
RMIBindingProcessorTest
rmiBindingProcessorTest
=
new
RMIBindingProcessorTest
();
rmiBindingProcessorTest
.
startTest
();
this
.
getBindinProcessor
(
rmiBindingProcessorTest
);
this
.
getClientBindingBundle
(
rmiBindingProcessorTest
);
//FIXME RMI server is not proceed
rmiBindingProcessorTest
.
testSuite
();
rmiBindingProcessorTest
.
finishTest
();
}
@Test
public
void
scaBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
public
void
scaBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
,
IllegalLifeCycleException
,
NoBindingKindException
,
IOException
,
JDOMException
{
SCABindingProcessorTest
scaBindingProcessorTest
=
new
SCABindingProcessorTest
();
scaBindingProcessorTest
.
startTest
();
...
...
@@ -208,7 +214,7 @@ public class BindingManagerTest
}
@Test
public
void
wsBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
public
void
wsBindingProcessor
()
throws
NoSuchInterfaceException
,
UnsupportedBindingComponentException
,
UnsupportedBindingException
,
BindingProcessorException
,
IllegalLifeCycleException
,
NoBindingKindException
{
WSBindingProcessorTest
wsBindingProcessorTest
=
new
WSBindingProcessorTest
();
wsBindingProcessorTest
.
startTest
();
...
...
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/BindingProcessorTest.java
View file @
ff910e52
This diff is collapsed.
Click to expand it.
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/JSONRPCBindingProcessorTest.java
View file @
ff910e52
...
...
@@ -27,6 +27,14 @@
package
org
.
ow2
.
frascati
.
remote
.
introspection
.
binding
.
processor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.objectweb.fractal.api.NoSuchInterfaceException
;
import
org.objectweb.fractal.api.control.IllegalLifeCycleException
;
import
org.ow2.frascati.remote.introspection.binding.exception.NoBindingKindException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingComponentException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingException
;
import
org.ow2.frascati.remote.introspection.resources.BindingKind
;
/**
...
...
@@ -42,8 +50,19 @@ public class JSONRPCBindingProcessorTest extends BindingProcessorTest
}
@Override
public
void
testSuite
()
throws
BindingProcessorException
public
void
testSuite
()
throws
BindingProcessorException
,
NoSuchInterfaceException
,
IllegalLifeCycleException
,
UnsupportedBindingComponentException
,
NoBindingKindException
,
UnsupportedBindingException
{
this
.
log
(
"Not Implemented yet"
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
this
.
removeClientBinding
();
this
.
removeServerBinding
();
Map
<
String
,
String
>
serverBindingHints
=
new
HashMap
<
String
,
String
>();
serverBindingHints
.
put
(
"uri"
,
"http://localhost:9399/JSON-RPC/HelloServiceReconfigured"
);
this
.
addServerBinding
(
serverBindingHints
);
Map
<
String
,
String
>
clientBindingHints
=
new
HashMap
<
String
,
String
>();
clientBindingHints
.
put
(
"uri"
,
"http://localhost:9399/JSON-RPC/HelloServiceReconfigured"
);
this
.
addClientBinding
(
clientBindingHints
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
}
}
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/RestBindingProcessorTest.java
View file @
ff910e52
...
...
@@ -27,6 +27,19 @@
package
org
.
ow2
.
frascati
.
remote
.
introspection
.
binding
.
processor
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
junit
.
Assert
.*;
import
org.objectweb.fractal.api.NoSuchInterfaceException
;
import
org.objectweb.fractal.api.control.IllegalLifeCycleException
;
import
org.ow2.frascati.remote.introspection.binding.BindingAttribute
;
import
org.ow2.frascati.remote.introspection.binding.exception.NoBindingKindException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingComponentException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingException
;
import
org.ow2.frascati.remote.introspection.resources.BindingKind
;
/**
...
...
@@ -35,11 +48,6 @@ import org.ow2.frascati.remote.introspection.resources.BindingKind;
public
class
RestBindingProcessorTest
extends
BindingProcessorTest
{
/**
* @param bindingKind
* @param serverInterfacePath
* @param clientInterfacePath
*/
public
RestBindingProcessorTest
()
{
super
(
BindingKind
.
REST
,
"counter-server/server/counter"
,
"counter-client/client/counter"
);
...
...
@@ -47,8 +55,53 @@ public class RestBindingProcessorTest extends BindingProcessorTest
}
@Override
public
void
testSuite
()
throws
BindingProcessorException
public
void
testSuite
()
throws
BindingProcessorException
,
NoSuchInterfaceException
,
IllegalLifeCycleException
,
UnsupportedBindingComponentException
,
NoBindingKindException
,
UnsupportedBindingException
{
this
.
logEntering
(
"testSuite"
);
testCounter
();
this
.
removeClientBinding
();
this
.
removeServerBinding
();
Map
<
String
,
String
>
serverBindingHints
=
new
HashMap
<
String
,
String
>();
serverBindingHints
.
put
(
"uri"
,
"http://localhost:9299/CounterServiceReconfigured"
);
this
.
addServerBinding
(
serverBindingHints
);
Map
<
String
,
String
>
clientBindingHints
=
new
HashMap
<
String
,
String
>();
clientBindingHints
.
put
(
"uri"
,
"http://localhost:9299/CounterServiceReconfigured"
);
this
.
addClientBinding
(
clientBindingHints
);
testCounter
();
List
<
BindingAttribute
>
serverBindingAttributes
=
new
ArrayList
<
BindingAttribute
>();
BindingAttribute
uriBindingAttribute
=
new
BindingAttribute
(
"uri"
,
"http://localhost:9299/CounterServiceReconfiguredAttribute"
);
serverBindingAttributes
.
add
(
uriBindingAttribute
);
this
.
setServerAttribute
(
serverBindingAttributes
);
List
<
BindingAttribute
>
setBindingAttributesToSet
=
new
ArrayList
<
BindingAttribute
>();
setBindingAttributesToSet
.
add
(
uriBindingAttribute
);
this
.
setClientAttribute
(
setBindingAttributesToSet
);
testCounter
();
}
private
void
testCounter
()
{
this
.
log
(
"Not Implemented yet"
);
String
response
=
this
.
invokeClient
(
"getValue"
);
assertNotNull
(
response
);
assertEquals
(
"0"
,
response
);
this
.
invokeClient
(
"increment"
,
"3"
);
response
=
this
.
invokeClient
(
"getValue"
);
assertNotNull
(
response
);
assertEquals
(
"3"
,
response
);
this
.
invokeClient
(
"decrement"
,
"5"
);
response
=
this
.
invokeClient
(
"getValue"
);
assertNotNull
(
response
);
assertEquals
(
"-2"
,
response
);
this
.
invokeClient
(
"resetIt"
);
response
=
this
.
invokeClient
(
"getValue"
);
assertNotNull
(
response
);
assertEquals
(
"0"
,
response
);
}
}
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/SCABindingProcessorTest.java
View file @
ff910e52
...
...
@@ -27,24 +27,40 @@
package
org
.
ow2
.
frascati
.
remote
.
introspection
.
binding
.
processor
;
import
org.ow2.frascati.remote.introspection.resources.BindingKind
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.jdom.JDOMException
;
import
org.objectweb.fractal.api.NoSuchInterfaceException
;
import
org.objectweb.fractal.api.control.IllegalLifeCycleException
;
import
org.ow2.frascati.remote.introspection.binding.exception.NoBindingKindException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingComponentException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingException
;
import
org.ow2.frascati.remote.introspection.resources.BindingKind
;
/**
*
*/
public
class
SCABindingProcessorTest
extends
BindingProcessorTest
{
public
SCABindingProcessorTest
()
public
SCABindingProcessorTest
()
throws
IOException
,
JDOMException
{
super
(
BindingKind
.
SCA
,
""
,
"helloworld-binding-sca/client/client/s"
);
this
.
addContributionToDeploy
(
"helloworld-binding-sca"
);
}
@Override
public
void
testSuite
()
throws
BindingProcessorException
public
void
testSuite
()
throws
BindingProcessorException
,
NoSuchInterfaceException
,
IllegalLifeCycleException
,
UnsupportedBindingComponentException
,
NoBindingKindException
,
UnsupportedBindingException
{
this
.
log
(
"Not Implemented yet"
);
this
.
logEntering
(
"testSuite"
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
this
.
removeClientBinding
();
Map
<
String
,
String
>
clientBindingHints
=
new
HashMap
<
String
,
String
>();
clientBindingHints
.
put
(
"uri"
,
"helloworld-binding-sca/server/server/PrintService"
);
this
.
addClientBinding
(
clientBindingHints
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
}
}
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/UPnPBindingProcessorTest.java
View file @
ff910e52
...
...
@@ -44,6 +44,6 @@ public class UPnPBindingProcessorTest extends BindingProcessorTest
@Override
public
void
testSuite
()
throws
BindingProcessorException
{
this
.
log
(
"Not Implemented yet"
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
()
);
}
}
frascati/modules/frascati-introspection/frascati-introspection-impl/src/test/java/org/ow2/frascati/remote/introspection/binding/processor/WSBindingProcessorTest.java
View file @
ff910e52
...
...
@@ -40,7 +40,11 @@ import java.util.List;
import
java.util.Map
;
import
org.objectweb.fractal.api.NoSuchInterfaceException
;
import
org.objectweb.fractal.api.control.IllegalLifeCycleException
;
import
org.ow2.frascati.remote.introspection.binding.BindingAttribute
;
import
org.ow2.frascati.remote.introspection.binding.exception.NoBindingKindException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingComponentException
;
import
org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindingException
;
import
org.ow2.frascati.remote.introspection.resources.BindingKind
;
/**
...
...
@@ -64,9 +68,10 @@ public class WSBindingProcessorTest extends BindingProcessorTest
}
@Override
public
void
testSuite
()
throws
BindingProcessorException
public
void
testSuite
()
throws
BindingProcessorException
,
NoSuchInterfaceException
,
IllegalLifeCycleException
,
UnsupportedBindingComponentException
,
NoBindingKindException
,
UnsupportedBindingException
{
this
.
logEntering
(
"testSuite"
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
this
.
removeClientBinding
();
this
.
removeServerBinding
();
...
...
@@ -80,6 +85,7 @@ public class WSBindingProcessorTest extends BindingProcessorTest
clientBindingHints
.
put
(
"wsdlLocation"
,
"http://localhost:9299/HelloServiceReconfigured?wsdl"
);
clientBindingHints
.
put
(
"wsdlElement"
,
"http://annotated.helloworld.examples.frascati.ow2.org/#wsdl.port(HelloService/HelloServicePort)"
);
this
.
addClientBinding
(
clientBindingHints
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
List
<
BindingAttribute
>
serverBindingAttributes
=
new
ArrayList
<
BindingAttribute
>();
BindingAttribute
uriBindingAttribute
=
new
BindingAttribute
(
"uri"
,
"http://localhost:9299/HelloServiceReconfiguredAttribute"
);
...
...
@@ -92,6 +98,10 @@ public class WSBindingProcessorTest extends BindingProcessorTest
List
<
BindingAttribute
>
setBindingAttributesToSet
=
new
ArrayList
<
BindingAttribute
>();
BindingAttribute
wsdlLocationBindingAttribute
=
new
BindingAttribute
(
"wsdlLocation"
,
"http://localhost:9299/HelloServiceReconfiguredAttribute?wsdl"
);
setBindingAttributesToSet
.
add
(
wsdlLocationBindingAttribute
);
this
.
setClientAttribute
(
setBindingAttributesToSet
);
this
.
invokeClient
(
"print"
,
this
.
getClass
().
getName
());
//the client still works so the setAttribute is not proceed
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment