You should try with servicemix-http which handle soap faults.
SAAJ does not, unfortunately.
Cheers,
Guillaume Nodet
On 6/22/06, PeteTh <[EMAIL PROTECTED]> wrote:
I'm using the SaajBinding / SaajMarshaller to send a soap message to a
webservice.
All works fine if I get a normal response, however, if we get a SoapFault
back then the element values inside the soap fault e.g.
<faultcode>soap:Client</faultcode>
<faultstring>Maximum amount exceeded passed in Mortgage Criteria
Parameter name: [ValidateCriteria].[strCriteria.6]</faultstring>
becomes
<faultcode/><faultstring/>
onces its gone through the SaajMarshaller !
I've stepped thru the toNMS() code in SaajMarshaler and can see at this
point the message is ok.
1)
the
normalizedMessage.setContent(new DOMSource(elem));
correctly sets the content to
content= javax.xml.transform.dom.DOMSource (id=6358)
node= org.apache.axis.message.SOAPFault (id=6328)
systemID= null
tostring on the node gives :-
2)
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>soap:Client</faultcode>
<faultstring>Maximum amount exceeded passed in Mortgage Criteria
Parameter name: [ValidateCriteria].[strCriteria.6]</faultstring>
<faultactor>http://www.moneyfactswebservices.com/foxtrot/mortgage.asmx
</faultactor>
<detail/>
</soapenv:Fault>
3) At the point of
answer(exchange, outMessage);
the outMessage looks fine e.g.
outMessage= org.apache.servicemix.jbi.messaging.NormalizedMessageImpl
(id=6296)
transformer= org.apache.servicemix.jbi.jaxp.SourceTransformer
(id=5835)
attachments= null
body= null
content= javax.xml.transform.dom.DOMSource (id=6358)
node= org.apache.axis.message.SOAPFault (id=6328)
systemID= null
exchange= org.apache.servicemix.jbi.messaging.InOutImpl (id=6291)
properties= java.util.HashMap<K,V> (id=6298)
securitySubject= null
4) Then going to
answer(MessageExchange exchange, NormalizedMessage answer)
where code calls
exchange.setMessage(answer, "out");
after this it seems wrong toString () on
exchange= org.apache.servicemix.jbi.messaging.InOutImpl (id=6291)
gives
MessageExchange[
id: ID:dev-pthomas-3501-1150904447700-51:4
status: Active
role: provider
service: {http://mform.rdf.com/esb/}mortgageSearchSingleApplicant
endpoint: mortgageSearchSingleApplicant
in: <?xml version="1.0"
encoding="UTF-8"?><SingleApplicantMortgageIllustration
xmlns="http://www.moneyfactswebservices.com/
"><authentication><authenticationid>8C310A80-A946-11DA-A746-0800200C9A66</authenticationid></authentication><firstapplicant><salary>
2000.0</salary><guaranteedovertime>0.0
</guaranteedovertime><nonguaranteedovertime>0.0
</nonguaranteedovertime><age>31</age><employmentstatus>FullTime</employmentstatus><profession>NoPreference</profession><fullstatusnumberofyearsaccounts>NoPreference</fullstatusnumberofyearsaccounts><selfcertnumberofyearsaccounts>NoPreference</selfcertnumberofyearsaccounts><creditimpaired>NoPreference</creditimpaired></firstapplicant><criteria><producttype>19</producttype><repaymentmethod>Repayment</repaymentmethod><repaymentmethodfeatures>0</repaymentmethodfeatures><mortgageperiod>0</mortgageperiod><mortgageperiodcontrol>PeriodAppliesToAllSteps</mortgageperiodcontrol><mortgageamount>
1200000.0</mortgageamount><propertyprice>200000.0
</propertyprice><mortgageterm>600</mortgageterm><mortgagetype>Residential</mortgagetype></criteria><options><redemptionpenalty>WithoutExtendedTieIn</redemptionpenalty><compulsoryinsurance>RequiredNotWithLenderAndNoInsurancesRequired</compulsoryinsurance><directbusiness>NoPreference</directbusiness><intermediarybusiness>NoPreference</intermediarybusiness><interestcalculated>0</interestcalculated><tracker>NoPreference</tracker><trackercontrol>ExcludeTracker</trackercontrol><flexible>8</flexible><flexiblecontrol>FlexibleCo...
out: <?xml version="1.0" encoding="UTF-8"?><soap:Fault
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema
"><faultcode/><faultstring/><faultactor/><detail/></soap:Fault>
Any ideas / fixes mist appreciated.
get removed.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Maximum amount exceeded passed in Mortgage Criteria
Parameter name: [ValidateCriteria].[strCriteria.6]</faultstring>
<faultactor>http://www.moneyfactswebservices.com/foxtrot/mortgage.asmx
</faultactor>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
--
View this message in context:
http://www.nabble.com/SAAJMarshaller---soapfault-content-getting-removed-t1830872.html#a4995651
Sent from the ServiceMix - User forum at Nabble.com.