cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KnutIvar <knut.ivar.skogl...@gmail.com>
Subject Re: Client side; service returns fault; Unmarshalling Error: unexpected element
Date Tue, 02 Feb 2010 18:27:23 GMT

So the response should look like this?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soapenv:Body> 
      <soapenv:Fault>
        <om-v1-0:createAndStartRequestByValueException 
                xmlns:om-v1-0="http://os.org/xml/Management/v1-0" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:co-v1-5="http://os.org/xml/Common/v1-5" 
                xmlns:jrc-v2-0="http://jrc.com/ossj/xml/Common/v2-0"> 
            <om-v1-0:createException xsi:type="jrc-v2-0:JrCreateException"> 
                <co-v1-5:message></co-v1-5:message> 
                <jrc-v2-0:jrExceptionDetails> 
                    <jrc-v2-0:errorCode>60003</jrc-v2-0:errorCode> 
                    <jrc-v2-0:retryable>false</jrc-v2-0:retryable> 
                    <jrc-v2-0:errorMessage>Order state
invalid.</jrc-v2-0:errorMessage> 
                   
<jrc-v2-0:component>com.jr.ordermanager</jrc-v2-0:component> 
                    <jrc-v2-0:severity>Medium</jrc-v2-0:severity> 
                    <jrc-v2-0:reason>No subscriber found for
productExternalID [98802-1]</jrc-v2-0:reason> 
                   
<jrc-v2-0:requestPrimaryKey>936</jrc-v2-0:requestPrimaryKey> 
                </jrc-v2-0:jrExceptionDetails> 
            </om-v1-0:createException> 
        </om-v1-0:createAndStartRequestByValueException> 
      </soapenv:Fault>
    </soapenv:Body> 
</soapenv:Envelope>

I think I did try that........ and it gave me a similar exception...
I'll try more.. (don't have the full environment on the current computer).

Thank you!


dkulp wrote:
> 
> 
> Oh.  You are putting what should be in a soap:Fault into the soap:Body.   
> Since it's not a soap:Fault, it's trying to process it as a reponse, not a 
> fault.  Thus, the message really isn't valid.   If it's a fault, it shoudl
> be 
> a soap:Fault.
> 
> Dan
> 
> 
> On Tue February 2 2010 1:10:51 pm KnutIvar wrote:
>> It looks like this...;
>> 
>> <element name="createAndStartRequestByValueException">
>>     <complexType>
>>         <choice>
>>             <element name="ossIllegalArgumentException"
>> type="co-v1-5:OssIllegalArgumentException"/>
>>             <element name="remoteException"
>>  type="co-v1-5:RemoteException"/> <element name="objectNotFoundException"
>> type="co-v1-5:ObjectNotFoundException"/>
>>             <element name="duplicateKeyException"
>> type="co-v1-5:DuplicateKeyException"/>
>>             <element name="createException"
>>  type="co-v1-5:CreateException"/> </choice>
>>     </complexType>
>> </element>
>> 
>> As you can see; it has the createExceptionElement as a choice.
>> 
>> However; the requestKey appears here;
>> 
>> <element name="createAndStartRequestByValueResponse">
>>     <complexType>
>>         <sequence>
>>             <element name="requestKey" type="om-v1-0:RequestKey"  />
>>         </sequence>
>>     </complexType>
>> </element>
>> 
>> ... and more about the request (from the wsdl);
>> <wsdl:operation name="createAndStartRequestByValue">
>>     <soap:operation soapAction="createAndStartRequestByValue"
>> style="document"/>
>>     <wsdl:input name="createAndStartRequestByValueRequest">
>> 	<soap:body parts="parameters" use="literal"/>
>>     </wsdl:input>
>>     <wsdl:output name="createAndStartRequestByValueResponse">
>> 	<soap:body parts="parameters" use="literal"/>
>>     </wsdl:output>
>>     <wsdl:fault name="createAndStartRequestByValueException">
>> 	<soap:fault name="createAndStartRequestByValueException" use="literal"/>
>>     </wsdl:fault>
>> </wsdl:operation>
>> 
>> ... It looks ok to me...
>> 
>> dkulp wrote:
>> > What does the schema look like for the
>> > createAndStartRequestByValueException
>> > element?    From that error message, it looks like
>> > createAndStartRequestByValueException is not allowed to have a
>> > "createException" child element.   The only expected element is a
>> > "requestKey"
>> > element.
>> >
>> > Dan
>> 
>> -----
>> http://www.knutivars.net www.knutivars.net
>> "http://www.knutivars.net/cxf/index.html Document first Apache CXF and
>> XMLBeans with Spring.
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 


-----
http://www.knutivars.net www.knutivars.net 
"http://www.knutivars.net/cxf/index.html Document first Apache CXF and
XMLBeans with Spring. 
-- 
View this message in context: http://old.nabble.com/Client-side--service-returns-fault--Unmarshalling-Error%3A-unexpected-element-tp27417976p27425106.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message