< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -155,10 +155,15 @@
      * @param packet The packet that owns the Message
      * @return Created SOAPMessage
      * @throws SOAPException if SAAJ processing fails
      */
     public static SOAPMessage read(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException {
+        SAAJFactory saajfac = packet.getSAAJFactory();
+        if (saajfac != null) {
+            SOAPMessage msg = saajfac.readAsSOAPMessage(soapVersion, message, packet);
+            if (msg != null) return msg;
+        }
         for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
             SOAPMessage msg = s.readAsSOAPMessage(soapVersion, message, packet);
             if (msg != null)
                 return msg;
         }

@@ -171,10 +176,15 @@
      * @param packet Packet
      * @return Created SAAJPMessage
      * @throws SOAPException if SAAJ processing fails
      */
     public static SAAJMessage read(Packet packet) throws SOAPException {
+        SAAJFactory saajfac = packet.getSAAJFactory();
+        if (saajfac != null) {
+            SAAJMessage msg = saajfac.readAsSAAJ(packet);
+            if (msg != null) return msg;
+        }
         // Use the Component from the Packet if it exists.  Note the logic
         // in the ServiceFinder is such that find(Class) is not equivalent
         // to find (Class, null), so the ternary operator is needed.
         ServiceFinder<SAAJFactory> factories = (packet.component != null ?
                 ServiceFinder.find(SAAJFactory.class, packet.component) :
< prev index next >