This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 780699 - (SOA-3148) SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment
SOAPProxy throws SAXParseException when soapAction is missing in WSDL and mes...
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.1.0 GA
Unspecified Unspecified
high Severity high
: ---
: 5.2.0.ER3
Assigned To: tcunning
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-05 15:14 EDT by Jeff DeLong
Modified: 2011-11-04 07:06 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
SOA-P 5.1 running on Mac 10.6 JDK 1.6
Last Closed: 2011-11-04 07:06:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3636 None Closed ESB - SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment 2012-03-07 13:29:32 EST
JBoss Issue Tracker SOA-3148 None Closed SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment 2012-03-07 13:29:32 EST

  None (edit)
Description Jeff DeLong 2011-07-05 15:14:37 EDT
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000007C9e5&sfdc.override=
Steps to Reproduce: Use quickstarts/webservice_proxy_basic

1) Open a command prompt and cd to quickstarts/webservice_proxy_basic. Run ant deploy to deploy webservice_proxy_basic. Run ant runtest to test it deployed correctly and works.

2) Use the soapUI testing tool and create a new project with the wsdl: http://127:0.0.1/Quickstart_webservice_proxy_basic/http/Proxy_Basic/Proxy?wsdl

3) Open Request1 and add a value to the toWhom element and send the message. Should get a valid response.

4) Now use soapUI to add an attachment (I added a pdf file). Resend the message. Should still get a valid response. Notice in the soa-p console that the attachment is printed out (as a bunch of giberish).

5) Copy the HelloWorldWSService7545491345617367911.wsdl in server/default/data/wsdl/Quickstart_webservice_proxy_basic_ws to somewhere convenient (I copied it to root), and rename it to HelloWorldWSService.wsdl. Open this file and remove the soapAction="" in the soap:operation element.  

  <binding name="HelloWorldBinding" type="tns:HelloWorld">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
      <soap:operation />


6) Edit jboss-esb.xml in quickstarts/webservice_proxy_basic to use a different wsdl value in the SOAPProxy configuration:

				<action name="proxy"
						class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
						<!-- <property name="wsdl" value="internal://jboss.ws:context=Quickstart_webservice_proxy_basic_ws,endpoint=HelloWorldWS"/> -->
	<property name="wsdl" value="file:///HelloWorldWSService.wsdl"/>

				</action>

7) Use ant deploy to re-deploy the quickstart.

8) Use soapUI to resend the message with attachment. You should see an exception:

2011-07-05 12:44:49,823 WARN  [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] (pool-41-thread-1) null binding for soapaction [""]; parsing envelope to discover operation...
2011-07-05 12:44:49,838 ERROR [STDERR] (pool-41-thread-1) [Fatal Error] :2:1: Content is not allowed in prolog.
2011-07-05 12:44:49,840 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Quickstart_webservice_proxy_basic].[Proxy_Basic-GwListener]] (http-127.0.0.1-8080-2) Servlet.service() for servlet Proxy_Basic-GwListener threw exception
org.xml.sax.SAXParseException: Content is not allowed in prolog.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.jboss.soa.esb.actions.soap.proxy.SOAPProxy.getOperation(SOAPProxy.java:413)
	at org.jboss.soa.esb.actions.soap.proxy.SOAPProxy.process(SOAPProxy.java:345)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
	at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:550)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)


9) Remove the attachment in soapUI and resend the message. It should work:

2011-07-05 12:48:27,633 INFO  [STDOUT] (pool-41-thread-1) Message before SOAPProxy: 
2011-07-05 12:48:27,633 INFO  [STDOUT] (pool-41-thread-1) [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://webservice_proxy_basic/helloworld">
   <soapenv:Header/>
   <soapenv:Body>
      <hel:sayHello>
         <!--Optional:-->
         <toWhom>Jeff</toWhom>
      </hel:sayHello>
   </soapenv:Body>
</soapenv:Envelope>].
2011-07-05 12:48:27,634 WARN  [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] (pool-41-thread-1) null binding for soapaction [""]; parsing envelope to discover operation...
2011-07-05 12:48:27,650 INFO  [STDOUT] (pool-41-thread-1) Message after SOAPProxy: 
2011-07-05 12:48:27,650 INFO  [STDOUT] (pool-41-thread-1) [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:sayHelloResponse xmlns:ns2="http://webservice_proxy_basic/helloworld"><return>Hello 'Jeff' on Tue Jul 05 12:48:27 MDT 2011</return></ns2:sayHelloResponse></env:Body></env:Envelope>].



project_key: SOA

SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment. If the soapAction ="" in the WSDL, then the message is not parsed. If there is no soapAction in the WSDL, then SOAPProxy attempts to parse the document to find the operation in the message, and throws a SAXParseException. See Steps to Reproduce below for more details.
Comment 1 Kevin Conner 2011-07-06 04:32:59 EDT
This sounds like it may be JBESB-3585, in which case it has already been fixed.
Comment 2 Kevin Conner 2011-07-06 04:37:07 EDT
Just looked at JBESB-3585 and the current code, it assumes that the content is just XML and does no checking for attachments.

This is a definitely a new issue.
Comment 3 Rick Wagner 2011-07-14 17:22:37 EDT
Link: Added: This issue Cloned to SOA-3173
Comment 4 tcunning 2011-07-21 10:00:16 EDT
Link: Added: This issue is related to SOA-3172
Comment 5 tcunning 2011-07-21 10:02:13 EDT
Help Desk Ticket Reference: Added: https://c.na7.visual.force.com/apex/Case_View?id=500A0000007C9e5&sfdc.override=
Comment 6 David Ward 2011-07-21 16:45:43 EDT
JBESB-3636 has been fixed and closed.
Comment 7 tcunning 2011-08-22 15:57:25 EDT
It looks like David already fixed this on the 4_10_CP branch.    Resolving.
Comment 8 David Le Sage 2011-08-31 01:26:32 EDT
Release Notes Docs Status: Added: Documented as Resolved Issue
Writer: Added: dlesage
Release Notes Text: Added: 
https://issues.jboss.org/browse/SOA-3148

SOAPProxy threw a SAXParseException when the the WSDL was missing a soapAction and the message had attachment. A code fix has rectified this problem and, as a result, users will no longer encounter this exception.
Comment 9 tcunning 2011-10-11 12:25:28 EDT
Release Notes Text: Removed: 
https://issues.jboss.org/browse/SOA-3148

SOAPProxy threw a SAXParseException when the the WSDL was missing a soapAction and the message had attachment. A code fix has rectified this problem and, as a result, users will no longer encounter this exception. Added: https://issues.jboss.org/browse/SOA-3148

SOAPProxy threw a SAXParseException when the the WSDL was missing a soapAction and the message had attachment. A code fix has rectified this problem and, as a result, users will no longer encounter this exception.
Comment 10 Filip Nguyen 2011-11-04 07:06:09 EDT
Verified in ER6

Note You need to log in before you can comment on or make changes to this bug.