Package javax.xml.ws.addressing

Examples of javax.xml.ws.addressing.AddressingException


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

      return true;
   }
View Full Code Here


      {
         throw rte;
      }
      catch (Exception ex)
      {
         throw new AddressingException("Cannot init EPR from element", ex);
      }
   }
View Full Code Here

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

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

    return true;
  }
View Full Code Here

                msgContext.setScope(MessageContext.REFERENCE_PARAMETERS, Scope.APPLICATION);
             }
    }
    catch (SOAPException ex)
    {
      throw new AddressingException("Cannot handle response", ex);
    }

    return true;
  }
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

            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

      {
         throw rte;
      }
      catch (Exception ex)
      {
         throw new AddressingException("Cannot init EPR from element", ex);
      }
   }
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.