Am Donnerstag, den 26.07.2007, 23:42 +0000 schrieb [EMAIL PROTECTED]:
> + } else if (message.getVersion() instanceof Soap12) {
> + String ct = (String) message.get(Message.CONTENT_TYPE);
> +
> + if (ct == null) {
> + return;
> + }
> +
> + int start = ct.indexOf("action=");
> + if (start != -1) {
> + int end;
> + if (ct.charAt(start + 7) == '\"') {
> + start += 8;
> + end = ct.indexOf('\"', start);
> + } else {
> + start += 7;
> + end = ct.indexOf(';', start);
> + if (end == -1) {
> + end = ct.length();
> + }
> + }
> +
> + getAndSetOperation(message, ct.substring(start, end));
> + }
> + }
> + }
> +
> + private void getAndSetOperation(SoapMessage message, String action) {
> + if ("".equals(action)) {
> + return;
> + }
> +
According to the RFC below[1] (2/Registration, Optional Parameters,
"action"), the URI reference to the action parameter "MUST" be non-empty
or apparently (?) it's an error. Should the code above therefore
return an error if there is an action parameter but no URI value--I
don't know what the present consequences of just returning from
getAndSetOperation() are if action's URI is empty.
Also, while I'm on this topic, the org.apache.cxf.binding.soap.Soap12
class[2] returns a hardcoded "application/soap+xml" for getContentType()
(a carryover from the "text/xml" that class Soap11's version returns.)
Does/Will it matter that Soap12's getContentType() does not return the
possible "action" parameter value as well?
Glen
[1] http://www.ietf.org/rfc/rfc3902.txt
[2, line 137]
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java?annotate=481043