Please ignore the previous suggested fix, there is still a problem with the
response XML being truncated, but my suggestion was invalid.
So I still have two issues :-
1) Response XML is being truncated (I notice it is going thru StaxSource).
2) When I get a SoapFault (example below), I still get a NullPointer,
debugging I can see the
normalizedMessage.setProperty(SOAP_FAULT_CODE, fault.getCode());
happening in JBIMarshaler , but then I get :-
11:10:34,572 INFO [HttpMethodBase] Discarding unexpected response: HTTP/1.1
100 Continue
11:10:50,253 WARN [jetty] /:
java.lang.NullPointerException
at
org.apache.servicemix.components.http.HttpMarshaler.toResponse(HttpMarshaler.java:115)
at
org.apache.servicemix.components.http.HttpInOutBinding.processInOut(HttpInOutBinding.java:68)
at
org.apache.servicemix.components.http.HttpInOutBinding.process(HttpInOutBinding.java:44)
at
org.apache.servicemix.components.http.BindingServlet.doPost(BindingServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:355)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:567)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.mortbay.jetty.Server.handle(Server.java:244)
at
org.mortbay.jetty.HttpConnection.handlerRequest(HttpConnection.java:360)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:628)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:611)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:197)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:288)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:180)
Example Response XML
HTTP/1.1 100 Continue
Via: 1.1 NEI-APPLIANCE
HTTP/1.1 500 Internal Server Error.
Via: 1.1 NEI-APPLIANCE
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Length: 584
Date: Tue, 27 Jun 2006 10:00:12 GMT
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
<?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.blah/blah.asmx</faultactor>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
XML Config is
<!-- Http based client recieve/send html request/response passes message to
a router component-->
<sm:activationSpec componentName="httpReceiver"
service="mform:httpBinding" endpoint="httpReceiver"
destinationService="mform:router">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="org.apache.servicemix.components.http.HttpConnector">
<property name="host" value="localhost"
/>
<property name="port" value="8912" />
<property name="marshaler">
<bean
class="org.apache.servicemix.components.http.HttpMarshaler" />
</property>
</bean>
</sm:component>
</sm:activationSpec>
then there is an eip router that routes to
<sm:component>
<http:component>
<http:endpoints>
<http:endpoint service="my:search"
endpoint="search"
role="provider"
soap="true"
soapAction="http://www.blah.com/blah"
locationURI="http://www.blah.com:80/blah.asmx"/>
</http:endpoints>
</http:component>
</sm:component>
--
View this message in context:
http://www.nabble.com/SAAJMarshaller---soapfault-content-getting-removed-tf1830872.html#a5063334
Sent from the ServiceMix - User forum at Nabble.com.