-
1. Re: Using the servicemix-cxf-se-service-unit archetype
ccustine Jan 14, 2008 7:18 PM (in response to martinmurphy)Hi Martin,
I think the main reason this is missing is because the archetype is agnostic to whether you are doing Java first or WSDL first so we would either have to create two commented sections in the pom.xml or split this out into two archetypes. I'm not sure which would be the most useful. Any other thoughts on making the archetype add more value?
In the mean time, of course you can see an example of configuring the codegen plugin for wsdl first development here in the samples.
Chris
-
2. Re: Using the servicemix-cxf-se-service-unit archetype
martinmurphy Jan 14, 2008 7:32 PM (in response to ccustine)Good point, I was forgetting about the Java first approach. I think it would be handy to have a commented out section in the pom for the wsdl compiler to save you having to go around rooting for the sample.
In general I find archetypes are great to get started, but only as a launch pad. Its only after a number of modifications to the project that its really something solid so I wouldn't get too worried about this.
I have my test up and running now, so I'm happy anyway
-
3. Re: Using the servicemix-cxf-se-service-unit archetype
ccustine Jan 14, 2008 10:47 PM (in response to martinmurphy)After thinking about this for a bit, I wonder if it will be helpful to generate a stub Java interface and implementation class with matching javatowsdl config for cxf-codegen as well as a basic template wsdl and config for wsdltojava. That way you can have an example of both. Any thoughts?
Chris
-
4. Re: Using the servicemix-cxf-se-service-unit archetype
dkulp_dkulp Jan 15, 2008 12:06 PM (in response to ccustine)It really depends on what you want to do.
If I'm doing java first stuff with pure CXF, I DON'T want to see a wsdl at all. In general, I DON'T run java2wsdl. It's not needed.
That all said, the new wsdl2java plugin for 2.0.4/2.1 can help. It can be setup to run on all the *.wsdl files in a particular directory. If there are none there, it just doesn't do anything. Thus, the archtype COULD have wsdl2java configured and it would run if there is a wsdl and it won't if there isn't.
-
5. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 23, 2008 2:21 PM (in response to martinmurphy)hello,
so at the end what did you do to have the java first project up and running?
i was wondering why there is an example wsdl first and anytjhing about java first.
-
6. Re: Using the servicemix-cxf-se-service-unit archetype
edelln Apr 24, 2008 4:24 AM (in response to kelvinflow)Hi,
There is an example of creating a java first approach in the logistics demo
http://open.iona.com/wiki/display/ProdInfo/UseCasestobeAddressed
Have a look at the Service and Consumer creation - they maybe of help - these use cases are talking about using cxf and the service will be deployed in Servicemix. It uses the servicemix cxf components and using the servicemix-cxf-bc requires you to generate a wsdl.
Hope this helps, Edell.
-
7. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 24, 2008 5:28 PM (in response to edelln)thank you Edell, i will check this example. let's see how it is going.
-
8. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 25, 2008 4:07 PM (in response to edelln)hey guys, where i can get the javaToWsdl tool.
-
9. Re: Using the servicemix-cxf-se-service-unit archetype
ccustine Apr 26, 2008 1:27 PM (in response to kelvinflow)The java2wsdl tool is part of cxf-codegen-plugin maven plugin. You can find some information on configuring the plugin here
Chris
Edited by: ccustine on Apr 26, 2008 11:26 AM
-
10. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 28, 2008 1:37 PM (in response to ccustine)hi guys, i managed to do the order example from scratch, which is based on servicemix-cxf-se-service-unit archetype. It was sucessfully deployed on my servicemix fuse container however i don't know how can i consume this web service.
The use case example say this You should then see the order Service launch on Port 8192.
I was trying to browse to http://localhost:8192/orderService/ with either a browser or soapui and could find anything there. What it is the address i should use to consume this web service following the example.
Thanks in advance.
ko
-
11. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 28, 2008 4:15 PM (in response to edelln)After some reading i found how to consume the web service but still having an issue with the demo.
When i call the web services i get a soap error response that i can not understand why it is happening
this is the error
Unmarshalling Error : unexpected element (uri:"http://logisticx.demo.fuse.iona.com/orderService/", local:"getOrderStatus"). Expected elements are (none)
and this is the request i'm using to test the web services
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://logisticx.demo.fuse.iona.com/orderService/">
<soapenv:Header/>
<soapenv:Body>
<ord:getOrderStatus>
<arg0>1</arg0>
</ord:getOrderStatus>
</soapenv:Body>
</soapenv:Envelope>
i checked the wsdl file and everything seems to be ok about the definitions.
can someone give me any clues here?
-
12. Re: Using the servicemix-cxf-se-service-unit archetype
bsnyder Apr 28, 2008 7:15 PM (in response to kelvinflow)What is the SOAP XML that you submitted to the service? Based on the error below:
Unmarshalling Error : unexpected element (uri:"http://logisticx.demo.fuse.iona.com/orderService/", local:"getOrderStatus"). Expected elements are (none)
it is stating that no XML at all has been submitted to the service. In order to invoke the web service, you must submit SOAP XML that abides by the WSDL for that service. If the service is, in fact, successfully deployed, you can view the WSDL at the following URL:
http://localhost:8192/orderService?wsdl
Bruce
-
13. Re: Using the servicemix-cxf-se-service-unit archetype
kelvinflow Apr 29, 2008 8:12 AM (in response to bsnyder)this is the xml i'm summiting
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://logisticx.demo.fuse.iona.com/orderService/">
<soapenv:Header/>
<soapenv:Body>
<ord:getOrderStatus>
<arg0>1455</arg0>
</ord:getOrderStatus>
</soapenv:Body>
</soapenv:Envelope>
Against the wsdl i can say it is valid. Another thing is that web services is being published where the wsdl:service tag stay
<wsdl:service name="OrderServiceService">
<wsdl:port binding="tns:OrderServiceServiceSoapBinding" name="OrderServicePort">
<soap:address location="http://localhost:9090/hello"/>
</wsdl:port>
</wsdl:service>
this is the address http://localhost:9090/hello.
I don't know why it is diffrent from the example, even if i try to change the binding to another port 8192 for example there is something strange going on.
-
14. Re: Using the servicemix-cxf-se-service-unit archetype
edelln Apr 29, 2008 8:41 AM (in response to kelvinflow)Can you send the snippet of wsdl that includes the binding and service
and also send your xbean.xml.
Edell.