We have implemented a CXF client from a counterparty-supplied WSDL.
As we call one operation, we get back a response containing valid
business messages.
However, the RPCInInterceptor throws an exception because it "could not
find matching RPC/Literal part".

We have checked the response, and it contains the element
"outputDataType", which is mentioned in the exception.
In the response, this element's namespace is declared as
"http://www.company.com/soa/SubmitStandardOutput.xsd";.
When we look in the WSDL, I can see that the element outputDataType is
declared in the operation's return type, with the same namespace.
We do not understand why CXF "could not find matching RPC/Literal part".

We understand that CXF does not support RPC/Encoded.
However, we have checked that the WSDL conforms to the RPC/Literal
restrictions:
*       Each message contains zero or more parts.
*       Each part points to a schema type definition that describes the
content of that part. 
*       In the SOAP binding, the style is "RPC" and the use is
"literal".


What are we missing?



---------- EXCEPTION: ----------
Caused by: org.apache.cxf.interceptor.Fault: Found element
{http://www.company.com/soa/SubmitStandardOutput.xsd}outputDataType but
could not find matching RPC/Literal part
        at
org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(R
PCInInterceptor.java:128)

---------- RESPONSE: ----------
<soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <soapenv:Body>
                <ns1:submitDataSetResponse
                        xmlns="http://www.company.com/soa/submitDataSet";
        
xmlns:ns1="http://www.company.com/soa/submitDataSet";>
                        <ns2:outputDataType
        
xmlns="http://www.company.com/soa/SubmitStandardOutput.xsd";
        
xmlns:ns2="http://www.company.com/soa/SubmitStandardOutput.xsd";>
                                <!-- Valid business content, removed
from here for simplicity -->
                        </ns2:outputDataType>
                </ns1:submitDataSetResponse>
        </soapenv:Body>
</soapenv:Envelope>

---------- WSDL: ----------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="some namespaces omitted"
xmlns:typeOut="http://www.company.com/soa/SubmitStandardOutput.xsd";>
        <wsdl:message name="someOpResponse">
                <wsdl:part name="returnData"
type="typeOut:outputDataType">
                        <wsdl:documentation
        
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
                                acknowledge data set submitted
                        </wsdl:documentation>
                </wsdl:part>
        </wsdl:message>
        <wsdl:portType name="SomeOp">
                <wsdl:operation name="someOp">
                        <wsdl:documentation
        
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
                                submit data set
                        </wsdl:documentation>
                        <wsdl:input message="tns:someOpRequest" />
                        <wsdl:output message="tns:someOpResponse" />
                        <wsdl:fault name="faultReturn"
                                message="tns:faultReturnType" />
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="SomeOp_Binding"
                type="tns:SomeOp">
                <soap:binding style="rpc"
                        transport="http://schemas.xmlsoap.org/soap/http";
/>
                <wsdl:operation name="someOp">
                        <soap:operation
        
soapAction="http://www.company.com/soa/2007-08-16/someOp";
                                style="rpc" />
                        <wsdl:input>
                                <mime:multipartRelated>
                                        <mime:part>
                                                <soap:body use="literal"
        
namespace="http://www.company.com/soa/2007-08-16/someOp"; />
                                        </mime:part>
                                        <mime:part>
                                                <mime:content
part="dataSet_attachment"
        
type="application/octetstream" />
                                        </mime:part>
                                </mime:multipartRelated>
                                <soap:header message="tns:someOpHeader"
                                        part="standardAttachmentInfor"
use="literal"
                                        wsdl:required="true">
                                </soap:header>
                                <wsp:Policy
        
xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy";>
                                        <wsp:PolicyReference
URI="#SecurityTokens" />
                                        <wsp:Policy wsu:Id="SignedPart1"
        
xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility";>
                                                <wsp:Policy>
                                                        <wssp:Integrity
wsp:Usage="wsp:Required"
        
xmlns:wssp="http://schemas.xmlsoap.org/ws/2002/12/secext";>
        
<wssp:TokenInfo>
        
<wssp:SecurityToken
        
wsp:Preference="10" wsp:Usage="wsp:Required">
        
<wssp:TokenType>
        
wssp:X509v3
        
</wssp:TokenType>
        
</wssp:SecurityToken>
        
</wssp:TokenInfo>
        
<wssp:MessageParts
        
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
        
xmlns:ns2="http://www.company.com/soa/StandardAttachmentInfor.xsd";>
        
/SOAP-ENV:Envelope/SOAP-ENV:Header/ns2:standardAttachmentInfor
        
</wssp:MessageParts>
        
</wssp:Integrity>
                                                </wsp:Policy>
                                                <wsp:Policy>
                                                        <wssp:Integrity
wsp:Usage="wsp:Required"
        
xmlns:wssp="http://schemas.xmlsoap.org/ws/2002/12/secext";>
        
<wssp:TokenInfo>
        
<wssp:SecurityToken
        
wsp:Preference="10" wsp:Usage="wsp:Required">
        
<wssp:TokenType>
        
wssp:X509v3
        
</wssp:TokenType>
        
</wssp:SecurityToken>
        
</wssp:TokenInfo>
        
<wssp:MessageParts
        
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
        
xmlns:ns1="http://www.company.com/soa/2006-09-30/companyWSHeader.xsd";>
        
/SOAP-ENV:Envelope/SOAP-ENV:Header/ns1:companyWSHeader
        
</wssp:MessageParts>
        
</wssp:Integrity>
                                                </wsp:Policy>
                                                <wsp:Policy>
                                                        <wssp:Integrity
wsp:Usage="wsp:Required"
        
xmlns:wssp="http://schemas.xmlsoap.org/ws/2002/12/secext";>
        
<wssp:TokenInfo>
        
<wssp:SecurityToken
        
wsp:Preference="10" wsp:Usage="wsp:Required">
        
<wssp:TokenType>
        
wssp:X509v3
        
</wssp:TokenType>
        
</wssp:SecurityToken>
        
</wssp:TokenInfo>
        
<wssp:MessageParts
        
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
        
xmlns:ns1="http://www.company.com/soa/schemas/2005/09/attachmenthash";>
        
/SOAP-ENV:Envelope/SOAP-ENV:Header/ns1:attachmentHash
        
</wssp:MessageParts>
        
</wssp:Integrity>
                                                </wsp:Policy>
                                        </wsp:Policy>
                                </wsp:Policy>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal"
        
namespace="http://www.company.com/soa/2007-08-16/someOp"; />
                        </wsdl:output>
                        <wsdl:fault name="faultReturn">
                                <soap:fault name="faultReturn"
use="literal" />
                        </wsdl:fault>
                </wsdl:operation>
        </wsdl:binding>
</wsdl:definitions>

 
 
 
Radu Manolescu
Morgan Stanley | Technology
2000 Westchester Ave, 1st Floor | Purchase, NY  10577
Phone: +1 914 225-5871
[EMAIL PROTECTED]
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

Reply via email to