Skip to content
Snippets Groups Projects
Commit 5f320571 authored by rballa's avatar rballa
Browse files

Service-presentation v1 runs

parent d8d5442d
Branches
No related tags found
No related merge requests found
......@@ -30,17 +30,10 @@ public class NoDPWSDevice extends DefaultDevice
/** The Constant log. */
private static final Logger log = Logger.getLogger(DPWSGateDevice.class.getName());
private String comManId;
private final AppSequenceManager appSequencer;
public NoDPWSDevice(String comManId, RootEntity ent, GatewayInterface gw)
{
super(comManId);
appSequencer = this.getAppSequencer();
this.comManId = comManId;
RootEntity entity = ent;
GatewayInterface gateway = gw;
......@@ -53,7 +46,7 @@ public class NoDPWSDevice extends DefaultDevice
this.addManufacturer(LocalizedString.LANGUAGE_EN, "Uni Rostock");
//Variante 1
String serviceNamespace = deviceNamespace + "/" + ent.getOriginName() + "-Service";
String serviceNamespace = ent.getOriginName() + "-Service";
this.addService(new NoDPWSService1(comManId, entity, serviceNamespace, gateway));
//Variante 2
......@@ -83,7 +76,7 @@ public class NoDPWSDevice extends DefaultDevice
private void newService(SubEntity ent, String nspace, GatewayInterface gateway)
{
String namespace = nspace + "/" + ent.getOriginName();
this.addService(new NoDPWSService2(comManId, ent, namespace, gateway));
this.addService(new NoDPWSService2(this.getComManId(), ent, namespace, gateway));
if (ent.getAllSubEntities() != null)
{
......
......@@ -32,7 +32,7 @@ public class ReadOperation1 extends Operation
protected ParameterValue invokeImpl(ParameterValue parameterValue, CredentialInfo credentialInfo) throws InvocationException, CommunicationException
{
ParameterValue result = createOutputValue();
ParameterValueManagement.setString(result, "value", gateway.readValue(ent));
ParameterValueManagement.setString(result, ent.getOriginName(), gateway.readValue(ent));
return result;
}
......
......@@ -25,6 +25,7 @@ public class NoDPWSService1 extends DefaultService
private void newOperation(GatewayInternalEntity ent, String namespace, GatewayInterface gateway)
{
if (ent.getAllSubEntities() != null)
{
for (SubEntity subEnt : ent.getAllSubEntities())
......@@ -32,7 +33,7 @@ public class NoDPWSService1 extends DefaultService
if (subEnt.isReadable())
this.addOperation(new ReadOperation1(namespace, ent.getOriginName(), ent, subEnt, gateway));
newOperation(subEnt, namespace, gateway);
this.newOperation(subEnt, namespace + "/" + subEnt.getOriginName(), gateway);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment