Examples of addHeader()


Examples of javax.sip.message.Request.addHeader()

  {
    RegisterSession session =  new RegisterSession(getAlicePhone());
    Request request = session.createRegister(null, 1800);
    ContactHeader contact2 = newContact("<sip:localhost>");
    contact2.setExpires(1500);
    request.addHeader(contact2);
    Response response =
      session.sendRegistrationMessage(request, Response.OK);
    ListIterator<ContactHeader> contacts = response.getHeaders(ContactHeader.NAME);
    while (contacts.hasNext()) {
      ContactHeader contact = (ContactHeader) contacts.next();
View Full Code Here

Examples of javax.sip.message.Response.addHeader()

                ToHeader toHeader = (ToHeader) okResponse.getHeader(ToHeader.NAME);
                toHeader.setTag("4321"); // Application is supposed to set.

                FromHeader fromHeader = (FromHeader)okResponse.getHeader(FromHeader.NAME);
                fromHeader.setTag("12345");
                okResponse.addHeader(contactHeader);
                serverTransaction.sendResponse(okResponse);


              } catch (Exception ex) {
                ex.printStackTrace();
View Full Code Here

Examples of javax.xml.soap.MimeHeaders.addHeader()

                // Set SOAPAction
                if (soapAction != null) {
                  // Setting soap action using both approaches, as CXF needs one and JBossWS-Native the other
                  proxy.getRequestContext().put(Dispatch.SOAPACTION_URI_PROPERTY, soapAction);
                  MimeHeaders hd = soapRequestMessage.getMimeHeaders();
                  hd.addHeader("SOAPAction", soapAction);
                } else if (log.isDebugEnabled()) {
                  log.debug("SOAPAction not set");
                }

                // Set client side timeout for the invocation
View Full Code Here

Examples of javax.xml.soap.SOAPEnvelope.addHeader()

        SOAPMessage message = context.getMessage();
        try {
            SOAPEnvelope env = message.getSOAPPart().getEnvelope();
            SOAPHeader header = env.getHeader() != null
                                ? env.getHeader()
                                : env.addHeader();
                               
            discardRMHeaders(header);
            header.addNamespaceDeclaration(Names.WSRM_NAMESPACE_PREFIX,
                                           Names.WSRM_NAMESPACE_NAME);
            Marshaller marshaller = getJAXBContext().createMarshaller();
View Full Code Here

Examples of net.matuschek.http.HttpDoc.addHeader()

      }
      // get the mimetype and put in the http header
      String mimetypestr = getMimeTypeForFilename(filename);
      if (mimetypestr != null) {
        HttpHeader header = new HttpHeader("content-type", mimetypestr);
        doc.addHeader(header);
      }
     
      // get the content from the file
      File file = new File(filename);
      if (!file.exists()) {
View Full Code Here

Examples of net.rim.blackberry.api.mail.Message.addHeader()

            MailBody body = mailContent.getMailBody();

            Vector attachment = mailContent.getAttachmentList();

            msg.addHeader("FROM", (String)ht.get("FROM"));
            msg.addHeader("TO", (String)ht.get("TO"));
            msg.setHeader("DATE", (String)ht.get("DATE"));
            msg.setSentDate(parseRfc822Date((String)ht.get("DATE")));
            // Set sent date, shown when message is opened
            msg.addHeader("MIME-Version", (String)ht.get("MIME-VERSION"));
View Full Code Here

Examples of net.sf.paperclips.GridPrint.addHeader()

      GridPrint table = new GridPrint("l:p:n, l:d:n, l:p:g, r:p:n, r:p:n",look);
      table.addHeader(new NoBreakPrint(new TextPrint(i18n.tr("Valuta/Datum"),fontTinyBold)));
      table.addHeader(new TextPrint(i18n.tr("Gegenkonto"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Verwendungszweck"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Betrag"),fontTinyBold));
      table.addHeader(new TextPrint(i18n.tr("Saldo"),fontTinyBold));

      // Iteration pro Konto
      Iterator<String> konten = groups.keySet().iterator();
     
      while (konten.hasNext())
View Full Code Here

Examples of net.sf.sahi.response.SimpleHttpResponse.addHeader()

    String cookieStr = name+"=" + value + "; ";
    if (expires != null) cookieStr += "expires=" + expires + "; ";
    if (path != null) cookieStr += "path="+ path +"; ";
    if (domain != null) cookieStr += "domain="+domain+";";
    response.addHeader("Set-Cookie", cookieStr);
       
    return response;
  }

 
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcReceipt.addHeader()

     * 默认收据
     */
    public SipcReceipt createDefaultReceipt(String callId, String sequence)
    {
      SipcReceipt receipt = new SipcReceipt(200, "OK");
      receipt.addHeader(SipcHeader.CALLID, callId);
      receipt.addHeader(SipcHeader.SEQUENCE, sequence);
     
      return receipt;
    }
   
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest.addHeader()

    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      String body = MessageTemplate.TMPL_APPLICATION_DECLINED;
      body = body.replace("{userId}", Integer.toString(userId));
     
      req.addHeader(SipcHeader.EVENT,"HandleContactRequestV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.