cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hall (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-247) HTTP POST SOAP Requests not working.
Date Thu, 16 Nov 2006 21:40:39 GMT
     [ http://issues.apache.org/jira/browse/CXF-247?page=all ]

Jonathan Hall updated CXF-247:
------------------------------

    Attachment: BodyNotRequired.patch

Patch for if a Body tag is NOT REQUIRED in a SOAP Message

> HTTP POST SOAP Requests not working.
> ------------------------------------
>
>                 Key: CXF-247
>                 URL: http://issues.apache.org/jira/browse/CXF-247
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>    Affects Versions: 2.0-M1
>            Reporter: Jonathan Hall
>         Attachments: BodyNotRequired.patch, BodyRequired.patch
>
>
> When sending a request in the form of the example below, I recieve a no such method Body
error.
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Body>
>      <getProductDetails xmlns="http://warehouse.example.com/ws">
>        <productID>827635</productID>
>      </getProductDetails>
>    </soap:Body>
>  </soap:Envelope>
> This is caused by a .getLocalName() call returning the <soap:Body> element in WrappedInInterceptor.java.
As far as I am aware, all SOAP messages require a body, so the following should fix it:
> WrappedInInterceptor.java
>  public void handleMessage(Message message) { ...
> if (operation == null) {
> // Added code
>        try {
>                     xmlReader.nextTag();       	
>                 } catch (Exception e) {
>                     throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION_ELEMENT",
BUNDLE));
>                 }  
> // End of added code
>        String local = xmlReader.getLocalName(); ...
> If I am mistaken and a Body element is not always required :
>  public void handleMessage(Message message) { ...
> if (operation == null) {
> // Added code
>             if (xmlReader.getLocalName().equals("Body")) {
>                 try {
>                     xmlReader.nextTag();       	
>                 } catch (Exception e) {
>                     throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION_ELEMENT",
BUNDLE));
>                 }  
>             }
> // End of added code
>        String local = xmlReader.getLocalName(); ...

-- 
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

        

Mime
View raw message