You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Steven Hawkins (JIRA)" <ji...@apache.org> on 2012/11/01 18:33:12 UTC

[jira] [Created] (CXF-4608) DOMSource is returned rather than StAXSource

Steven Hawkins created CXF-4608:
-----------------------------------

             Summary: DOMSource is returned rather than StAXSource
                 Key: CXF-4608
                 URL: https://issues.apache.org/jira/browse/CXF-4608
             Project: CXF
          Issue Type: Bug
          Components: Services
    Affects Versions: 2.4.2
            Reporter: Steven Hawkins


A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.

For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:

{code}
Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
StAXSource result = dispatch.invoke(someDoc);
{code}



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488968#comment-13488968 ] 

Daniel Kulp commented on CXF-4608:
----------------------------------


Updated the test for that:

http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?r1=1404730&r2=1404731

and it still works fine.   Any chance you can create a full small testcase?  Preferably maven based.   I'm really not sure what would be causing any difference at this point.  :-(
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-4608:
-----------------------------

    Fix Version/s: NeedMoreInfo
    
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488972#comment-13488972 ] 

Daniel Kulp commented on CXF-4608:
----------------------------------


It something in the code around setting the operation name.  If you instead do:

{code}
        dispatch.getRequestContext().put("SOAPAction",
                                         "http://www.xignite.com/services/GetFundQuote");
{code}

then it does work.    Still digging, but found a workaround.

                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Steven Hawkins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488951#comment-13488951 ] 

Steven Hawkins commented on CXF-4608:
-------------------------------------

This still failed for me when I updated to 2.7.0.  Does it matter that I'm using javax.xml.ws.Service.create vs. the unit test using new SoapService?
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Steven Hawkins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489079#comment-13489079 ] 

Steven Hawkins commented on CXF-4608:
-------------------------------------

Thanks for the fix.  Is specifying just the soap action a suitable workaround for 2.4?
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>            Assignee: Daniel Kulp
>             Fix For: 2.5.7, 2.6.4, 2.7.1
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4608.
------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: NeedMoreInfo)
                   2.7.1
                   2.6.4
                   2.5.7
         Assignee: Daniel Kulp


Fixes committed to the various branches.
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>            Assignee: Daniel Kulp
>             Fix For: 2.5.7, 2.6.4, 2.7.1
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Steven Hawkins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488984#comment-13488984 ] 

Steven Hawkins commented on CXF-4608:
-------------------------------------

It's the setting of the WSDL_OPERATION that seems to be causing the issue. On 2.4.6 and 2.7.0 even if I set the soapaction, as long as the wsdl_operation is set then I'll get the wrong result.
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489407#comment-13489407 ] 

Daniel Kulp commented on CXF-4608:
----------------------------------


It kind of depends on what you need from the WSDL.   If you just need the SOAPAction, then the action fix is definitely usable.   If you need more than that (primarily would be things like WS-Security Policy fragments or similar), then a deeper workaround would be needed.
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>            Assignee: Daniel Kulp
>             Fix For: 2.5.7, 2.6.4, 2.7.1
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488969#comment-13488969 ] 

Daniel Kulp commented on CXF-4608:
----------------------------------


Actually, was just able to reproduce it....  digging in.
                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4608) DOMSource is returned rather than StAXSource

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488923#comment-13488923 ] 

Daniel Kulp commented on CXF-4608:
----------------------------------

Can you try with a newer version of CXF?

I just added a system test to our test suite:

http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?r1=1404719&r2=1404718&pathrev=1404719

to test the StAXSource with the Dispatch and it works perfectly.   The returned value is a proper StAXSource.


                
> DOMSource is returned rather than StAXSource
> --------------------------------------------
>
>                 Key: CXF-4608
>                 URL: https://issues.apache.org/jira/browse/CXF-4608
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.4.2
>            Reporter: Steven Hawkins
>             Fix For: NeedMoreInfo
>
>
> A Service created from a WSDL that has doc literal wrapped operations will always return DOMSource regardless of the source type requested by the Dispatch.invoke method.
> For example using a WSDL such as: http://www.xignite.com/xQuotes.asmx?WSDL, the following code highlights the issue with a class cast exception on the last line:
> {code}
> Service service = Service.create(wsdl, new QName("http://www.xignite.com/services/", "XigniteQuotes"));
> Dispatch<T> dispatch = wsdlService.createDispatch(new QName("http://www.xignite.com/services/", "XigniteQuotesSoap"), StAXSource.class, Service.Mode.PAYLOAD);
> QName opQName = new QName("http://www.xignite.com/services/", "GetFundQuote");
> dispatch.getRequestContext().put(MessageContext.WSDL_OPERATION, opQName); 
> StAXSource result = dispatch.invoke(someDoc);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira