Search in sources :

Example 1 with CreateMovementBatchResponse

use of eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchResponse in project UVMS-Docker by UnionVMS.

the class MovementJmsIT method createMovementBatchRequestTest.

@Test
public void createMovementBatchRequestTest() throws Exception {
    Asset testAsset = AssetTestHelper.createTestAsset();
    MobileTerminalType mobileTerminalType = MobileTerminalTestHelper.createMobileTerminalType();
    MobileTerminalTestHelper.assignMobileTerminal(testAsset, mobileTerminalType);
    List<LatLong> latLongList = movementHelper.createRuttCobhNewYork(ALL, 0.4f);
    final CreateMovementBatchRequest createMovementBatchRequest = movementHelper.createMovementBatchRequest(testAsset, mobileTerminalType, latLongList);
    CreateMovementBatchResponse createMovementResponse = movementHelper.createMovementBatch(testAsset, mobileTerminalType, createMovementBatchRequest);
}
Also used : Asset(eu.europa.ec.fisheries.wsdl.asset.types.Asset) CreateMovementBatchRequest(eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchRequest) CreateMovementBatchResponse(eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchResponse) MobileTerminalType(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalType) Test(org.junit.Test) AbstractRestServiceTest(eu.europa.ec.fisheries.uvms.docker.validation.common.AbstractRestServiceTest)

Example 2 with CreateMovementBatchResponse

use of eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchResponse in project UVMS-Docker by UnionVMS.

the class MovementHelper method unMarshallCreateMovementBatchResponse.

/**
 * @param response
 * @return
 * @throws Exception
 */
public CreateMovementBatchResponse unMarshallCreateMovementBatchResponse(final Message response) throws Exception {
    TextMessage textMessage = (TextMessage) response;
    JAXBContext jaxbContext = JAXBContext.newInstance(CreateMovementBatchResponse.class);
    return (CreateMovementBatchResponse) jaxbContext.createUnmarshaller().unmarshal(new StringReader(textMessage.getText()));
}
Also used : StringReader(java.io.StringReader) CreateMovementBatchResponse(eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchResponse) JAXBContext(javax.xml.bind.JAXBContext) TextMessage(javax.jms.TextMessage)

Aggregations

CreateMovementBatchResponse (eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchResponse)2 MobileTerminalType (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalType)1 CreateMovementBatchRequest (eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementBatchRequest)1 AbstractRestServiceTest (eu.europa.ec.fisheries.uvms.docker.validation.common.AbstractRestServiceTest)1 Asset (eu.europa.ec.fisheries.wsdl.asset.types.Asset)1 StringReader (java.io.StringReader)1 TextMessage (javax.jms.TextMessage)1 JAXBContext (javax.xml.bind.JAXBContext)1 Test (org.junit.Test)1