/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* XML (infoset) over HTTP binding {@link Codec}.
* <p>
* Support FI for MessageDataSource
*
* @author Jitendra Kotamraju
*/
/**
* Base HTTP Accept request-header.
*/
"*";
/**
* Fast Infoset MIME type.
*/
/**
* True if the Fast Infoset codec should be used
*/
private boolean useFastInfosetForEncoding;
/**
* The XML codec
*/
/**
* The FI codec
*/
/**
* The Accept header for XML encodings
*/
/**
* The Accept header for Fast Infoset and XML encodings
*/
private static final String fiXmlAccept = APPLICATION_FAST_INFOSET_MIME_TYPE + ", " + BASE_ACCEPT_VALUE;
// TODO: need to compose based on underlying codecs
} else {
}
_c = c;
return this;
}
return _c.getContentType();
}
return _c.getSOAPActionHeader();
}
return _accept;
}
}
fiCodec = getFICodec();
}
return null;
}
if (mds.hasUnconsumedDataSource()) {
: null;
}
}
: null;
}
if (mds.hasUnconsumedDataSource())
}
}
throw new UnsupportedOperationException();
}
/**
* Reset the encoding state when on the server side for each
*/
useFastInfosetForEncoding = false;
if (contentType == null) {
} else if (isMultipartRelated(contentType)) {
} else if(isFastInfoset(contentType)) {
}
useFastInfosetForEncoding = true;
} else if (isXml(contentType)) {
} else {
}
if (!useFastInfosetForEncoding) {
}
}
// This method will never be invoked
}
return new XMLHTTPBindingCodec(binding);
}
}
}
|| (compareStrings(contentType, "application/")&&(contentType.toLowerCase().indexOf("+xml") != -1));
}
}
a.substring(0,
b.length()));
}
while (st.hasMoreTokens()) {
return true;
}
}
return false;
}
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
try {
byte[] buf = new byte[1024];
int count;
}
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
/**
* The following logic is only for outbound packets
* to be encoded by client.
* On the server the p.contentNegotiation == null.
*/
// The client may have changed the negotiation property from
// pessismistic to none between invocations
useFastInfosetForEncoding = false;
// Always encode using Fast Infoset if in optimisitic mode
useFastInfosetForEncoding = true;
}
}
public static boolean requiresTransformationOfDataSource(
boolean isFastInfoset, boolean useFastInfoset) {
}
try {
if (isFastInfoset && !useFastInfoset) {
// Convert from Fast Infoset to XML
p.getMessage().getAttachments();
} else if (!isFastInfoset && useFastInfoset) {
// Convert from XML to Fast Infoset
p.getMessage().getAttachments();
}
throw new WebServiceException(ex);
}
return in;
}
/**
* Obtain an FI SOAP codec instance using reflection.
*/
try {
} catch (Exception e) {
return null;
}
}
}