How do you deploy service assembly? With maven? I don't use maven but I start servicemix (cd $SERViCEMIX_HOME; ./bin/servicemix) and I copy serviceassembly.zip in $SERViCEMIX_HOME/deploy directory.
Can you attach your service assembly zip? beyond30lyc wrote: > > Hello,i want to expose .NET external web service to the jbi using your > method.my http consumer project is named external-service-consumer,and the > http provider is named external-service-provider,the assembly is named > external-service-assembly. > I have already installed the consumer and the provider.but when i deploy > the assembly,an error occurs as below: > [ERROR] mojo-execute : jbi:generate-jbi-service-assembly-descriptor > Diagnosis: The service unit external-service-http-provider does not have a > dependency which is packaged as a jbi-component or a project property > 'componentName' > FATAL ERROR: Error executing Maven for a project > [ERROR] project-execute : > com.mycompany:external-service-assembly:jbi-service-assembly:1.0-SNAPSHOT > ( task-segment: [install, jbi:projectDeploy] ) > Diagnosis: The service unit external-service-http-provider does not have a > dependency which is packaged as a jbi-component or a project property > 'componentName' > FATAL ERROR: Error executing Maven for a project > [INFO] jbi:projectDeploy > [INFO] snapshot com.mycompany:external-service-assembly:1.0-SNAPSHOT: > checking for updates from logicblaze > [INFO] ------------------ Deployment Analysis -------------------- > [INFO] A custom project has 2 child dependencies > [INFO] - jbi-service-assembly : C:\Documents and > Settings\Owner\.m2\repository\com\mycompany\external-service-assembly\1.0-SNAPSHOT\external-service-assembly-1.0-SNAPSHOT.zip > [INFO] - jbi-component : C:\Documents and > Settings\Owner\.m2\repository\org\apache\servicemix\servicemix-http\fuse-3.0.1\servicemix-http-fuse-3.0.1-installer.zip > [INFO] - jbi-shared-library : C:\Documents and > Settings\Owner\.m2\repository\org\apache\servicemix\servicemix-shared\fuse-3.0.1\servicemix-shared-fuse-3.0.1-installer.zip > [INFO] ----------------------------------------------------------- > [INFO] external-service-assembly is deployed > [INFO] Stopping external-service-assembly > [INFO] Undeploying C:\Documents and > Settings\Owner\.m2\repository\com\mycompany\external-service-assembly\1.0-SNAPSHOT\external-service-assembly-1.0-SNAPSHOT.zip > [INFO] Deploying jbi-service-assembly from C:\Documents and > Settings\Owner\.m2\repository\com\mycompany\external-service-assembly\1.0-SNAPSHOT\external-service-assembly-1.0-SNAPSHOT.zip > [INFO] Starting external-service-assembly > [INFO] > ---------------------------------------------------------------------------- > [INFO] BUILD SUCCESSFUL > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: 206 second > [INFO] Finished at: Tue Jan 16 16:52:38 CST 2007 > [INFO] Memory 10M/24M > [INFO] > ---------------------------------------------------------------------------- > [INFO] Error for project: A custom project (during install) > [INFO] > ------------------------------------------------------------------------ > [INFO] The service unit external-service-http-provider does not have a > dependency which is packaged as a jbi-component or a project property > 'componentName' > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace The service unit external-service-http-provider does not have > a dependency which is packaged as a jbi-component or a project property > 'componentName' > [INFO] > ------------------------------------------------------------------------ > [ERROR] reactor-execute : D:\TOOLS\DEVELOPING > TOOLS\eclipse\eclipse2\eclipse\workspace\external-service-assembly > FATAL ERROR: Error executing Maven for a project > [INFO] BUILD ERRORS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 5 minutes 4 seconds > [INFO] Finished at: Tue Jan 16 16:52:38 CST 2007 > [INFO] Final Memory: 10M/24M > [INFO] > ------------------------------------------------------------------------ > Exception in thread "main" java.lang.RuntimeException: Apache Maven build > exception [Some builds failed] > at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:110) > Caused by: org.apache.maven.reactor.MavenExecutionException: Some builds > failed > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:210) > at > org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:690) > at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:107) > > > pascale4 wrote: >> >> Hi, >> after a lot of test I learnt how to expose an external web service >> through http-component. >> >> Suppose you have a web service with this wsdl : >> >> <?xml version="1.0" encoding="UTF-8"?> >> <wsdl:definitions >> targetNamespace="http://localhost:8080/helloworldws/services/HelloWorldService" >> xmlns="http://schemas.xmlsoap.org/wsdl/" >> xmlns:apachesoap="http://xml.apache.org/xml-soap" >> xmlns:impl="http://localhost:8080/helloworldws/services/HelloWorldService" >> xmlns:intf="http://localhost:8080/helloworldws/services/HelloWorldService" >> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> <wsdl:types/> >> <wsdl:message name="echoResponse"> >> <wsdl:part name="echoReturn" type="xsd:string"/> >> </wsdl:message> >> <wsdl:message name="echoRequest"> >> </wsdl:message> >> <wsdl:portType name="HelloWorldService"> >> <wsdl:operation name="echo"> >> <wsdl:input message="impl:echoRequest" name="echoRequest"/> >> <wsdl:output message="impl:echoResponse" name="echoResponse"/> >> </wsdl:operation> >> </wsdl:portType> >> <wsdl:binding name="HelloWorldServiceSoapBinding" >> type="impl:HelloWorldService"> >> <wsdlsoap:binding style="rpc" >> transport="http://schemas.xmlsoap.org/soap/http"/> >> <wsdl:operation name="echo"> >> <wsdlsoap:operation soapAction=""/> >> <wsdl:input name="echoRequest"> >> <wsdlsoap:body >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> namespace="http://localhost:8080/helloworldws/services/HelloWorldService" >> use="encoded"/> >> </wsdl:input> >> <wsdl:output name="echoResponse"> >> <wsdlsoap:body >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> namespace="http://localhost:8080/helloworldws/services/HelloWorldService" >> use="encoded"/> >> </wsdl:output> >> </wsdl:operation> >> </wsdl:binding> >> <wsdl:service name="HelloWorldServiceService"> >> <wsdl:port binding="impl:HelloWorldServiceSoapBinding" >> name="HelloWorldService"> >> <wsdlsoap:address >> location="http://localhost:8080/helloworldws/services/HelloWorldService"/> >> </wsdl:port> >> </wsdl:service> >> </wsdl:definitions> >> >> Then you have to define an http-component provider with this xbean.xml : >> >> <?xml version="1.0" encoding="UTF-8"?> >> <beans >> xmlns:http="http://servicemix.apache.org/http/1.0" >> >> xmlns:ns1="http://localhost:8080/helloworldws/services/HelloWorldService" >>> >> <http:endpoint >> service="ns1:HelloWorldServiceService" >> endpoint="HelloWorldService" >> role="provider" >> >> locationURI="http://localhost:8080/helloworldws/services/HelloWorldService" >> >> wsdlResource="http://localhost:8080/helloworldws/services/HelloWorldService?wsdl" >> /> >> </beans> >> >> where >> - ns1 : must match namespaces in wsdl >> - service : must match value of attribute name of element wsdl:service in >> wsdl >> <wsdl:service name="HelloWorldServiceService"> >> - endpoint : must match value of attribute name of element wsdl:port >> <wsdl:port binding="impl:HelloWorldServiceSoapBinding" >> name="HelloWorldService"> >> >> Now you have to define http-component consumer with this xbean.xml : >> >> <?xml version="1.0" encoding="UTF-8"?> >> <beans >> xmlns:http="http://servicemix.apache.org/http/1.0" >> >> xmlns:ns1="http://localhost:8080/helloworldws/services/HelloWorldService" >>> >> <http:endpoint >> service="ns1:HelloWorldServiceConsumer" >> endpoint="HelloWorldEndpointConsumer" >> role="consumer" >> targetService="ns1:HelloWorldServiceService" >> locationURI="http://localhost:8192/services/HelloWorldService/" >> defaultMep="http://www.w3.org/2004/08/wsdl/in-out" >> /> >> </beans> >> >> where >> - ns1 : must match namespaces in wsdl >> - targetService : must match service value in xbean.xml of provider >> <http:endpoint >> service="ns1:HelloWorldServiceService" >> endpoint="HelloWorldService" >> role="provider" >> >> And this is the jbi.xml of Service Assembly : >> <?xml version="1.0" encoding="UTF-8"?> >> <jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0"> >> <service-assembly> >> <identification> >> <name>helloworld-sa</name> >> <description>Codices :: HelloWorld :: SA</description> >> </identification> >> <service-unit> >> <identification> >> <name>http-su-provider</name> >> <description>Http BC provider</description> >> </identification> >> <target> >> <artifacts-zip>http-su-provider.zip</artifacts-zip> >> <component-name>servicemix-http</component-name> >> </target> >> </service-unit> >> <service-unit> >> <identification> >> <name>http-su-consumer</name> >> <description>Http BC consumer</description> >> </identification> >> <target> >> <artifacts-zip>http-su-consumer.zip</artifacts-zip> >> <component-name>servicemix-http</component-name> >> </target> >> </service-unit> >> </service-assembly> >> </jbi> >> >> That's all folks >> >> This is the source http://www.nabble.com/file/5642/helloworld-sa.zip >> helloworld-sa.zip >> >> Massimo >> > > -- View this message in context: http://www.nabble.com/Expose-external-web-service-with-http-component-%28very-simplified%29-tf3014055s12049.html#a8386775 Sent from the ServiceMix - User mailing list archive at Nabble.com.
