Package javax.xml.ws.addressing.soap

Examples of javax.xml.ws.addressing.soap.SOAPAddressingBuilder


/*     */     {
/* 199 */       Element epRef = toElement();
/* 200 */       return DOMWriter.printNode(epRef, true);
/*     */     }
/*     */
/* 203 */     SOAPAddressingBuilder builder = new SOAPAddressingBuilderImpl();
/* 204 */     AddressingConstants ADDR = builder.newAddressingConstants();
/*     */
/* 206 */     String rootname = getPrefixedName(this.rootQName);
/* 207 */     StringBuilder xmlBuffer = new StringBuilder("<" + rootname);
/* 208 */     appendAttributes(xmlBuffer, getAttributes());
/* 209 */     xmlBuffer.append(">");
View Full Code Here


/*     */   {
/*     */     try
/*     */     {
/*  94 */       SOAPHeader soapHeader = message.getSOAPHeader();
/*     */
/*  96 */       SOAPAddressingBuilder builder = new SOAPAddressingBuilderImpl();
/*  97 */       AddressingConstants ADDR = builder.newAddressingConstants();
/*  98 */       registerNamespaces(ADDR, soapHeader);
/*     */
/* 104 */       String to = getOptionalHeaderContent(soapHeader, ADDR.getToQName());
/* 105 */       if (to != null) {
/* 106 */         setTo(builder.newURI(to));
/*     */       }
/*     */
/* 110 */       Element wsaFrom = DOMUtils.getFirstChildElement(soapHeader, ADDR.getFromQName());
/* 111 */       if (wsaFrom != null)
/*     */       {
/* 113 */         EndpointReferenceImpl ref = new EndpointReferenceImpl(wsaFrom);
/* 114 */         setReplyTo(ref);
/*     */       }
/*     */
/* 121 */       Element wsaReplyTo = DOMUtils.getFirstChildElement(soapHeader, ADDR.getReplyToQName());
/* 122 */       if (wsaReplyTo != null)
/*     */       {
/* 124 */         EndpointReferenceImpl ref = new EndpointReferenceImpl(wsaReplyTo);
/* 125 */         setReplyTo(ref);
/*     */       }
/*     */
/* 131 */       Element wsaFaultTo = DOMUtils.getFirstChildElement(soapHeader, ADDR.getFaultToQName());
/* 132 */       if (wsaFaultTo != null)
/*     */       {
/* 134 */         EndpointReferenceImpl ref = new EndpointReferenceImpl(wsaFaultTo);
/* 135 */         setFaultTo(ref);
/*     */       }
/*     */
/* 141 */       String action = getRequiredHeaderContent(soapHeader, ADDR.getActionQName());
/* 142 */       setAction(builder.newURI(action));
/*     */
/* 146 */       String messageID = getOptionalHeaderContent(soapHeader, ADDR.getMessageIDQName());
/* 147 */       if (messageID != null) setMessageID(builder.newURI(messageID));
/*     */
/* 152 */       Iterator itRelatesTo = DOMUtils.getChildElements(soapHeader, ADDR.getRelatesToQName());
/* 153 */       List relList = new ArrayList();
/* 154 */       while (itRelatesTo.hasNext())
/*     */       {
/* 156 */         Element wsaRelatesTo = (Element)itRelatesTo.next();
/* 157 */         QName type = DOMUtils.getAttributeValueAsQName(wsaRelatesTo, ADDR.getRelationshipTypeName());
/* 158 */         String uri = DOMUtils.getTextContent(wsaRelatesTo);
/* 159 */         Relationship rel = builder.newRelationship(new URI(uri));
/* 160 */         rel.setType(type);
/* 161 */         relList.add(rel);
/*     */       }
/* 163 */       Relationship[] relArr = (Relationship[])(Relationship[])Array.newInstance(Relationship.class, relList.size());
/* 164 */       relList.toArray(relArr);
View Full Code Here

/* 104 */     return true;
/*     */   }
/*     */
/*     */   private void handleResponseOrFault(MessageContext msgContext, boolean isFault)
/*     */   {
/* 109 */     SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
/* 110 */     SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
/*     */
/* 112 */     SOAPAddressingProperties inProps = (SOAPAddressingProperties)msgContext.get("javax.xml.ws.addressing.context.inbound");
/* 113 */     SOAPAddressingProperties outProps = (SOAPAddressingProperties)msgContext.get("javax.xml.ws.addressing.context.outbound");
/*     */
/* 115 */     if (outProps == null)
/*     */     {
/* 118 */       outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
/* 119 */       msgContext.put("javax.xml.ws.addressing.context.outbound", outProps);
/* 120 */       msgContext.setScope("javax.xml.ws.addressing.context.outbound", MessageContext.Scope.APPLICATION);
/*     */     }
/*     */
/* 123 */     outProps.initializeAsReply(inProps, isFault);
View Full Code Here

/*     */     try
/*     */     {
/* 109 */       SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
/* 110 */       if (soapMessage.getSOAPPart().getEnvelope() != null)
/*     */       {
/* 112 */         SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
/* 113 */         SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
/* 114 */         addrProps.readHeaders(soapMessage);
/* 115 */         msgContext.put("javax.xml.ws.addressing.context", addrProps);
/* 116 */         msgContext.setScope("javax.xml.ws.addressing.context", MessageContext.Scope.APPLICATION);
/* 117 */         msgContext.put("javax.xml.ws.addressing.context.inbound", addrProps);
/* 118 */         msgContext.setScope("javax.xml.ws.addressing.context.inbound", MessageContext.Scope.APPLICATION);
View Full Code Here

/* 114 */     return true;
/*     */   }
/*     */
/*     */   private void handleResponseOrFault(MessageContext msgContext, boolean isFault)
/*     */   {
/* 119 */     SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
/* 120 */     SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
/*     */
/* 122 */     SOAPAddressingProperties inProps = (SOAPAddressingProperties)msgContext.getProperty("javax.xml.ws.addressing.context.inbound");
/* 123 */     SOAPAddressingProperties outProps = (SOAPAddressingProperties)msgContext.getProperty("javax.xml.ws.addressing.context.outbound");
/*     */
/* 125 */     if (outProps == null)
/*     */     {
/* 128 */       outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
/* 129 */       msgContext.setProperty("javax.xml.ws.addressing.context.outbound", outProps);
/*     */     }
/*     */
/* 132 */     outProps.initializeAsReply(inProps, isFault);
/*     */     try
View Full Code Here

/*     */     try
/*     */     {
/* 106 */       SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
/* 107 */       if (soapMessage.getSOAPPart().getEnvelope() != null)
/*     */       {
/* 109 */         SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
/* 110 */         SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
/* 111 */         addrProps.readHeaders(soapMessage);
/* 112 */         msgContext.setProperty("javax.xml.ws.addressing.context", addrProps);
/* 113 */         msgContext.setProperty("javax.xml.ws.addressing.context.inbound", addrProps);
/*     */       }
/*     */     }
View Full Code Here

    return true;
  }

  private void handleResponseOrFault(MessageContext msgContext, boolean isFault)
  {
    SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
    SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();

    SOAPAddressingProperties inProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
    SOAPAddressingProperties outProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND);

    if (outProps == null)
    {
      // create new response properties
      outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
      msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
    }

    outProps.initializeAsReply(inProps, isFault);
View Full Code Here

    try
    {
      SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
      if (soapMessage.getSOAPPart().getEnvelope() != null)
      {
        SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
        SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
        addrProps.readHeaders(soapMessage);
            msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps);
            msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, Scope.APPLICATION);
            msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
            msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
View Full Code Here

TOP

Related Classes of javax.xml.ws.addressing.soap.SOAPAddressingBuilder

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.