When using standard JBI components like servicemix-jsr181,
servicemix-http ... you can not use the sm:activationSpec to specify
the service / endpoint name.  You should put then on the endpoint
definition.

Having done so, you should be able to view the WSDL from the jmx
console, and then browse the http://localhost:8194/Service/?wsdl to
retrieve it.

Cheers,
Guillaume Nodet

On 5/16/06, bgoetzmann <[EMAIL PROTECTED]> wrote:

Hello,
I try a simple test with ServiceMix to expose a POJO as a web service, using
the following servicemix.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";
xmlns:http="http://servicemix.apache.org/http/1.0";
xmlns:test="http://servicemix.org/test/";>
        <!-- Le conteneur JBI -->
        <sm:container id="jbi">
                <sm:activationSpecs>

                        <sm:activationSpec service="test:Hello"
endpoint="testService">
                                <sm:component>
                                        <jsr181:component>
                                                <jsr181:endpoints>
                                                        <jsr181:endpoint
pojoClass="TestService" annotations="none"/>
                                                </jsr181:endpoints>
                                        </jsr181:component>
                                </sm:component>
                        </sm:activationSpec>

                        <sm:activationSpec>
                                <sm:component>
                                        <http:component>
                                                <http:endpoints>
                                                        <http:endpoint
service="test:Hello" endpoint="testService" role="consumer"
defaultOperation="echo" locationURI="http://localhost:8194/Service/";
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"; soap="true"/>
                                                </http:endpoints>
                                        </http:component>
                                </sm:component>
                        </sm:activationSpec>

                </sm:activationSpecs>
        </sm:container>
</beans>

My goal is to get the WSDL document corresponding to my POJO exposed as a
web service.
With a JMX Console I see two JMX beans with Type=Endpoint :
- One with Name =
{http___DefaultNamespace}TestServiceTestServiceJBIPort,SubType=Internal
- The other with Name =
{http___servicemix.org_test_}HellotestService,SubType=External

Each of these JMX beans has a getWSDL() operation

A call on this operation for the first beans returns (it seems) a WSDL
document, but for the second, only :

<?xml version="1.0" encoding="UTF-8"?>


I would expect that this call return a valid WSDL document including the URL
for binding (http://localhost:8194/Service/).

Why doest it not the case ?

An other test I make was to try to get the WSDL document using this URL
http://localhost:8194/Service?xml but I get the following error :

"Error 405 : GET not supported"

Is a way to get the WSDL document with an HTTP GET ?
--
View this message in context: 
http://www.nabble.com/Getting-WSDL-from-a-JSR181-POJO-Service-t1626322.html#a4406444
Sent from the ServiceMix - User forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to