5

I'm using Coldfusion 10 to build a SOAP webservice, I am running on IIS 7.5, Coldfusion connects to a standalone Java Tomcat server via the AJP 1.3 connector.

I'm hitting what seems to be a 4-8KB limit on the size of SOAP requests that my server will accept, if it goes over that limit the connection is reset - no error is shown.

But in my CF log I get:

The fault returned when invoking the web service operation is:<br> <pre>org.apache.axis2.AxisFault: Connection reset    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)      at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:402)      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)   at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)    at reverserisk_ncm.Reverserisk_ncmStub.dumpHeader(Reverserisk_ncmStub... The specific sequence of files included or processed is: C:\rr1.5\Clarence\webservice\test_ncm.cfm, line: 36

I've tried a few things, first I ensured it was a size limit, adding a sleep for 30s yielded the same results so then I tried:

  1. Coldfusion Max POST size data set to a high value
  2. IIS server configuration - system.web/httpRuntime.maxRequestLength -> maxInt and security.requestFilter.maxAllowedContentLength
  3. Apache Tomcat: conf/server.xml - AJP 1.3 Connector maxPostSize/maxSavePostSize value -> 2MB
  4. Changing the Axis2.xml from HTTP/1.1 to HTTP/1.0 to force disabling of transfer-encoding "chunked" - I read this may be a security feature against DDOS attacks

If anyone has run into a similar issue that'd be great, I know this may be a ServerFault question too - but hopefully someone doing SOAP on CF has seen something similar, thanks!

Nix
  • 57,072
  • 29
  • 149
  • 198
Clarence Liu
  • 3,874
  • 2
  • 25
  • 29

2 Answers2

0

Just wondering, are you required to Axis 2? Could you try Axis 1 and see what happens? CF 10 will let you change that setting in the admin interface.

Another thing I'd recommend is tailing CF's logs and watching to see if any messages are reported to the console when this happens.

Here are a couple other things to test:

1) If you do not own the Web Service you're connecting to, try downloading the WSDL and associating it with your own CFC. The CFC doesn't have to have any implementation, we're just curious to see if you can get a different error when not calling to the other service.

2) Can you narrow down the size that is the problem? For example, if you tweak the size of the WSDL to make it small enough that it works and then slowly tweak it's size larger and larger, can you find a size for the WSDL that always causes your problem?

3) Have you tried deleting the web service proxies that CF creates? They're under {coldfusion10}/cfusion/wwwroot/WEB-INF/cfclasses, I think.

Basically, I think you need to find a way past the silent failure into something more informative.

Doug Hughes
  • 931
  • 1
  • 9
  • 21
  • I tried Axis 1 already, this set it back to HTTP/1.0, and removed transfer-encoding chunked, I thought this was a step in the right direction but it didn't change anything. – Clarence Liu Jan 14 '13 at 19:10
  • 1. I am writing both the client/webservice to test on, 2. 5000 characters (regular encoding so assuming 1 byte per char) in the argument string is the limit, probably a bit more than that but it's between 5000 and 6000. I did add the coldfusion error to my original question, but it's pretty vague – Clarence Liu Jan 14 '13 at 19:48
  • I missed the initial error detail. A couple more questions for you: 1) Is your web service on the same machine that is calling the web service? IE: are you working in local dev and calling to your same local dev server to reach the web service or are they on different boxes, datacenters, or geographic areas? 2) If you request the WSDL via the browser does it reliably return? Can you make sure you're not caching the result in your browser? 3) If you use CFHTTP does this work? 4) If you copy the WSDL to a URL on the same server as your app, can you create your object successfully? – Doug Hughes Jan 14 '13 at 20:39
  • To build onto #4, your WSDL doesn't have to be at the http://.../yourfile.cfc?wsdl. It can be anywhere. When the WSDL is generated by CF is (I believe) encodes the correct URL to call for all of its exposed methods. As such, you could put the WSDL on the same website you're calling the service from and create your web service instance using the local WSDL. If that works then everything is suggesting that there's a network problem between your client and your service. – Doug Hughes Jan 14 '13 at 20:41
  • 1) same machine for testing, 2) WSDL reliably returns, SOAP call reliably returns too for small requests < 4KB 3) Haven't tried CFHTTP, unsure how to package a SOAP envelope into a CFHTTP call, 4) same server/machine, objects are created successfully and everything works smoothly for smaller requests, it simply does a connection reset when it hits some limit – Clarence Liu Jan 15 '13 at 19:42
  • What I mean is just use CFHTTP to request the WSDL, that's all. Run that a hundred times or so in a loop and make sure you always get back the complete WSDL. I'd bet that from time to time something (not CF) chokes in the network. Are you running in local development or on a separate development server? – Doug Hughes Jan 15 '13 at 20:50
  • Purely local, the WDSL always returns fine – Clarence Liu Jan 15 '13 at 22:11
  • So, maybe I wasn't understanding the issue correctly. So you can request the WSDL and generate the web service proxy object. That object has various functions on it you can call. The problem is, when you call one of those functions and pass too much data the connection is reset? 1) approximately how many functions are exposed in this web service 2) do all functions seem to fail the same way or only one or a subset? I'm leaning towards suggesting you run the CF app from the console so you can see debugging output. There might be useful info logged to the console. – Doug Hughes Jan 16 '13 at 14:59
0

Can you try SOAP with Attachment (saaj) ??

If your SOAP envolope can have the data as attachment , you can split your soap message like

1.Meta data (in SOAP Envolope)

2.Data (content) as SOAP attachement

I'm not aware of the possibility in CF , but with tools supporting SOAP 1.2 should do this.

TheWhiteRabbit
  • 15,480
  • 4
  • 33
  • 57