Gert,

I am able to connect to the http:endpoint :o), but now I have another
problem :o).

When sending an XML request to the endpoint, I'm receiving "<?xml
version='1.0' encoding='UTF-8'?><JBIFault
xmlns="http://cxf.apache.org/bindings/jbi";><detail xmlns="">Message wrapper
element is '{http://schemas.xmlsoap.org/soap/envelope/}Envelope' but
expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'</detail></JBIFault>".

The http:endpoint forwards the incoming request to the cxfbc:provider, but
apparantly the message format is incorrect. Should I apply a transformation
between the http:endpoint and cxfbc:provider ? If yes, what kind of
transformation ?

Regards, Stefan.


Gert Vanthienen wrote:
> 
> Stefan,
> 
> You should be able to use the URL you use on the <http:endpoint/> 
> configuration.  If it doesn't work, could you post this piece of your 
> xbean.xml so we can take a look?
> 
> Regards,
> 
> Gert
> 
> stlecho wrote:
>> Gert,
>>
>> I've specified a consumer http:endpoint. When sending an HTTP request to
>> the
>> specified locationURI http://localhost:8192/bridge I'm receiving a
>> Connection Refused message. 
>>
>> Which URL should I use to send a request to the http:endpoint ?
>>
>> Regards, Stefan.
>>
>>
>> Gert Vanthienen wrote:
>>   
>>> Stefan,
>>>
>>> If you would like to test your <cxfbc:provider/>, one way is to expose 
>>> it to the outside world using a consumer endpoint that makes it easy to 
>>> test things -- just pick and choose the one you like: HTTP, JMS, 
>>> file/ftp poller, ...  For an InOut service, HTTP is a very convenient
>>> one.
>>>
>>> Another option could be to use a ServiceMixClient 
>>> (http://servicemix.apache.org/client-api.html) to interact with the 
>>> ESB.  We also have examples around for doing integration testing 
>>> (http://servicemix.apache.org/integration-testing-in-spring.html) or 
>>> unit testing, if you want to automate the testing part.
>>>
>>> Regards,
>>>
>>> Gert
>>>
>>> stlecho wrote:
>>>     
>>>> Gert,
>>>>
>>>> I think I've understood consumer/producer lingo, but ... I would like
>>>> to
>>>> test the cxfbc:provider by sending an HTTP (or JMS) request to the ESB. 
>>>>
>>>> That's why I've created a consumer http:endpoint that receives the HTTP
>>>> request and forwards it - via a RouteBuilder - to the cxfbc:provider
>>>> which
>>>> forwards the HTTP request to the external webservice. 
>>>>
>>>> Is this the correct way to test the cxfbc:provider or is there another
>>>> (better) way of achieving this ?
>>>>
>>>> Regards, Stefan.
>>>>
>>>>
>>>> Gert Vanthienen wrote:
>>>>   
>>>>       
>>>>> Stefan,
>>>>>
>>>>> An <http:consumer/> is an external endpoint.  It is available from the
>>>>> outside world and is used to expose a service that is available to the
>>>>> outside world using plain HTTP or HTTP/SOAP.  It will receive an HTTP
>>>>> request, send a MessageExchange through the ESB and optionally send
>>>>> back
>>>>> the reponse over HTTP.
>>>>>
>>>>> An <http:provider/> is an internal endpoint, that is available from
>>>>> the
>>>>> ESB itself.  It is used make an external HTTP or HTTP/SOAP service
>>>>> availble in the ESB.  This is similar to what you do with your
>>>>> <cxfbc:provider/>, you make the external service hosted at
>>>>> https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws available
>>>>> inside the ESB.  It receives a MessageExchange and does an HTTP
>>>>> request
>>>>> from that.
>>>>>
>>>>> If you combine both of them, like you are doing here, you are using
>>>>> ServiceMix as a web service proxy: with the <cxfbc:provider/> you make
>>>>> the
>>>>> service available on the ESB and you can use all kinds of consumer
>>>>> endpoints (HTTP, JMS, ...) to allow the outside world to access the
>>>>> service again.
>>>>>
>>>>> Does this clarify the consumer/producer lingo for you?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> stlecho wrote:
>>>>>     
>>>>>         
>>>>>> Hi,
>>>>>>
>>>>>> Based on the documentation "A consumer endpoint is a server-side http
>>>>>> endpoint that will consume plain HTTP, or HTTP+SOAP requests and send
>>>>>> them into the NMR to a given JBI endpoint" I think I should use a
>>>>>> consumer endpoint. Why should I use a provider, which - again
>>>>>> according
>>>>>> to the documentation - is called (internally?) by the NMR ?
>>>>>>
>>>>>> I definitely would like to receive an answer, so I will change the
>>>>>> MEP
>>>>>> and use "http://www.w3.org/2004/08/wsdl/in-out"; instead.
>>>>>>
>>>>>> Regards, Stefan.
>>>>>>
>>>>>>
>>>>>> Edell Nolan wrote:
>>>>>>       
>>>>>>           
>>>>>>> Hi,
>>>>>>>
>>>>>>> From looking at your modules I am just thinking that maybe your
>>>>>>> http:endpoint should be a consumer so that it can receive
>>>>>>> your request forward it to the cxf-bc and it makes the call to the
>>>>>>> external
>>>>>>> web service.
>>>>>>>
>>>>>>> Also your have defined it to have a mep as in-only - so you won't
>>>>>>> get
>>>>>>> a
>>>>>>> response back.
>>>>>>>
>>>>>>> Is this was you want to do ?
>>>>>>>
>>>>>>> Edell.
>>>>>>>
>>>>>>> On Thu, Aug 21, 2008 at 4:40 PM, stlecho <[EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>>         
>>>>>>>             
>>>>>>>> Edell,
>>>>>>>>
>>>>>>>> I've done the suggested modifications and the deployment of the SA
>>>>>>>> is
>>>>>>>> working :o). Thank you very much for helping me.
>>>>>>>>
>>>>>>>> Now I would like to test via the http:endpoint the call to the
>>>>>>>> webservice.
>>>>>>>> I've tried to send an HTTP request to http://localhost:8192/bridge
>>>>>>>> but
>>>>>>>> received a Connection Refused message. Which URL should I use to
>>>>>>>> send
>>>>>>>> a
>>>>>>>> request to my webservice ?
>>>>>>>>
>>>>>>>> Regards, Stefan Lecho.
>>>>>>>>
>>>>>>>>
>>>>>>>> Edell Nolan wrote:
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I can deploy your tutorial-sa with the following changes.
>>>>>>>>>
>>>>>>>>> (I had to change the location of the directories to be polled etc
>>>>>>>>> in
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> the
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> file su
>>>>>>>>> and change the locationURI in the cxf-bc to some server I could
>>>>>>>>> have
>>>>>>>>> access
>>>>>>>>> to)
>>>>>>>>>
>>>>>>>>> So if you change the following it should work for you
>>>>>>>>>
>>>>>>>>> In the tutorial-cxf-bc the xbean.xml should look like the
>>>>>>>>> following
>>>>>>>>>
>>>>>>>>> <beans    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
>>>>>>>>>         xmlns:dummy="urn://fsb.belgium.be/fphp/v3_0">
>>>>>>>>>
>>>>>>>>>         <cxfbc:provider
>>>>>>>>>                 wsdl="classpath:PersonQuery.wsdl"
>>>>>>>>>                 locationURI="
>>>>>>>>> https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws";
>>>>>>>>>                 service="dummy:PersonQuery"
>>>>>>>>>                 endpoint="PersonQuerySoap"/>
>>>>>>>>>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>> The reason that it could not find the service definition is that
>>>>>>>>> it
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> was
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> not
>>>>>>>>> in the wsdl.
>>>>>>>>> It will look for the service defined in the wsdl that you specify
>>>>>>>>> and
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> the
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> service will take
>>>>>>>>> the default target namespace defined there which was different to
>>>>>>>>> the
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> one
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> you were specifying.
>>>>>>>>>
>>>>>>>>> Also in the tutorial-http-su - add in the  namespace
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> xmlns:dummy="urn://
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> fsb.belgium.be/fphp/v3_0"
>>>>>>>>> and have the service specified as dummy:PersonQuery.
>>>>>>>>>
>>>>>>>>> Hope this helps, Edell.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2008 at 11:27 AM, Edell Nolan
>>>>>>>>> <[EMAIL PROTECTED]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Can you send your complete xbean.xml files.
>>>>>>>>>>
>>>>>>>>>> Are you sure you have not defined
>>>>>>>>>>
>>>>>>>>>>               
>>>>>>>>>>                   
>>>>>>>> http://www.credoc.be/<http://www.credoc.be/PersonQuery%7DPersonQuery>in
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>> any of your xbean.xml files.
>>>>>>>>>>
>>>>>>>>>> It looks to have the namespace defined incorrectly somewhere.
>>>>>>>>>>
>>>>>>>>>> Edell.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Aug 20, 2008 at 7:13 PM, stlecho <[EMAIL PROTECTED]>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>               
>>>>>>>>>>                   
>>>>>>>>>>> The credoc namespace is defined as "http://www.company.com";. The
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>> leading
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>> "/"
>>>>>>>>>>> is a copy/paste error :o(. In the code I'm using
>>>>>>>>>>> "jbi:service:http://www.company.com/PersonQueryIn";.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Edell Nolan wrote:
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I am not sure that you need the starting '/'
>>>>>>>>>>>>
>>>>>>>>>>>> should this not be
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>> jbi:service:http://www.company.com/PersonQueryIn";
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>  from("jbi:service:/http://www.company.com/PersonQueryIn";)
>>>>>>>>>>>>   .convertBodyTo(DOMSource.
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>>>>>>> class)
>>>>>>>>>>>>>   .to(jbi:service:/http://www.company.com/PersonQuery);
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>>> also what have you defined the credoc namespace to be.
>>>>>>>>>>>>
>>>>>>>>>>>> Edell.
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Aug 20, 2008 at 4:44 PM, stlecho <[EMAIL PROTECTED]>
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>> wrote:
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'm trying to use ServiceMix to make a call to an external
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>> webservice,
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>> but
>>>>>>>>>>>>> I
>>>>>>>>>>>>> have some difficulties in find the wright configuration.
>>>>>>>>>>>>>
>>>>>>>>>>>>> The WSDL used by the external webservice contains
>>>>>>>>>>>>>  <service name="PersonQuery">
>>>>>>>>>>>>>    <port name="PersonQuerySoap" binding="s0:PersonQuerySoap">
>>>>>>>>>>>>>      <soap:address
>>>>>>>>>>>>> location="http://vilcanota:7002/fphp/3.1/ws/PersonQuery.jws"/>
>>>>>>>>>>>>>    </port>
>>>>>>>>>>>>>  </service>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Based on this WSDL definition, I've defined a cxfbc:provider
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> with
>>>>>>>> the
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>> same
>>>>>>>>>>>>> service and endpoint as defined in the WSDL.
>>>>>>>>>>>>>  <cxfbc:provider
>>>>>>>>>>>>>
>>>>>>>>>>>>> wsdl="
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>> https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=";
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>> locationURI="
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>> https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws";
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>>    service="credoc:PersonQuery"
>>>>>>>>>>>>>    endpoint="PersonQuerySoap"
>>>>>>>>>>>>>  />
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've defined a JMS consumer, so that my clients can use JMS to
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>> connect
>>>>>>>>>>> to
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>> ServiceMix:
>>>>>>>>>>>>>  <jms:consumer
>>>>>>>>>>>>>    service="credoc:PersonQueryReceiver"
>>>>>>>>>>>>>  endpoint="jmsEndpoint"
>>>>>>>>>>>>>  targetService="credoc:PersonQueryIn"
>>>>>>>>>>>>>  destinationName="personquery.in"
>>>>>>>>>>>>>  connectionFactory="#connectionFactory"/>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've defined a simple Camel router that forwards the incoming
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> JMS
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>> request
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>> to
>>>>>>>>>>>>> the cxfbc provider:
>>>>>>>>>>>>>
>>>>>>>>>>>>>  from("jbi:service:/http://www.company.com/PersonQueryIn";)
>>>>>>>>>>>>>   .convertBodyTo(DOMSource.class)
>>>>>>>>>>>>>   .to(jbi:service:/http://www.company.com/PersonQuery);
>>>>>>>>>>>>>
>>>>>>>>>>>>> When deploying this configuration, I'm receiving the following
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> error:
>>>>>>>>           
>>>>>>>> "<loc-message>org.apache.cxf.service.factory.ServiceConstructionException:
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>> Could not find definition for service
>>>>>>>>>>>>>
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> {http://www.credoc.be/PersonQuery}PersonQuery<http://www.credoc.be/PersonQuery%7DPersonQuery>
>>>>>>>> <http://www.credoc.be/PersonQuery%7DPersonQuery>
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>> <http://www.credoc.be/PersonQuery%7DPersonQuery>
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>>> .</loc-message>"
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've tried several options, but without any success :o(. Where
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> should
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>> this
>>>>>>>>>>>>> PersonQuery service be defined ?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards, Stefan.
>>>>>>>>>>>>> --
>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> http://www.nabble.com/Difficulty-in-configuring-external-webservice-call-tp19070587p19070587.html
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>> Nabble.com.
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>>
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>> http://www.nabble.com/Difficulty-in-configuring-external-webservice-call-tp19070587p19075160.html
>>>>>>>>           
>>>>>>>>               
>>>>>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Difficulty-in-configuring-external-webservice-call-tp19070587p19091393.html
>>>>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>>           
>>>>>>>>               
>>>>>>>         
>>>>>>>             
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>> -----
>>> ---
>>> Gert Vanthienen
>>> http://www.anova.be
>>>
>>>     
>>
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: 
http://www.nabble.com/Difficulty-in-configuring-external-webservice-call-tp19070587p19104261.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to