You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Fabian Linz (JIRA)" <ji...@apache.org> on 2006/07/19 10:55:14 UTC

[jira] Created: (COCOON-1883) SOAPHelper only accepts replies with an XML declaration

SOAPHelper only accepts replies with an XML declaration
-------------------------------------------------------

                 Key: COCOON-1883
                 URL: http://issues.apache.org/jira/browse/COCOON-1883
             Project: Cocoon
          Issue Type: Bug
          Components: Blocks: XSP
    Affects Versions: 2.1.9
            Reporter: Fabian Linz
            Priority: Trivial


The SOAPHelper class [1] forces the SOAP-Reply to start with a XML declaration. I think this should be removed as the WS-I Soap Binding [2] states that an xml declaration is not necessary. So a valid WS-I reply may not work with the SOAPHelper at the moment.

Instead of 
            int startOfXML = ret.indexOf("<?xml");
            if (startOfXML == -1) { // No xml?!
                throw new ProcessingException("Invalid response - no xml");
            }
            return new XScriptObjectInlineXML(
                    xscriptManager,
                    ret.substring(startOfXML));

I just use
            return new XScriptObjectInlineXML(
                    xscriptManager,
                    ret);

I do not know why the position of the declaration is used to substring the answer. Is this necessary? If so would it be enough to just search for the first opening tag?


[1] blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java
[2] http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0-2004-08-24.html#XML_Declarations

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (COCOON-1883) SOAPHelper only accepts replies with an XML declaration

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1883?page=all ]

Jörg Heinicke closed COCOON-1883.
---------------------------------

    Fix Version/s: 2.2-dev (Current SVN)
                   2.1.10-dev (current SVN)
       Resolution: Fixed

Yes, I think your fix is appropriate. The instantiated XScriptObjectInlineXML even has a constructor that - when no string is passed - adds a string just consisting of the XML declaration.

> SOAPHelper only accepts replies with an XML declaration
> -------------------------------------------------------
>
>                 Key: COCOON-1883
>                 URL: http://issues.apache.org/jira/browse/COCOON-1883
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: XSP
>    Affects Versions: 2.1.9
>            Reporter: Fabian Linz
>         Assigned To: Jörg Heinicke
>            Priority: Trivial
>             Fix For: 2.2-dev (Current SVN), 2.1.10-dev (current SVN)
>
>
> The SOAPHelper class [1] forces the SOAP-Reply to start with a XML declaration. I think this should be removed as the WS-I Soap Binding [2] states that an xml declaration is not necessary. So a valid WS-I reply may not work with the SOAPHelper at the moment.
> Instead of 
>             int startOfXML = ret.indexOf("<?xml");
>             if (startOfXML == -1) { // No xml?!
>                 throw new ProcessingException("Invalid response - no xml");
>             }
>             return new XScriptObjectInlineXML(
>                     xscriptManager,
>                     ret.substring(startOfXML));
> I just use
>             return new XScriptObjectInlineXML(
>                     xscriptManager,
>                     ret);
> I do not know why the position of the declaration is used to substring the answer. Is this necessary? If so would it be enough to just search for the first opening tag?
> [1] blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java
> [2] http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0-2004-08-24.html#XML_Declarations

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Assigned: (COCOON-1883) SOAPHelper only accepts replies with an XML declaration

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1883?page=all ]

Jörg Heinicke reassigned COCOON-1883:
-------------------------------------

    Assignee: Jörg Heinicke

> SOAPHelper only accepts replies with an XML declaration
> -------------------------------------------------------
>
>                 Key: COCOON-1883
>                 URL: http://issues.apache.org/jira/browse/COCOON-1883
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: XSP
>    Affects Versions: 2.1.9
>            Reporter: Fabian Linz
>         Assigned To: Jörg Heinicke
>            Priority: Trivial
>
> The SOAPHelper class [1] forces the SOAP-Reply to start with a XML declaration. I think this should be removed as the WS-I Soap Binding [2] states that an xml declaration is not necessary. So a valid WS-I reply may not work with the SOAPHelper at the moment.
> Instead of 
>             int startOfXML = ret.indexOf("<?xml");
>             if (startOfXML == -1) { // No xml?!
>                 throw new ProcessingException("Invalid response - no xml");
>             }
>             return new XScriptObjectInlineXML(
>                     xscriptManager,
>                     ret.substring(startOfXML));
> I just use
>             return new XScriptObjectInlineXML(
>                     xscriptManager,
>                     ret);
> I do not know why the position of the declaration is used to substring the answer. Is this necessary? If so would it be enough to just search for the first opening tag?
> [1] blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java
> [2] http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0-2004-08-24.html#XML_Declarations

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira