Thanks for the link. Some of the wsdl links in that page seem to be missing. But nevertheless it was quite useful.
I created a HttpProviderService.java which when invoked will print "Hello World" in a file. I created the su and the sa and deployed it without any error. But it doesn't show up on the list of services on http://localhost:8192. Even when I deploy the example application bridge, it shows up as a service but doesn't get the wsdl when clicked on. Is this an installation issue? Can you please tell me if the following steps are correct (especially the location of files and dependencies)? Step 1: Created a http-provider-su using mvn archetype servicemix-http-provider-endpoint and update pom.xml with dependencies and xbean.wsdl My xbean.wsdl: <beans xmlns:http="http://servicemix.apache.org/http/1.0" xmlns:ex="http://servicemix.apache.org/example"> <http:endpoint service="ex:HttpProviderService" endpoint="httpProvider" role="provider" locationURI="http://localhost:8192/Service/" defaultMep="http://www.w3.org/2004/08/wsdl/in-out" /> </beans> Step 2: Implementation of the Service: http-provider-su/src/main/java/org/apache/servicemix/examples/HttpProviderService.java: package org.apache.servicemix.examples; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.servicemix.http.endpoints.HttpProviderEndpoint; public class HttpProviderService extends HttpProviderEndpoint{ public void sayHelloWorld() throws Exception{ File output = new File("C:output.txt"); FileWriter writer = new FileWriter(output); writer.write("Hello World\n"); writer.close(); } } Step 3: Created a http-service-sa and added the following dependency: <dependency> <groupId>org.apache.servicemix.examples</groupId> <artifactId>http-provider-su</artifactId> <version>1.0-SNAPSHOT</version> </dependency> Step 4: mvn clean install Thanks a lot, Nithya Jeff Yu wrote: > > Please see http://servicemix.apache.org/servicemix-http.html, it provides > the answers to your question, I believe. > > > On Jan 9, 2008 3:21 PM, nvijayak <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I am looking for an example for http provider su. I am writing a simple >> example of http-provider using servicemix-http-provider maven archetype. >> I >> am not sure if my xbean.wsdl is correct: >> >> <beans xmlns:http="http://servicemix.apache.org/http/1.0" >> xmlns:ex="http://servicemix.apache.org/example"> >> <http:endpoint service="ex:httpProvider" >> endpoint="soap" >> role="provider" >> locationURI="http://localhost:8192/httpProvider/" >> defaultMep="http://www.w3.org/2004/08/wsdl/in-out" soap="true" /> >> </beans> >> >> Do I need to specify a targetService? Does service and targetService have >> to >> be the same? Also do I need to specify an endpoint other than soap? If >> the >> xbean.wsdl in src/main/resources will it automatically use the class from >> src/main/java for the service? >> >> Sorry for asking many simple questions. It will greatly help me as a >> first >> time user. >> >> Thanks, >> Nithya >> >> can the xbean.wsdl be >> >> >> -- >> View this message in context: >> http://www.nabble.com/Example-for-http-provider-su-tp14706426s12049p14706426.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > -- > Thanks > Jeff > > -- View this message in context: http://www.nabble.com/Example-for-http-provider-su-tp14706426s12049p14720401.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
