Package javax.xml.ws

Examples of javax.xml.ws.Holder


            super(idx);
        }

        @Override
        void put(Object obj, Object[] args) {
            Holder holder = new Holder();
            if (obj != null) {
                holder.value = obj;
            }
            args[idx] = holder;
        }
View Full Code Here


        if (client) {
            List<Holder> outHolders = CastUtils.cast((List)message.getExchange()
                .getOutMessage().get(CLIENT_HOLDERS));
            for (MessagePartInfo part : parts) {
                if (part.getIndex() != 0 && part.getTypeClass() != null) {
                    Holder holder = (Holder)outHolders.get(part.getIndex() - 1);
                    holder.value = inObjects.get(part);
                    inObjects.put(part, holder);
                }
            }
        } else {
View Full Code Here

            System.out.println("Service URL=" + service1URL);

            ((BindingProvider)stub1).getRequestContext().
                put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, service1URL);

             stub1.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
        } catch (Exception ex) {
            System.out.println ("Caught Exception: " + ex.getMessage() );
            ex.printStackTrace();
        }
View Full Code Here

             ((BindingProvider)stub).getRequestContext().
                put(com.sun.xml.wss.XWSSConstants.USERNAME_PROPERTY, "alice");
            ((BindingProvider)stub).getRequestContext().
                put(com.sun.xml.wss.XWSSConstants.PASSWORD_PROPERTY, "alice");
           
            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
            // Ping again
            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed again!"));
           
           
             // Ping the third time
            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed again again!"));
           
           
        } catch (Exception ex) {
            System.out.println ("Caught Exception: " + ex.getMessage() );
            ex.printStackTrace();
View Full Code Here

            super(idx);
        }

        @Override
        void put(Object obj, Object[] args) {
            Holder holder = new Holder();
            if (obj != null) {
                holder.value = obj;
            }
            args[idx] = holder;
        }
View Full Code Here

                    if (mode.equals(ParameterMode.IN)) {
                        payloadList.add(payloadArray[nextIndex++]);
                    } else if (mode.equals(ParameterMode.INOUT)) {
                        // Promote array params from [<T>] to [Holder<T>]                 
                        Object item = payloadArray[nextIndex++];                          
                        Holder itemHolder = new Holder(item);
                        payloadList.add(itemHolder);
                        argumentHolderCount++;
                    } else {
                        // Create an empty Holder since we should not pass values for OUT parameters
                        payloadList.add(new Holder());
                        argumentHolderCount++;
                    }                       
                }
               
                // Maybe a bit odd to do but this way I don't have to worry about how the invoke if/else
View Full Code Here

          for ( int i = 0; i < parameters.length; i++ ) {
            Class parameterType = parameters[ i ];             
            if ( isHolder( parameterType ) ) {
              holderPattern = true;
              // Pop results and place in holder (demote).
              Holder holder = (Holder) args[ i ];
           
              Object[] results = (Object[])result;
              if ( result != null ) {
                holder.value =  results[resultIdx++];
              }
View Full Code Here

  public void serializeCall(PrintWriter writer, OutputStream out,
                            UUID uuid, Object []args)
    throws IOException
  {
    AttachmentProperty attachmentProperty = (AttachmentProperty) _property;
    Holder holder = (Holder) args[_arg];
    Object arg = holder.value;
    String contentType = attachmentProperty.getMimeType(arg);

    writer.print("--uuid:" + uuid + "\r\n");
    writer.print("Content-Type: " + contentType + "\r\n");
View Full Code Here

  // server
  //

  public void prepareArgument(Object []args)
  {
    args[_arg] = new Holder();
  }
View Full Code Here

  }

  public void deserializeCall(XMLStreamReader in, Object []args)
    throws IOException, XMLStreamException, JAXBException
  {
    Holder h = (Holder) args[_arg];

    if (h == null) {
      h = new Holder();
      args[_arg] = h;
    }

    Object previous = h.value;
View Full Code Here

TOP

Related Classes of javax.xml.ws.Holder

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.