Hi,
My comment inline.
On 2011-4-13, at 下午4:31, Marco Westermann wrote:
Hi,
Thank you very much for your answers but
I get more and more confused:
Matt:
The http component works great as a simple soap client, so you can use
it w/o using CXF in most cases.
Freeman:
IMHO, to do a soap based operation, you'd better use cxf bc provider
here, which is more powerful for soap operation.
My question: what should I use now?
I do think you should use cxf bc provider in this case, as it's better
soap support.
Matt:
I recommend looking into using Camel and OSGI packaging on ServiceMix
4.x, instead of using JBI
My question: does that mean all the beginner tutorials on the
servicemix-homepage are outdated? Do you have any references how this
combination of camel and osgi-packaging works for serviceMix?
We've discussed same issues several times before, JBI component is kind
of outdated, so if you're starting a new project please use camel router
directly, it's also has good cxf endpoint support so that it's easy for you
to call a external webservice. You can take a look at camel-osgi example
shipped with Servicemix4.x kit to learn how camel and osgi-packaging works
together.
And I'm not one step further with the implementation of that one
external service. @Freeman: I thought the port do exist in the wsdl, cause I
copied it from there. You may see yourself. I provided the wsdl in my last
post. And than again there is the question about how the soap-operation has
to be named in my project.
Notice
<http:soap-provider service="impl:ArticleBASService"
endpoint="impl:ArticleBASSoapBinding"
wsdl="http://arche:8080/ArticleService/services/ArticleBAS?wsdl" />
According to your wsdl, the endpoint should be impl:ArticleBAS, it
should be same as the port name in your wsdl.
I guess this mismatch which cause soap-operation missing, but again,
please use cxf bc provider endpoint for better soap support.
Hope this helps.
Freeman
regards, Marco
Am 13.04.2011 05:05, schrieb Freeman Fang:
Hi,
My comment inline
On 2011-4-12, at 下午11:07, Marco Westermann wrote:
Hi,
I fear I need further assistence. What I really miss is a tutorial
where an external web service is called.
What I have done:
I created a http-component-su qbus-article-poll-su (this wrappes the
external web service)
in the qbus-article-camel-su I implemented a simple camel route where
the service should be called and the response is written to a log, so I can
see, that the request works. But my problems start when implementing the
service-stub.
This is my service definion
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:impl="http://DefaultNamespace"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-http-3.2.3.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<http:soap-provider service="impl:ArticleBASService"
endpoint="impl:ArticleBASSoapBinding"
wsdl="http://arche:8080/ArticleService/services/ArticleBAS?wsdl" />
</beans>
I think there is still something wrong: First of all I get exceptions
in Servicemix:
Cound not find port 'impl:ArticleBAS' in wsdl for service
'{http://DefaultNamespace}ArticleBASService'
You need check your port name in your wsdl, it need match your http
endpoint configuration
then I miss the reference to the operation I want to call (e.g.
getChangedArticles). Do I have to give this in the camel route or in the
http-component?
May somebody help me with my knowledge gaps? I attached the
sourcecode for my servicemix implementation and the wsdl-definition of the
external service.
IMHO, to do a soap based operation, you'd better use cxf bc provider
here, which is more powerful for soap operation.
We actually have testcase[1] to demonstrate how cxf bc provider works
for several different cases, you may need take a look.
[1]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
Freeman
Many thanks and best regards,
Marco
Am 08.04.2011 16:45, schrieb Matt Pavlovich:
Marco-
Check out XSLT. You can extract data from that XML document and
output it it any variety of formats, not just XML. You'll want to capture
the exact XML from "service one", so you can test your XSLT's. A handy tool
to do that is TCP Mon, available as an Eclipse plugin, or a stand alone
tool.
XSLT:
http://w3schools.com/xsl/default.asp
TCPMon:
http://ws.apache.org/commons/tcpmon/download.cgi
Matt Pavlovich
On Apr 8, 2011, at 9:33 AM, Marco Westermann wrote:
Hi, thank you for your response,
in fact there is some transformation needed for the response
payload of service call one.
The service one wrappes an activeX-Object and returns a string as
part of a complex type:
<element name="getChangedArticlesResponse">
<complexType>
<sequence>
<element name="getChangedArticlesReturn"
type="xsd:string" />
</sequence>
</complexType>
</element>
the string itself contains exactly the message which has to be
routed to service 2. Any idea how to make this work?
Thank you!
Marco
Am 07.04.2011 17:39, schrieb Matt Pavlovich:
Hi Marco-
You could implement a very simple solution using Camel running in
ServiceMix to do that. Look into the timer, or quartz Camel components to
start.
It would look something like:
<route>
<from uri="timer.. configure to kick off every 5 mintues" />
<to uri="http://webservice1:8080/call />
<to uri="http://webservice2:8080/call2 />
</route>
The response from the webservice1 would be directed as the input
to webservice2. As long as the payload is exactly the same, you don't need
to do anything. If there are slight changes to the xml, you can insert a
XSLT to take the response from webservice1 and send it to webservice2 as the
input.
Time based invocation:
http://camel.apache.org/timer.html
http://camel.apache.org/quartz.html
Simple web service calls:
http://camel.apache.org/http.html
Advanced web service:
http://camel.apache.org/cxf.html
XSLT:
http://camel.apache.org/xslt.html
Matt Pavlovich
On Apr 7, 2011, at 7:59 AM, Marco Westermann wrote:
Hi,
I try to implement the following process:
every 5 minutes I want to call a web Service take the answer and
call another web service with the return value from the first call.
using bpel would be nice to do the job (ode?). Is there a
tutorial which does similar tasks? I think I have still an understanding
problem on how to use serviceMix.
Thank you for all advice you can give.
Marco
__________ Hinweis von ESET NOD32 Antivirus,
Signaturdatenbank-Version 6025 (20110408) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
__________ Hinweis von ESET NOD32 Antivirus,
Signaturdatenbank-Version 6026 (20110408) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
<qbus_01.zip><ArticleBAS.wsdl>
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version
6037 (20110412) __________
E-Mail wurde gepr�ft mit ESET NOD32 Antivirus.
http://www.eset.com
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version
6037 (20110412) __________
E-Mail wurde gepr�ft mit ESET NOD32 Antivirus.
http://www.eset.com