Ejemplo n.º 1
0
 private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
   try {
     if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
       return WSDLBoundOperation.ANONYMOUS.required;
     } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
       return WSDLBoundOperation.ANONYMOUS.prohibited;
     }
   } catch (NoSuchMethodError e) {
     // Ignore error, defaut to optional
   }
   // wsaw wsdl binding case will have some value set on wbo
   return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
 }
Ejemplo n.º 2
0
  @Override
  protected void checkMandatoryHeaders(
      Packet packet,
      boolean foundAction,
      boolean foundTo,
      boolean foundReplyTo,
      boolean foundFaultTo,
      boolean foundMessageId,
      boolean foundRelatesTo) {
    super.checkMandatoryHeaders(
        packet, foundAction, foundTo, foundReplyTo, foundFaultTo, foundMessageId, foundRelatesTo);

    // find Req/Response or Oneway using WSDLModel(if it is availabe)
    WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
    // Taking care of protocol messages as they do not have any corresponding operations
    if (wbo != null) {
      // if two-way and no wsa:MessageID is found
      if (!wbo.getOperation().isOneWay() && !foundMessageId) {
        throw new MissingAddressingHeaderException(addressingVersion.messageIDTag, packet);
      }
    }
  }