Package org.w3.x2007.x05.addressing.metadata.AddressingDocument

Examples of org.w3.x2007.x05.addressing.metadata.AddressingDocument.Addressing


  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

  /* (non-Javadoc)
   * @see com.album.dispatcher.Album#listPhotosByAlbumObject(org.w3._2005.atom.Crediential, org.w3._2005.atom.EntryType)
   */
  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 LoginResponse clientLogin(@WebParam(name = "requestcontext", partName = "requestcontext") LoginParameter loginParameter)
      throws ClientLoginFault {
    if(loginParameter != null && loginParameter.getEmail() != null
        && !loginParameter.getEmail().isEmpty()
        && loginParameter.getPasswd() != null){
      LoginResponse respone = new LoginResponse();
      respone.setCaptchaToken("DUMMY");
      respone.setCaptchaUrl("http://dummp.url");
      return respone;
     
    }
    return null;
  }
View Full Code Here

    public Photo getPhotoById(
        @WebParam(name = "albumId", partName = "albumId")
        int albumId,
        @WebParam(name = "photoId", partName = "photoId")
        int photoId){
      Photo photo = new Photo();
      photo.setHeight(photoId);
      photo.setWidth(albumId);
      return photo;
    }
View Full Code Here

public class ListMapKeyTest {
  public static void main(String[] args) throws MalformedURLException {
    AlbumService albm = new AlbumService(new URL("http://localhost:8080/album/json/picasa?wsdl"), new QName("http://album.com/dispatcher", "AlbumService"));
    Album port = albm.getAlbumServicePort();
    UIElements uiElementsProxy = new UIElements();
    UIElement elm1    = new UIElement();
    elm1.setName("LOGIN");
    uiElementsProxy.getElements().add(elm1    );
    UIElement elm2= new UIElement();
    elm2.setName("PASS");
    uiElementsProxy.getElements().add(elm2    );
    port.getUIElements(uiElementsProxy );
  }
View Full Code Here

public class ListMapKeyTest {
  public static void main(String[] args) throws MalformedURLException {
    AlbumService albm = new AlbumService(new URL("http://localhost:8080/album/json/picasa?wsdl"), new QName("http://album.com/dispatcher", "AlbumService"));
    Album port = albm.getAlbumServicePort();
    UIElements uiElementsProxy = new UIElements();
    UIElement elm1    = new UIElement();
    elm1.setName("LOGIN");
    uiElementsProxy.getElements().add(elm1    );
    UIElement elm2= new UIElement();
    elm2.setName("PASS");
    uiElementsProxy.getElements().add(elm2    );
    port.getUIElements(uiElementsProxy );
  }
View Full Code Here

    // check if found reference is addressing policy
    Element wsAddressing = XmlUtils.getFirstChildElementNS( wsamAddressingElm, WsaUtils.WS_A_NAMESPACE_200705,
        "Addressing" );
    Element addressingPolicy = null;
    Policy newPolicy = PolicyDocument.Factory.newInstance().addNewPolicy();
    Addressing newAddressing = null;
    if( wsAddressing != null )
    {
      newAddressing = newPolicy.addNewAddressing();
      String optional = wsAddressing.getAttributeNS( usedPolicyNamespace, "Optional" );
      if( !StringUtils.isNullOrEmpty( optional ) && optional.equals( OptionalType.TRUE.toString() ) )
      {
        newAddressing.setOptional( OptionalType.TRUE );
      }
      else
      {
        newAddressing.setOptional( OptionalType.FALSE );
      }
      addressingPolicy = XmlUtils.getFirstChildElementNS( wsAddressing, usedPolicyNamespace, "Policy" );
      if( addressingPolicy != null )
      {
        Element exactlyOne = XmlUtils.getFirstChildElementNS( addressingPolicy, usedPolicyNamespace, "ExactlyOne" );
View Full Code Here

        // check if found reference is addressing policy
        Element wsAddressing = XmlUtils.getFirstChildElementNS(wsamAddressingElm, WsaUtils.WS_A_NAMESPACE_200705,
                "Addressing");
        Element addressingPolicy = null;
        Policy newPolicy = PolicyDocument.Factory.newInstance().addNewPolicy();
        Addressing newAddressing = null;
        if (wsAddressing != null) {
            newAddressing = newPolicy.addNewAddressing();
            String optional = wsAddressing.getAttributeNS(usedPolicyNamespace, "Optional");
            if (!StringUtils.isNullOrEmpty(optional) && optional.equals(OptionalType.TRUE.toString())) {
                newAddressing.setOptional(OptionalType.TRUE);
            } else {
                newAddressing.setOptional(OptionalType.FALSE);
            }
            addressingPolicy = XmlUtils.getFirstChildElementNS(wsAddressing, usedPolicyNamespace, "Policy");
            if (addressingPolicy != null) {
                Element exactlyOne = XmlUtils.getFirstChildElementNS(addressingPolicy, usedPolicyNamespace, "ExactlyOne");
                if (exactlyOne != null) {
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public void setActuate(ActuateType newActuate) {
    ActuateType oldActuate = actuate;
    actuate = newActuate == null ? ACTUATE_EDEFAULT : newActuate;
    boolean oldActuateESet = actuateESet;
    actuateESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GmlPackage.META_DATA_PROPERTY_TYPE__ACTUATE, oldActuate, actuate, !oldActuateESet));
View Full Code Here

TOP

Related Classes of org.w3.x2007.x05.addressing.metadata.AddressingDocument.Addressing

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.