Hi Lenni / Jan / All,
Just to point out, the first SOAP message isn't a requirement of Muse, its an
artifact of the framework that wraps it. In the example I gave no server is
required and the muse is started immediately.
When Muse is actually started then all resources types are loaded and a
resource created for them. They are immediately available upon start up.
To use the code I pointed to as an example the thing that starts Muse up is
just:
in InlineIsolationLayer main...
InlineIsolationLayer iso = new InlineIsolationLayer();
iso.initialize();
that will verify all muse.xml and related code is correct for initialisation.
Of course it can't verify you're code is all correct :-)
cheers,
Chris
-----Original Message-----
From: Lenni Madsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2008 8:31 AM
To: [email protected]
Subject: SV: Junit Mock classes
Hi Jan
As far as I know (and understand) Muse starts, or rather the Muse resource gets
initialized with the first incoming SOAP call to that specific resource.
Meaning that while you can use the Muse libs for many other things, to start
the actual framework it's required to utilize a incoming SOAP message, that
accesses one of the functions of the resource, described in the resources wsdl.
To test you interfaces I think you would require a SOAP message as well as your
interfaces utilizes this message format to work.
To test your resource in a Junit environment this might get you started:
public void testCreateFactory() throws SoapFault, IOException{
factory = new WsFactoryProxy(new
EndpointReference(URI.create(factoryUrl)));
factory.setTrace(false);
}
public void testCreateWithEpr() throws SoapFault, IOException{
EndpointReference clientEpr =
factory.createWithEprOperation("TestResourceID-1","WsExtended");
clientResource = new WsExtendedProxy(clientEpr);
clientResource.setTrace(false);
}
public void testWSN() throws SoapFault, IOException {
factory.runtimeEventOperation("transaction");
clientResource.runtimeEventOperation();
}
public void testDestroy() throws SoapFault, IOException {
clientResource.destroy();
}
In this I've a factory resource that creates a new resource of the type
WsExtended. The functions I've exposed on my factory resource (in the wsdl) is
runtimeEventOperation and createWithEprOperation. In my WsExtended I've expose
(likewise in the wsdl) runtimeEventOperation() and destroy() (this one is free
with WSRF).
I hope this helps rather than confuse.
/Lenni
"Cake is not a dual-use food stuff"
-----Oprindelig meddelelse-----
Fra: Jan Torben Heuer [mailto:[EMAIL PROTECTED]
Sendt: 28. maj 2008 17:43
Til: [email protected]
Emne: Re: Junit Mock classes
On Wednesday 28 May 2008 11:59:46 [EMAIL PROTECTED] wrote:
Hallo,
> There is nothing officially downloadable but I created an "in process"
> isolation layer that I added to issue 270 :
> https://issues.apache.org/jira/browse/MUSE-270
great, there is some interesting stuff...
Is there a command which "starts" muse? I want it to check if the muse.xml can
be read etc... I don't need any SOAP, yet, I just want to check if interfaces,
wsdl and muse.xml fit together.
like "new Muse();" ;-)
--
Jan Torben Heuer Institute for Geoinformatics
[EMAIL PROTECTED] Robert-Koch-Strasse 26-28
+49 251 83-31960 48151 Münster, Germany
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]