src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java

Print this page




1406         }
1407     }
1408 
1409     private boolean shouldUseMtomOutbound() {
1410         //Use the getter to make sure all the logic is executed correctly
1411         MTOMFeature myMtomFeature = getMtomFeature();
1412         if(myMtomFeature != null && myMtomFeature.isEnabled()) {
1413             //On client, always use XOP encoding if MTOM is enabled
1414             //On Server, mtomAcceptable and mtomRequest will be set - use XOP encoding
1415             //if either request is XOP encoded (mtomRequest) or
1416             //client accepts XOP encoding (mtomAcceptable)
1417             if (getMtomAcceptable() == null && getMtomRequest() == null) {
1418                 return true;
1419             } else {
1420                 if (getMtomAcceptable() != null &&  getMtomAcceptable() && getState().equals(State.ServerResponse)) {
1421                     return true;
1422                 }
1423                 if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ServerResponse)) {
1424                     return true;
1425                 }



1426             }
1427         }
1428         return false;
1429     }
1430 
1431     private boolean isMtomContentType() {
1432         return (getInternalContentType() != null) &&
1433         (getInternalContentType().getContentType().contains("application/xop+xml"));
1434     }
1435 
1436     /**
1437      * @deprecated
1438      */
1439     public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) {
1440         super.addSatellite(satellite);
1441     }
1442 
1443     /**
1444      * @deprecated
1445      */




1406         }
1407     }
1408 
1409     private boolean shouldUseMtomOutbound() {
1410         //Use the getter to make sure all the logic is executed correctly
1411         MTOMFeature myMtomFeature = getMtomFeature();
1412         if(myMtomFeature != null && myMtomFeature.isEnabled()) {
1413             //On client, always use XOP encoding if MTOM is enabled
1414             //On Server, mtomAcceptable and mtomRequest will be set - use XOP encoding
1415             //if either request is XOP encoded (mtomRequest) or
1416             //client accepts XOP encoding (mtomAcceptable)
1417             if (getMtomAcceptable() == null && getMtomRequest() == null) {
1418                 return true;
1419             } else {
1420                 if (getMtomAcceptable() != null &&  getMtomAcceptable() && getState().equals(State.ServerResponse)) {
1421                     return true;
1422                 }
1423                 if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ServerResponse)) {
1424                     return true;
1425                 }
1426                 if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ClientRequest)) {
1427                     return true;
1428                 }
1429             }
1430         }
1431         return false;
1432     }
1433 
1434     private boolean isMtomContentType() {
1435         return (getInternalContentType() != null) &&
1436         (getInternalContentType().getContentType().contains("application/xop+xml"));
1437     }
1438 
1439     /**
1440      * @deprecated
1441      */
1442     public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) {
1443         super.addSatellite(satellite);
1444     }
1445 
1446     /**
1447      * @deprecated
1448      */