Bug 815183 - SOAPProcessor doesn't publish WSDL when used with HTTP Gateway
SOAPProcessor doesn't publish WSDL when used with HTTP Gateway
Status: VERIFIED
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.2.0 GA
Unspecified Unspecified
high Severity high
: ER5
: 5.3.0 GA
Assigned To: Kevin Conner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-23 00:17 EDT by Tadayoshi Sato
Modified: 2012-07-14 03:28 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The SOAPProcessor could not publish WSDLs when used in conjunction with the HTTP Gateway. This is because the SOAPProcessor's annotated publisher (JBossWSWebserviceContractPublisher) only implements the ActionContractPublisher but the HTTP Gateway needs the ContractProvider when publishing a WSDL contract.
Story Points: ---
Clone Of:
: 817747 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3789 Major Closed SOAPProcessor doesn't publish WSDL when used with HTTP Gateway 2014-02-17 07:34:11 EST

  None (edit)
Description Tadayoshi Sato 2012-04-23 00:17:22 EDT
Description of problem:
Platform BZ for https://issues.jboss.org/browse/JBESB-3789

SOAPProcessor can publish WSDL when it is used with JBR Gateway as demonstrated in webservice_producer. But if it is used with HTTP Gateway, it cannot publish WSDL. (For comparison, SOAPProxy publishes WSDL with both JBR and HTTP gateways.)

The reason is clear that whereas SOAPProxy's annotated publisher (SOAPProxyWsdlContractPublisher) implements ContractProvider interface as well as ActionContractPublisher, SOAPProcessor's annotated publisher (JBossWSWebserviceContractPublisher) implements only ActionContractPublisher. And HTTP Gateway works only with ContractProvider when publishing a WSDL contract.


How reproducible:
Easy

Steps to Reproduce:
1.Pick up the webservice_producer quickstart and substitute its jboss-esb.xml with the below:
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"
    parameterReloadSecs="5">
    <services>
        <service category="MyServiceCategory" name="MyWSProducerService" description="WS Frontend speaks natively to the ESB" invmScope="GLOBAL">
            <listeners>
              <http-gateway name="Http-Gateway" />
            </listeners>
            <actions>
                <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
                    <property name="jbossws-context" value="Quickstart_webservice_producer_esb"/>
                    <property name="jbossws-endpoint" value="GoodbyeWorldWS"/>
                </action>
            </actions>
        </service>
    </services>
</jbossesb>
2.Deploy the quickstart.
3.Look at http://localhost:8080/contract/ and you will find no contract published at MyServiceCategory:MyWSProducerService.
  
Actual results:
WSDL isn't published.

Expected results:
WSDL should be published.

Additional info:
As a workaround, you can use JBR Gateway with HTTP protocol instead.
Comment 1 JBoss JIRA Server 2012-04-24 06:21:52 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Tadayoshi,

Thanks for reporting this issue. The fix however is not the way as suggested by you. Please mention only the issue and not any suggestion for fix as this could confuse the issue at hand.
Comment 2 JBoss JIRA Server 2012-04-24 08:32:55 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Tadayoshi,

Thanks for reporting this issue. The fix however may not be the way as suggested by you. Please mention only the issue and not any suggestion for fix as this could confuse the issue at hand.
Comment 3 JBoss JIRA Server 2012-04-26 00:59:46 EDT
Magesh Bojan <mageshbk@jboss.com> updated the status of jira JBESB-3789 to Closed
Comment 4 JBoss JIRA Server 2012-04-26 00:59:46 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

At revision: 38059
Comment 5 Rick Wagner 2012-04-26 10:11:34 EDT
GSS considers this a 'high' priority, it is customer facing.


GSS is asking the customer if they can wait for 5.3 or will require a patch for 5.2.

Either way, we will need this fixed in 5.3.

If a patch is required, we'll open a new BZ for that and will make it part of a Roll up.
Comment 6 JBoss JIRA Server 2012-05-03 00:50:54 EDT
Magesh Bojan <mageshbk@jboss.com> updated the status of jira JBESB-3789 to Reopened
Comment 7 JBoss JIRA Server 2012-05-03 00:50:54 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Reopening to add this fix to 4.10.CP branch
Comment 8 JBoss JIRA Server 2012-05-03 01:44:10 EDT
Magesh Bojan <mageshbk@jboss.com> updated the status of jira JBESB-3789 to Closed
Comment 9 JBoss JIRA Server 2012-05-03 01:44:10 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

At revision: 38069 on 4_10_CP branch.
Comment 10 JBoss JIRA Server 2012-05-09 04:55:53 EDT
Sato Tadayoshi <tasato@redhat.com> updated the status of jira JBESB-3789 to Reopened
Comment 11 JBoss JIRA Server 2012-05-09 04:55:53 EDT
Sato Tadayoshi <tasato@redhat.com> made a comment on jira JBESB-3789

Reopened because the fix is incomplete.
Comment 12 JBoss JIRA Server 2012-05-09 05:13:07 EDT
Sato Tadayoshi <tasato@redhat.com> made a comment on jira JBESB-3789

Thanks Magesh for quick fixing. But unfortunatelly I tested the fix and found it's not complete.

Explaining based on the reproducing step above, the WSDL contract actually becomes to be published by the fix but the WSDL /definitions/service/port/soap:address/@location (XPath notation for convenience) points to the original Web service (http://127.0.0.1:8080/Quickstart_webservice_producer_esb/GoodbyeWorldWS). What is expected here should be the http-gateway endpoint on ESB (http://127.0.0.1:8080/Quickstart_webservice_producer/http/MyServiceCategory/MyWSProducerService) because otherwise a client ends up calling the original Web service directly.
Comment 13 JBoss JIRA Server 2012-05-09 09:11:06 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Terribly sorry! Fixed it, let me know any issues before closing it.

At revision: 38081 on 4_10_CP branch
At revision: 38082 on 4_11_CP branch
Comment 14 JBoss JIRA Server 2012-05-09 09:15:48 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Terribly sorry! Fixed it, let me know any issues before closing it.

At revision: 38081 on 4_11_CP branch
At revision: 38082 on 4_10_CP branch
Comment 15 JBoss JIRA Server 2012-05-13 23:01:49 EDT
Sato Tadayoshi <tadayosi@gmail.com> made a comment on jira JBESB-3789

Magesh, thanks for the prompt correction! It works fine, and you can close it.
Comment 16 JBoss JIRA Server 2012-05-14 01:53:52 EDT
Magesh Bojan <mageshbk@jboss.com> updated the status of jira JBESB-3789 to Closed
Comment 17 JBoss JIRA Server 2012-05-15 00:55:34 EDT
Jason Shepherd <jason@jasonshepherd.net> updated the status of jira JBESB-3789 to Reopened
Comment 18 JBoss JIRA Server 2012-05-15 00:55:34 EDT
Jason Shepherd <jason@jasonshepherd.net> made a comment on jira JBESB-3789

From a sample, wrapped endpoint URL:

http://myTestServer/myapp-esb/http/myapp?wsdl

I get a WSDL back;

    <wsdl:import location="http://esb.mycompany.cub/schemas/Errors.wsdl"
        namespace="http://css.mycompany.com/ws/errors/v1/">
    </wsdl:import>
    <wsdl:types>
        <xsd:schema xmlns:err="http://css.mycompany.com/ws/errors/v1/"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://css.mycompany.com/ws/sc/myapp/v1/"
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://css.mycompany.com/ws/sc/myapp/v1/"
                schemaLocation="http://myTestServer/myapp-esb-myapp-esb-ws-0.7.0-SNAPSHOT/myapp?xsd=myapp.xsd" />
        </xsd:schema>
    </wsdl:types>

where the original is

    <!-- Base Service Messages -->
    <wsdl:import namespace="http://css.mycompany.com/ws/errors/v1/"
        location="http://esb.mycompany.cub/schemas/Errors.wsdl" />

    <!-- Data types definition -->
    <wsdl:types>
        <xsd:schema>
            <xsd:import namespace="http://css.mycompany.com/ws/sc/myapp/v1/"
                schemaLocation="myapp.xsd" />
        </xsd:schema>
    </wsdl:types>
Comment 19 JBoss JIRA Server 2012-05-15 00:58:28 EDT
Jason Shepherd <jason@jasonshepherd.net> made a comment on jira JBESB-3789

From a sample, wrapped endpoint URL:

http://myTestServer/myapp-esb/http/myapp?wsdl

I get a WSDL back with a reference to a schema on the wrapped web service. The schema should be hosted relative to the WSDL, on the ESB instance.

    <wsdl:import location="http://esb.mycompany.cub/schemas/Errors.wsdl"
        namespace="http://css.mycompany.com/ws/errors/v1/">
    </wsdl:import>
    <wsdl:types>
        <xsd:schema xmlns:err="http://css.mycompany.com/ws/errors/v1/"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://css.mycompany.com/ws/sc/myapp/v1/"
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://css.mycompany.com/ws/sc/myapp/v1/"
                schemaLocation="http://myTestServer/myapp-esb-myapp-esb-ws-0.7.0-SNAPSHOT/myapp?xsd=myapp.xsd" />
        </xsd:schema>
    </wsdl:types>

where the original is

    <!-- Base Service Messages -->
    <wsdl:import namespace="http://css.mycompany.com/ws/errors/v1/"
        location="http://esb.mycompany.cub/schemas/Errors.wsdl" />

    <!-- Data types definition -->
    <wsdl:types>
        <xsd:schema>
            <xsd:import namespace="http://css.mycompany.com/ws/sc/myapp/v1/"
                schemaLocation="myapp.xsd" />
        </xsd:schema>
    </wsdl:types>
Comment 20 JBoss JIRA Server 2012-05-15 03:40:01 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Jason,

The SOAPProcessor is an action that exposes only Webservice endpoints that are internally hosted in the same container via JBossWS. This JIRA was created to mimic the behavior of JBR gateway in the new HTTP gateway. That has been done along with the endpoint address rewrite. Please do not overwhelm the issue here.

Just rewriting schema urls alone will not work, as such the resources like http://myTestServer/myapp-esb-myapp-esb-ws-0.7.0-SNAPSHOT/myapp?xsd=myapp.xsd do not exist in the server. The schema or WSDL imports will always point to the original Webservice's location only as done by JBR gateway. This needs to be handled in a separate JIRA. This encloses rewriting all JBR, HTTP gateway schema import urls and caching the schemas. Whether this feature will be acceptable or not we need to validate that separately. Users can inline their schema for the time being.

Tadayoshi,

The SOAP1.2 support is not there in SOAPProcessor/SOAPProxy as of now. The linked issue only states one small portion of re-writing that is not happening. That is definitely not related to this schema re-writing issue at all although they may touch the same files.
Comment 21 JBoss JIRA Server 2012-05-22 01:45:41 EDT
Magesh Bojan <mageshbk@jboss.com> updated the status of jira JBESB-3789 to Closed
Comment 22 JBoss JIRA Server 2012-05-22 01:45:41 EDT
Magesh Bojan <mageshbk@jboss.com> made a comment on jira JBESB-3789

Additional issue raised by Jason is handled here JBESB-3802.
Comment 23 David Le Sage 2012-06-14 00:12:15 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The SOAPProcessor could not publish WSDLs when used in conjunction with the HTTP Gateway. This is because the SOAPProcessor's annotated publisher (JBossWSWebserviceContractPublisher) only implements the ActionContractPublisher but the HTTP Gateway needs the ContractProvider when publishing a WSDL contract.
Comment 24 Jason Shepherd 2012-07-04 23:50:49 EDT
There are still outstanding issue with references XSD imported in the WSDL, explained here JBESB-3802. 

Can you address this is SOA-P 5.3 in this issue tracker ticket, or should I open a new one?
Comment 25 tcunning 2012-07-05 07:20:00 EDT
https://bugzilla.redhat.com/show_bug.cgi?id=823711 represents the issues explained in JBESB-3802.
Comment 26 Marek Baluch 2012-07-14 03:28:26 EDT
Verified in SOA 5.3 ER5.

Contracts are now correctly made accessible. For the how-to reproduce case it is accessible via http://127.0.0.1:8080/Quickstart_webservice_producer/http/MyServiceCategory/MyWSProducerService?wsdl.

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