Bug 780699 (SOA-3148) - SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment
Summary: SOAPProxy throws SAXParseException when soapAction is missing in WSDL and mes...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-3148
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0.ER3
Assignee: tcunning
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-05 19:14 UTC by Jeff DeLong
Modified: 2011-11-04 11:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
SOA-P 5.1 running on Mac 10.6 JDK 1.6
Last Closed: 2011-11-04 11:06:09 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 780719 0 high CLOSED Support Patch for SOA-3148, SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attach... 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBESB-3636 0 None Closed ESB - SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment 2012-03-07 18:29:32 UTC
Red Hat Issue Tracker SOA-3148 0 None Closed SOAPProxy throws SAXParseException when soapAction is missing in WSDL and message has attachment 2012-03-07 18:29:32 UTC

Internal Links: 780719

Description Jeff DeLong 2011-07-05 19:14:37 UTC
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 08:32:59 UTC
This sounds like it may be JBESB-3585, in which case it has already been fixed.

Comment 2 Kevin Conner 2011-07-06 08:37:07 UTC
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 21:22:37 UTC
Link: Added: This issue Cloned to SOA-3173


Comment 4 tcunning 2011-07-21 14:00:16 UTC
Link: Added: This issue is related to SOA-3172


Comment 5 tcunning 2011-07-21 14:02:13 UTC
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 20:45:43 UTC
JBESB-3636 has been fixed and closed.

Comment 7 tcunning 2011-08-22 19:57:25 UTC
It looks like David already fixed this on the 4_10_CP branch.    Resolving.

Comment 8 David Le Sage 2011-08-31 05:26:32 UTC
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 16:25:28 UTC
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 11:06:09 UTC
Verified in ER6


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