Search in sources :

Example 6 with BundleRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest in project open-smart-grid-platform by OSGP.

the class BundleSteps method theBundleRequestIsReceivedWithHeaders.

@When("^the bundle request is received with headers$")
public void theBundleRequestIsReceivedWithHeaders(final Map<String, String> settings) throws Throwable {
    final BundleRequest request = (BundleRequest) ScenarioContext.current().get(PlatformSmartmeteringKeys.BUNDLE_REQUEST);
    /*
     * Scenarios containing this step may include a data table with two columns. The first column
     * should have the local part of the name of a SOAP header element and the second column should
     * have the text value for the named SOAP header element.
     *
     * These headers can be picked up by classes like those in osgp-adapter-ws-shared package
     * org.opensmartgridplatform.adapter.ws.endpointinterceptors, for instance the MessageMetadata
     * handling SoapHeaderMessageMetadataInterceptor or configurations of the more generic
     * SoapHeaderInterceptor.
     */
    final BundleAsyncResponse asyncResponse = this.client.sendBundleRequest(request, this.additionalSoapHeaders(settings));
    assertThat(asyncResponse).isNotNull();
    ScenarioContextHelper.saveAsyncResponse(asyncResponse);
}
Also used : BundleRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest) BundleAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleAsyncResponse) When(io.cucumber.java.en.When)

Example 7 with BundleRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest in project open-smart-grid-platform by OSGP.

the class BundleRequestBuilder method build.

public BundleRequest build() {
    final BundleRequest request = new BundleRequest();
    request.setDeviceIdentification(this.deviceIdentification);
    request.setActions(this.actions);
    return request;
}
Also used : BundleRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest)

Aggregations

BundleRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest)7 Then (io.cucumber.java.en.Then)2 When (io.cucumber.java.en.When)2 BundleAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleAsyncResponse)2 BundleResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleResponse)2 Given (io.cucumber.java.en.Given)1 Actions (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.Actions)1