Package org.w3._2005.atom

Examples of org.w3._2005.atom.EntryType


        String testString = "test base 64 eleemnt";
        DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(testString.getBytes()));
        base64Binary.setBase64Binary(dataHandler);

        ContentType_type0 contentType_type0 = new ContentType_type0();
        contentType_type0.setContentType_type0("test string");
        base64Binary.setContentType(contentType_type0);

        try {
            OMElement omElement = testExtension.getOMElement(TestExtension.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
View Full Code Here


        }
    }

    public void testHexBinary(){
        TestHexBinary testHexBinary = new TestHexBinary();
        HexBinary hexBinary = new HexBinary();
        testHexBinary.setTestHexBinary(hexBinary);

        String testString = "ab";

        org.apache.axis2.databinding.types.HexBinary adbHexBinary =
                new  org.apache.axis2.databinding.types.HexBinary(testString);

        hexBinary.setHexBinary(adbHexBinary);
        ContentType_type0 contentType_type0 = new ContentType_type0();
        contentType_type0.setContentType_type0("test content type");
        hexBinary.setContentType(contentType_type0);


        try {
            OMElement omElement = testHexBinary.getOMElement(TestBase64Binary.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
View Full Code Here


public class RampartTest extends TestCase {

    public void testExtension(){
        TestExtension testExtension = new TestExtension();

        Base64Binary base64Binary = new Base64Binary();
        testExtension.setTestExtension(base64Binary);

        String testString = "test base 64 eleemnt";
        DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(testString.getBytes()));
        base64Binary.setBase64Binary(dataHandler);

        ContentType_type0 contentType_type0 = new ContentType_type0();
        contentType_type0.setContentType_type0("test string");
        base64Binary.setContentType(contentType_type0);

        try {
            OMElement omElement = testExtension.getOMElement(TestExtension.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM String " + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            TestExtension result = TestExtension.Factory.parse(xmlReader);
           
        } catch (ADBException e) {
            fail();
        } catch (XMLStreamException e) {
            fail();
View Full Code Here


public class RampartTest extends TestCase {

    public void testExtension(){
        TestExtension testExtension = new TestExtension();

        Base64Binary base64Binary = new Base64Binary();
        testExtension.setTestExtension(base64Binary);

        String testString = "test base 64 eleemnt";
        DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(testString.getBytes()));
        base64Binary.setBase64Binary(dataHandler);

        ContentType_type0 contentType_type0 = new ContentType_type0();
        contentType_type0.setContentType_type0("test string");
        base64Binary.setContentType(contentType_type0);

        try {
            OMElement omElement = testExtension.getOMElement(TestExtension.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM String " + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            TestExtension result = TestExtension.Factory.parse(xmlReader);
           
        } catch (ADBException e) {
            fail();
        } catch (XMLStreamException e) {
            fail();
View Full Code Here

        if (specifyExpires) {
            Expires expires = new Expires();
            createArguments.setExpires(expires);
        }

        CreateSequenceResponseType response = sequenceManager.createSequence(createArguments);
        Identifier identifier = response.getIdentifier();
        String value = identifier.getValue();
        assertNotNull("Should have an identifier", value);
       
        System.out.println("Created identifier: " + value);
        System.out.println("Accept: " + response.getAccept());
       
        TerminateSequenceType terminateArgs = new TerminateSequenceType();
        terminateArgs.setIdentifier(identifier);
        sequenceManager.terminateSequence(terminateArgs);
    }
View Full Code Here

        if (createSequence.getExpires() != null) {
            s.expires = convertToLocalTime(createSequence.getExpires());
        }
        sequenceStore.create(s);

        CreateSequenceResponseType response = new CreateSequenceResponseType();
        response.setIdentifier(s.getIdentifier());
        if (s.expires != 0) {
            response.setExpires(convertToDuration(s.expires));
        }
        return response;
    }
View Full Code Here

public class SequenceManagerTest extends TestCase {
    protected SequenceAbsractPortType sequenceManager;
    protected boolean specifyExpires = false;

    public void testCreateAndTerminateSequence() throws Exception {
        CreateSequenceType createArguments = new CreateSequenceType();

        EndpointReferenceType reference = new EndpointReferenceType();
        reference.setAddress(new AttributedURI());
        reference.getAddress().setValue("http://localhost/test/" + getClass().getName() + "/" + getName());
        createArguments.setAcksTo(reference);

        if (specifyExpires) {
            Expires expires = new Expires();
            createArguments.setExpires(expires);
        }

        CreateSequenceResponseType response = sequenceManager.createSequence(createArguments);
        Identifier identifier = response.getIdentifier();
        String value = identifier.getValue();
View Full Code Here

        reference.setAddress(new AttributedURI());
        reference.getAddress().setValue("http://localhost/test/" + getClass().getName() + "/" + getName());
        createArguments.setAcksTo(reference);

        if (specifyExpires) {
            Expires expires = new Expires();
            createArguments.setExpires(expires);
        }

        CreateSequenceResponseType response = sequenceManager.createSequence(createArguments);
        Identifier identifier = response.getIdentifier();
View Full Code Here

            Expires expires = new Expires();
            createArguments.setExpires(expires);
        }

        CreateSequenceResponseType response = sequenceManager.createSequence(createArguments);
        Identifier identifier = response.getIdentifier();
        String value = identifier.getValue();
        assertNotNull("Should have an identifier", value);
       
        System.out.println("Created identifier: " + value);
        System.out.println("Accept: " + response.getAccept());
       
View Full Code Here

    private final IdGenerator idGenerator = new IdGenerator();
    private final ConcurrentHashMap sequences = new ConcurrentHashMap();
   
    public void create(Sequence s) {
        String id = idGenerator.generateId();
        Identifier identifier = new Identifier();
        identifier.setValue(id);
        s.setIdentifier(identifier);
        sequences.put(id,s);
    }
View Full Code Here

TOP

Related Classes of org.w3._2005.atom.EntryType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.