Package javax.xml.ws.addressing

Examples of javax.xml.ws.addressing.AddressingException


         {
            xmlBuffer.append(obj);
         }
         else
         {
            throw new AddressingException("Unsupported element: " + obj.getClass().getName());
         }
      }
   }
View Full Code Here


            msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
         }
      }
      catch (SOAPException ex)
      {
         throw new AddressingException("Cannot handle response", ex);
      }

      return true;
   }
View Full Code Here

  private boolean mustunderstand;

  private String getRequiredHeaderContent(SOAPHeader soapHeader, QName qname)
  {
    Element element = DOMUtils.getFirstChildElement(soapHeader, qname);
    if(null == element) throw new AddressingException("Required element "+qname+" is missing");

    String value = DOMUtils.getTextContent(element);
    if(null == value || value.equals("")) throw new AddressingException("Required element "+qname+" is missing");
   
    return value;
  }
View Full Code Here

        }
      }
    }
    catch (SOAPException ex)
    {
      throw new AddressingException("Cannot read headers", ex);
    }
    catch (URISyntaxException ex)
    {
      throw new AddressingException("Cannot read headers", ex);
    }
  }
View Full Code Here

      appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction());
     
      // Write wsa:MessageID
      if( (getReplyTo()!=null || getFaultTo()!=null) && null==getMessageID())
      {
        throw new AddressingException("Required addressing header missing:" + ADDR.getMessageIDQName());
      }
      else if (getMessageID() != null)
      {
        SOAPElement wsaMessageId = soapHeader.addChildElement(new NameImpl(ADDR.getMessageIDQName()));
        wsaMessageId.addTextNode(getMessageID().getURI().toString());
      }

      // Write wsa:RelatesTo
      if (getRelatesTo() != null)
      {
        for (Relationship rel : getRelatesTo())
        {
          SOAPElement wsaRelatesTo = soapHeader.addChildElement(new NameImpl(ADDR.getRelatesToQName()));
          if (rel.getType() != null)
          {
            wsaRelatesTo.setAttribute(ADDR.getRelationshipTypeName(), getQualifiedName(rel.getType()));
          }
          wsaRelatesTo.addTextNode(rel.getID().toString());
        }
      }

      // Write wsa:ReferenceParameters
      ReferenceParameters refParams = getReferenceParameters();
      if (refParams.getElements().size() > 0)
      {
            for (Object obj : refParams.getElements())
            {
               SOAPElement refElement = appendElement(soapHeader, obj);
               QName refQName = new QName(ADDR.getNamespaceURI(), "IsReferenceParameter", ADDR.getNamespacePrefix());
               refElement.addAttribute(refQName, "true");
            }
      }

      appendElements(soapHeader, getElements());
    }
    catch (SOAPException ex)
    {
      throw new AddressingException("Cannot read ws-addressing headers", ex);
    }
  }
View Full Code Here

  }

  private void appendRequiredHeader(SOAPHeader soapHeader, QName name, AttributedURI value) throws SOAPException
  {
    if(null == value)
      throw new AddressingException("Required addressing property missing: " + name);
   
    SOAPElement element = soapHeader.addChildElement(new NameImpl(name));
    element.addTextNode(value.getURI().toString());

    if(mustunderstand)
View Full Code Here

    {
      throw rte;
    }
    catch (Exception ex)
    {
      throw new AddressingException("Cannot append elements", ex);
    }
  }
View Full Code Here

            child = factory.createElement(el);
            soapElement.addChildElement(child);
         }
         else
         {
            throw new AddressingException("Unsupported element: " + obj.getClass().getName());
         }
         return child;
      }
      catch (RuntimeException rte)
      {
         throw rte;
      }
      catch (Exception ex)
      {
         throw new AddressingException("Cannot append elements", ex);
      }
   }
View Full Code Here

            msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
         }
      }
      catch (SOAPException ex)
      {
         throw new AddressingException("Cannot handle response", ex);
      }

      return true;
   }
View Full Code Here

  private boolean mustunderstand;

  private String getRequiredHeaderContent(SOAPHeader soapHeader, QName qname)
  {
    Element element = DOMUtils.getFirstChildElement(soapHeader, qname);
    if(null == element) throw new AddressingException("Required element "+qname+" is missing");

    String value = DOMUtils.getTextContent(element);
    if(null == value || value.equals("")) throw new AddressingException("Required element "+qname+" is missing");
   
    return value;
  }
View Full Code Here

TOP

Related Classes of javax.xml.ws.addressing.AddressingException

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.