You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Charles Souillard <Ch...@ext.bull.net> on 2006/03/24 14:18:04 UTC
Http component VS Http connector
Hi all,
I am trying to expose a service on sm-http component.
Now I want to call this service thanks to httpclient.
I get an error : Connection refused
I can see that sm-http is using o.a.sm.http.HttpComponent
So I had a look at the http binding example and I can see that this
sample is declaring a component in HttpConnector (o.a.sm.components.http)
I think HttpConnector is launching a http server and not HttpComponent ?
How does sm-http work ?????
Thanks
Charles
Re: Http component VS Http connector
Posted by Charles Souillard <Ch...@ext.bull.net>.
Hi all,
I am now able to send an http/soap request to jetty server...
I have a question concerning the role attribute. I have to choose
between consumer and provider. It is written in the spec that the
provider point of view must be taken but I have some difficulties with
that...
Let me take an example :
I have a business service available in a SE.
I want to expose it through many BC and for example the http/soap BC
(sm-http)
I have to deploy a new SU on sm-http component.
for the http component, should I create an endoint being a provider or a
consumer ? My thinking is consumer...
In addition, I have a doubt concerning the deployment of a SU using
WSDL1Deployer.
My understanding is that I have to put the wsdl file of my Business
Service and add some infos concerning the binding and the endpoint...
For example, I have an existing service called HelloWorldServiceBP with
a port HelloWorld.
I want to make this service accessible through sm-http, is the following
wsdl correct (the one I deploy in sm-http) ?
<portType name='HelloWorld'/>
<binding name='HelloWorldPTSOAPBinding' type='tns:HelloWorld'>
<soap:binding transport="http"/>
</binding>
<service name='HelloWorldServiceBP'>
<port name='HelloWorld' binding='tns:HelloWorldPTSOAPBinding'>
<soap:address location="http://localhost:8192/helloworldForHttp/"/>
<jbi:endpoint role="consumer"
service="hello:HelloWorldOnHttp"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"
defaultOperation="tns:initiate"
wsdlResource="http://localhost:9000/axis/services/HelloWorld?wsdl"/>
</port>
</service>
Thanks,
Charles
Charles Souillard wrote:
> Only a detail :
> I am able to connect to the url I mentionned in my xbean.xml thanks to
> a web browser :
> xbean.xml :
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> xmlns:hello="urn:helloworld:bpel:bsoap">
>
> <http:endpoint service="hello:HelloWorldOnHttp"
> endpoint="HelloWorld"
> role="consumer"
> locationURI="http://localhost:8192/helloworldForHttp/"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> soap="true"
> defaultOperation="initiate"/>
>
> </beans>
>
>
> Charles Souillard wrote:
>
>> Hi all,
>>
>> I am trying to expose a service on sm-http component.
>> Now I want to call this service thanks to httpclient.
>> I get an error : Connection refused
>>
>> I can see that sm-http is using o.a.sm.http.HttpComponent
>>
>> So I had a look at the http binding example and I can see that this
>> sample is declaring a component in HttpConnector
>> (o.a.sm.components.http)
>>
>> I think HttpConnector is launching a http server and not HttpComponent ?
>>
>> How does sm-http work ?????
>>
>> Thanks
>> Charles
>>
>
Re: Http component VS Http connector
Posted by Charles Souillard <Ch...@ext.bull.net>.
Only a detail :
I am able to connect to the url I mentionned in my xbean.xml thanks to a
web browser :
xbean.xml :
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:hello="urn:helloworld:bpel:bsoap">
<http:endpoint service="hello:HelloWorldOnHttp"
endpoint="HelloWorld"
role="consumer"
locationURI="http://localhost:8192/helloworldForHttp/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"
defaultOperation="initiate"/>
</beans>
Charles Souillard wrote:
> Hi all,
>
> I am trying to expose a service on sm-http component.
> Now I want to call this service thanks to httpclient.
> I get an error : Connection refused
>
> I can see that sm-http is using o.a.sm.http.HttpComponent
>
> So I had a look at the http binding example and I can see that this
> sample is declaring a component in HttpConnector (o.a.sm.components.http)
>
> I think HttpConnector is launching a http server and not HttpComponent ?
>
> How does sm-http work ?????
>
> Thanks
> Charles
>