Package org.w3._2005.atom

Examples of org.w3._2005.atom.LoginResponse


  }
 
  protected abstract String createAddress();

    public static EndpointReferenceType createEndpointReference(String address) {
        EndpointReferenceType epr = new EndpointReferenceType();
        AttributedURIType addressUri = new AttributedURIType();
        addressUri.setValue(address);
        epr.setAddress(addressUri);
        return epr;
    }
View Full Code Here


    public void testNotify() throws Exception {
        ReceiverComponent receiver = new ReceiverComponent();
        jbi.activateComponent(receiver, "receiver");

        EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
        wsnBroker.subscribe(consumer, "myTopic", null);

        wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
        // Wait for notification
        Thread.sleep(150);
View Full Code Here

    public void testRawNotify() throws Exception {
        ReceiverComponent receiver = new ReceiverComponent();
        jbi.activateComponent(receiver, "receiver");

        // START SNIPPET: notify
        EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
        wsnBroker.subscribe(consumer, "myTopic", null, true);

        Element body = parse("<hello>world</hello>");
        wsnBroker.notify("myTopic", body);
        // END SNIPPET: notify
View Full Code Here

        Document doc = builder.parse(is);
        return doc.getDocumentElement();
    }

    protected EndpointReferenceType createEPR(QName service, String endpoint) {
        EndpointReferenceType epr = new EndpointReferenceType();
        epr.setAddress(new AttributedURIType());
        epr.getAddress().setValue(service.getNamespaceURI() + "/" + service.getLocalPart() + "/" + endpoint);
        return epr;
    }
View Full Code Here

    this.resolver = resolveWSA(endpoint);
    this.client = client;
  }

  public static EndpointReferenceType createWSA(String address) {
    EndpointReferenceType epr = new EndpointReferenceType();
    AttributedURIType attUri = new AttributedURIType();
    attUri.setValue(address);
    epr.setAddress(attUri);
    return epr;
  }
View Full Code Here

   
  /* (non-Javadoc)
   * @see com.album.dispatcher.Album#getAlbumById(int)
   */
  public EntryType getAlbumById(int albumId) {
    EntryType type = new EntryType();
    type.setId(String.valueOf(albumId));
    return type;
  }
View Full Code Here

 
  /* (non-Javadoc)
   * @see com.album.dispatcher.Album#getAlbumByName(java.lang.String)
   */
  public EntryType getAlbumByName(String albumName) {
    EntryType type = new EntryType();
    type.setTitle(albumName);
    return type;
  }
View Full Code Here

   */
  public FeedType listPhotosByAlbumObject(Crediential crediential,
      EntryType album) {
    FeedType ft = new FeedType();
    ft.getEntry().add(album);
    EntryType credEntry = new EntryType();
    credEntry.setSummary(crediential.getToken());
    ft.getEntry().add(credEntry );
    return ft;
  }
View Full Code Here

  public @WebResult(name="albums") FeedType listAlbums(@WebParam(name = "crediential") Crediential crediential) {
    try {
      //TODO from JNDI property
      URL       albumURL   = new URL("http://picasaweb.google.com/data/feed/api/user/"+crediential.getUsername()+"?kind=album");
      Unmarshaller   um       = context.createUnmarshaller();
      FeedType ob = um.unmarshal(new StreamSource(albumURL.openStream()),FeedType.class).getValue();
      return ob;
    } catch (Exception e) {
      e.printStackTrace();
      throw new Error("Album request failed",e);
    }
View Full Code Here

          @WebParam(name = "albumUrl", partName = "albumUrl")
          String albumUrl) {
    try {
      URL       albumURL   = new URL(albumUrl);
      Unmarshaller   um       = context.createUnmarshaller();
      FeedType ob = um.unmarshal(new StreamSource(albumURL.openStream()),FeedType.class).getValue();
      return ob;
    } catch (Exception e) {
      e.printStackTrace();
      throw new Error("Album request failed",e);
    }
View Full Code Here

TOP

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

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.