0

I have developed the JBOSS ESB project and created proxy for the service and invoked successfully.

But, the wsdl location in hard coded.

<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
    xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.1.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.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.1.xsd">
    <services>
        <service category="Stock" description="Stock Quote" invmScope="GLOBAL"
            name="Quote">
            <listeners>
                <http-gateway name="StockQuote-GwListener" />
            </listeners>
            <actions mep="RequestResponse">
                <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy"
                    name="proxy">
                    <property name="wsdl"
                        value="http://localhost:8081/service_sample/services/addSoapPort?wsdl" />
                </action>
            </actions>
        </service>
    </services>
</jbossesb>

wsdl location in below is hard coded, how to make this configurable?

<property name="wsdl"
                            value="http://localhost:8081/service_sample/services/addSoapPort?wsdl" />

How to manage this?

Is there any other configuration do we need to do?

Please help me..

user3500159
  • 25
  • 2
  • 6

1 Answers1

0

Create a folder named wsdl in your project, and place your wsdls there.

After it you can change your action definition to this:

 <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy">
                <property name="wsdl"
                    value="claspath:///wsdl/your.wsdl" />
                <property name="endpointUrl" value="${service.url}"/>
            </action>

In the endpointUrl you can hard code the url of your webservice, or place it in a property file (as it shown above)

To use a property file you'll need a jboss-service.xml file under META-INF:

<?xml version="1.0" encoding="UTF-8"?>
  <server>
    <mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss.util:type=Service,name=YourPropertyName">
    <attribute name="URLList">/home/foo/your.properties</attribute>
    <attribute name="Properties" />
</mbean>

In the /home/foo/your.properties file just add the url:

service.url=http://yourservice.url
zsom
  • 479
  • 1
  • 5
  • 19