http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfbc-bundle/src/main/resources/person.wsdl ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfbc-bundle/src/main/resources/person.wsdl b/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfbc-bundle/src/main/resources/person.wsdl deleted file mode 100644 index 9ff2483..0000000 --- a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfbc-bundle/src/main/resources/person.wsdl +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- $Rev$ $Date$ --> -<wsdl:definitions name="wsdl-first" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" - xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" - targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> - - <wsdl:types> - <xsd:schema targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types" - elementFormDefault="qualified"> - <xsd:element name="GetPerson"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="GetPersonResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - <xsd:element name="ssn" type="xsd:string"/> - <xsd:element name="name" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="UnknownPersonFault"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:schema> - </wsdl:types> - - <wsdl:message name="GetPersonRequest"> - <wsdl:part name="payload" element="typens:GetPerson"/> - </wsdl:message> - <wsdl:message name="GetPersonResponse"> - <wsdl:part name="payload" element="typens:GetPersonResponse"/> - </wsdl:message> - <wsdl:message name="UnknownPersonFault"> - <wsdl:part name="payload" element="typens:UnknownPersonFault"/> - </wsdl:message> - - <wsdl:portType name="Person"> - <wsdl:operation name="GetPerson"> - <wsdl:input message="tns:GetPersonRequest"/> - <wsdl:output message="tns:GetPersonResponse"/> - <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="PersonSOAPBinding" type="tns:Person"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetPerson"> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - <wsdl:fault name="UnknownPerson"> - <soap:fault use="literal" name="UnknownPerson" /> - </wsdl:fault> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="PersonService"> - <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> - <soap:address location="http://localhost:8092/PersonService/" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/pom.xml b/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/pom.xml deleted file mode 100644 index 7ab2014..0000000 --- a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>cxf-wsdl-first-osgi-package</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.cxf-wsdl-first-osgi-package</groupId> - <artifactId>wsdl-first-cxfse-bundle</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF SE Bundle</name> - <description>CXF WSDL first example :: CXF SE Bundle</description> - - <dependencies> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <executions> - <execution> - <phase>generate-sources</phase> - <configuration> - <sourceRoot>${basedir}/target/jaxws</sourceRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/main/resources/person.wsdl</wsdl> - <extraargs> - <extraarg>-verbose</extraarg> - </extraargs> - </wsdlOption> - </wsdlOptions> - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Import-Package> - javax.jws, - javax.wsdl, - javax.xml.bind, - javax.xml.bind.annotation, - javax.xml.namespace, - javax.xml.soap, - javax.xml.ws, - org.apache.servicemix.cxfse, - org.springframework.beans.factory.config, - org.apache.servicemix.common.osgi - </Import-Package> - <Export-Package> - org.apache.servicemix.samples.wsdl_first, - org.apache.servicemix.samples.wsdl_first.types - </Export-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java b/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java deleted file mode 100644 index d8bc59e..0000000 --- a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.servicemix.samples.wsdl_first; - -import javax.jws.WebService; -import javax.xml.ws.Holder; - -import org.apache.servicemix.samples.wsdl_first.types.GetPerson; -import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse; - -@WebService(serviceName = "PersonService", targetNamespace = "http://servicemix.apache.org/samples/wsdl-first", endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person") -public class PersonImpl implements Person { - - public void getPerson(Holder<String> personId, Holder<String> ssn, Holder<String> name) - throws UnknownPersonFault - { - if (personId.value == null || personId.value.length() == 0) { - org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault(); - fault.setPersonId(personId.value); - throw new UnknownPersonFault(null, fault); - } - name.value = "Guillaume"; - ssn.value = "000-000-0000"; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/META-INF/spring/beans.xml b/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 39e40cf..0000000 --- a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/META-INF/spring/beans.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://servicemix.apache.org/cxfse/1.0 http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd"> - - - <cxfse:endpoint> - <cxfse:pojo> - <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl" /> - </cxfse:pojo> - </cxfse:endpoint> - - <bean class="org.apache.servicemix.common.osgi.EndpointExporter" /> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/person.wsdl ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/person.wsdl b/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/person.wsdl deleted file mode 100644 index 9ff2483..0000000 --- a/examples/jbi/cxf-wsdl-first-osgi-package/wsdl-first-cxfse-bundle/src/main/resources/person.wsdl +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- $Rev$ $Date$ --> -<wsdl:definitions name="wsdl-first" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" - xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" - targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> - - <wsdl:types> - <xsd:schema targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types" - elementFormDefault="qualified"> - <xsd:element name="GetPerson"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="GetPersonResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - <xsd:element name="ssn" type="xsd:string"/> - <xsd:element name="name" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="UnknownPersonFault"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:schema> - </wsdl:types> - - <wsdl:message name="GetPersonRequest"> - <wsdl:part name="payload" element="typens:GetPerson"/> - </wsdl:message> - <wsdl:message name="GetPersonResponse"> - <wsdl:part name="payload" element="typens:GetPersonResponse"/> - </wsdl:message> - <wsdl:message name="UnknownPersonFault"> - <wsdl:part name="payload" element="typens:UnknownPersonFault"/> - </wsdl:message> - - <wsdl:portType name="Person"> - <wsdl:operation name="GetPerson"> - <wsdl:input message="tns:GetPersonRequest"/> - <wsdl:output message="tns:GetPersonResponse"/> - <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="PersonSOAPBinding" type="tns:Person"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetPerson"> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - <wsdl:fault name="UnknownPerson"> - <soap:fault use="literal" name="UnknownPerson" /> - </wsdl:fault> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="PersonService"> - <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> - <soap:address location="http://localhost:8092/PersonService/" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/README.txt ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/README.txt b/examples/jbi/cxf-wsdl-first/README.txt deleted file mode 100644 index a645109..0000000 --- a/examples/jbi/cxf-wsdl-first/README.txt +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -WSDL First JBI Service Assembly Example -======================================= - -Purpose -------- -Publish a WSDL-defined web service, as a JBI service assembly, using CXF. - -This example is the same as the cxf-wsdl-first-osgi-package example except -it is deployed as a JBI service assembly, whereas the cxf-wsdl-first-osgi- -package example is deployed as OSGi bundles. - - -Explanation ------------ -The CXF service engine and CXF binding component are used to expose the -web service. Each one is packaged in a service unit (SU), as follows: - -1. CXF service engine (see the wsdl-first-cxfse-su directory): - - - Contains a copy of the service WSDL file, person.wsdl, in the - src/main/resources directory. - - - The service implementation file, PersonImpl.java, in the - src/main/java/org/apache/servicemix/samples/wsdl_first directory. - It contains JAX-WS annotations that specify which web service - it implements: - - @WebService(serviceName = "PersonService", - targetNamespace = "http://servicemix.apache.org/samples/wsdl-first", - endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person") - - - A configuration file, xbean.xml, located in the src/main/resources - directory, which configures the CXF endpoint: - - <cxfse:endpoint> - <cxfse:pojo> - <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl" /> - </cxfse:pojo> - </cxfse:endpoint> - -2. CXF binding component (see the wsdl-first-cxfbc-su directory): - - - Contains a copy of the service WSDL file, person.wsdl, in the - src/main/resources directory. - - - A configuration file, xbean.xml, located in the src/main/resources - directory, which specifies a CXF consumer that will accept - incoming calls for that web service and pass them to the NMR: - - <cxfbc:consumer wsdl="classpath:person.wsdl" - targetService="person:PersonService" - targetInterface="person:Person"/> - -Lastly, Maven uses the pom.xml file, located in the wsdl-first-cxf-sa -directory, to package the SUs into a JBI service assembly (SA) ready -for deployment. - - -Prerequisites for Building and Running this Example ---------------------------------------------------- -1. You must have the following installed on your machine: - - - JDK 1.6 or higher. - - - Apache Maven 2.2.1 or higher. - - For more information, see the README in the top-level examples - directory. - -2. Launch ServiceMix by running the following command: - - <servicemix_home>/bin/servicemix (on UNIX) - <servicemix_home>\bin\servicemix (on Windows) - - -Building and Deploying ----------------------- -To build the example, run the following command (from the -directory that contains this README): - - mvn install - -If all of the required OSGi bundles are available in your local Maven -repository, the example will build quickly. Otherwise it may take -some time for Maven to download everything it needs. - -Once complete, you will find the SA, called wsdl-first-cxf-sa- -${version}.zip, in the wsdl-first-cxf-sa/target directory. - -You can deploy the SA in two ways: - -- Using Hot Deployment - -------------------- - - Copy the wsdl-first-cxf-sa/target/wsdl-first-cxf-sa-${version}.zip - to the <servicemix_home>/deploy directory. - -- Using the ServiceMix Console - ---------------------------- - - Enter the following command: - - osgi:install -s mvn:org.apache.servicemix.examples.cxf-wsdl-first/wsdl-first-cxf-sa/${version}/zip - -You can browse the WSDL at: - - http://localhost:8092/PersonService?wsdl - - -Running a Client ----------------- -To run the web client: - -1. Open the client.html, which is located in the same directory - as this README file, in your favorite browser. - -2. Click the Send button to send a request. - - Once the request has been successfully sent, a response similar - to the following should appear in the right-hand panel of the - web page: - - STATUS: 200 - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> - <soap:Body><GetPersonResponse xmlns="http://servicemix.apache.org/ - samples/wsdl-first/types"><personId>world</personId> - <ssn>000-000-0000</ssn><name>Guillaume</name></GetPersonResponse> - </soap:Body> - </soap:Envelope> - -To run the Java code client: - -1. Change to the <servicemix_home>/examples/cxf-wsdl-first/client - directory. - -2. Run the following command: - - mvn compile exec:java - - If the client request is successful, a response similar to the - following should appear in the ServiceMix console: - - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> - <soap:Body><GetPersonResponse xmlns="http://servicemix.apache.org/ - samples/wsdl-first/types"><personId>world</personId> - <ssn>000-000-0000</ssn><name>Guillaume</name></GetPersonResponse> - </soap:Body> - </soap:Envelope> - - -Stopping and Uninstalling the Example -------------------------------------- -To stop the example, you must first know the bundle ID that ServiceMix -has assigned to it. To get the bundle ID, enter the following command -in the ServiceMix console: - - osgi:list - -At the end of the listing, you should see an entry similar to one of -the following (depending on how you deployed the example): - -[ 183] [Active ] [ ] [ ] [ 60] mvn:org.apache.servicemix.examples.cxf-wsdl-first/wsdl-first-cxf-sa/${version}/zip - -[ 183] [Active ] [ ] [ ] [ 60] wsdl-first-cxf-sa (0.0.0) - -In this case, the bundle ID is 183. - -To stop the example, enter the following command in the ServiceMix -console: - - osgi:stop <bundle_id> - -To uninstall the example, enter the following command in the -ServiceMix console: - - osgi:uninstall <bundle_id> - - -Viewing the Log Entries ------------------------ -You can view the entries in the log file in the data/log directory -of your ServiceMix installation, or by typing the following command -in the ServiceMix console: - - log:display - - -Changing the Example --------------------- -If you want to change the code or configuration, just use 'mvn install' -to rebuild the JBI Service Assembly zip file, and deploy it as before. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/client.html ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/client.html b/examples/jbi/cxf-wsdl-first/client.html deleted file mode 100644 index 9ffcb63..0000000 --- a/examples/jbi/cxf-wsdl-first/client.html +++ /dev/null @@ -1,135 +0,0 @@ -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- $Rev: 593004 $ $Date: 2007-11-08 04:04:54 +0000 (Thu, 08 Nov 2007) $ --> -<html> -<head> -<title>ServiceMix WSDL-First Example</title> -<script type="text/javascript"> -var urlToOpen = "http://localhost:8092/PersonService/"; //default URL to open - -function getHTTPObject() { - var xmlhttp = false; - - /* Compilation conditionnelle d'IE */ - /*@cc_on - @if (@_jscript_version >= 5) - try { - xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (E) { - xmlhttp = false; - } - } - @else - xmlhttp = false; - @end @*/ - - /* on essaie de cr�er l'objet si ce n'est pas d�j� fait */ - if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { - try { - xmlhttp = new XMLHttpRequest(); - } catch (e) { - xmlhttp = false; - } - } - - if (xmlhttp) { - /* on d�finit ce qui doit se passer quand la page r�pondra */ - xmlhttp.onreadystatechange=function() { - if (xmlhttp.readyState == 4) { /* 4 : �tat "complete" */ - var response = document.getElementById("response"); - var responseStatus = ""; - try { - responseStatus = xmlhttp.status + ""; - } catch (e) { - responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT."; - } - response.value = "STATUS: " + responseStatus + "\n" + xmlhttp.responseText; - } - } - } - return xmlhttp; -} - -function send() { - if ((document.getElementById("urlToOpen").value != urlToOpen) && (document.getElementById("urlToOpen").value != "")) { - //use user entry only if it at least can be okay - urlToOpen = document.getElementById("urlToOpen").value; - } - var xmlhttp = getHTTPObject(); - if (!xmlhttp) { - alert('cound not create XMLHttpRequest object'); - return; - } - var request = document.getElementById("request"); - var response = document.getElementById("response"); - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite"); - } catch (e) { - } - try { - xmlhttp.open("POST", urlToOpen, true); - } catch (e) { - alert('error opening'); - } - xmlhttp.send(request.value); -} - -</script> -</head> - -<body> - -<h1>ServiceMix WSDL-First Example</h1> - -<p>Welcome to the WSDL-First example for ServiceMix</p> - -<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> -<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script type="text/javascript">document.getElementById("urlToOpen").value = urlToOpen;</script>.</p> - -<table> - <tr> - <td> - <textarea id="request" style="width:600px;height:400px" onKeyUp="send();"><?xml version="1.0" encoding="UTF-8"?> -<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types"> - <env:Body> - <tns:GetPerson> - <tns:personId>world</tns:personId> - </tns:GetPerson> - </env:Body> -</env:Envelope> - - </textarea> - </td> - <td> - <textarea id="response" style="width:600px;height:400px"> - </textarea> - </td> - </tr> - <tr> - <td colspan=2> - <input type="button" value="Send" onClick="send();"/> - </td> - </tr> -</table> -</body> -</html> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/client/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/client/pom.xml b/examples/jbi/cxf-wsdl-first/client/pom.xml deleted file mode 100644 index e8c126e..0000000 --- a/examples/jbi/cxf-wsdl-first/client/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>cxf-wsdl-first</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-client</artifactId> - <name>Apache ServiceMix :: Features :: Examples :: WSDL First :: Client</name> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-utils</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <configuration> - <mainClass>org.apache.servicemix.samples.wsdl_first.Client</mainClass> - <includePluginDependencies>false</includePluginDependencies> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/client/src/main/java/org/apache/servicemix/samples/wsdl_first/Client.java ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/client/src/main/java/org/apache/servicemix/samples/wsdl_first/Client.java b/examples/jbi/cxf-wsdl-first/client/src/main/java/org/apache/servicemix/samples/wsdl_first/Client.java deleted file mode 100644 index c6a2a92..0000000 --- a/examples/jbi/cxf-wsdl-first/client/src/main/java/org/apache/servicemix/samples/wsdl_first/Client.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.servicemix.samples.wsdl_first; - -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URL; -import java.net.URLConnection; - -import org.apache.servicemix.util.FileUtil; - -public class Client{ - public static void main(String[] args) { - try { - new Client().sendRequest(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void sendRequest() throws Exception { - URLConnection connection = new URL("http://localhost:8092/PersonService/") - .openConnection(); - connection.setDoInput(true); - connection.setDoOutput(true); - OutputStream os = connection.getOutputStream(); - // Post the request file. - InputStream fis = getClass().getClassLoader().getResourceAsStream("org/apache/servicemix/samples/wsdl_first/request.xml"); - FileUtil.copyInputStream(fis, os); - // Read the response. - InputStream is = connection.getInputStream(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - FileUtil.copyInputStream(is, baos); - System.out.println("the response is =====>"); - System.out.println(baos.toString()); - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/client/src/main/resources/org/apache/servicemix/samples/wsdl_first/request.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/client/src/main/resources/org/apache/servicemix/samples/wsdl_first/request.xml b/examples/jbi/cxf-wsdl-first/client/src/main/resources/org/apache/servicemix/samples/wsdl_first/request.xml deleted file mode 100644 index 8a56f1c..0000000 --- a/examples/jbi/cxf-wsdl-first/client/src/main/resources/org/apache/servicemix/samples/wsdl_first/request.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types"> - <env:Body> - <tns:GetPerson> - <tns:personId>world</tns:personId> - </tns:GetPerson> - </env:Body> -</env:Envelope> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/pom.xml b/examples/jbi/cxf-wsdl-first/pom.xml deleted file mode 100644 index 1e6df06..0000000 --- a/examples/jbi/cxf-wsdl-first/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>jbi</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <artifactId>cxf-wsdl-first</artifactId> - <name>Apache ServiceMix :: Features :: Examples :: CXF WSDL First</name> - <packaging>pom</packaging> - - <modules> - <module>wsdl-first-cxfse-su</module> - <module>wsdl-first-cxfbc-su</module> - <module>wsdl-first-cxf-sa</module> - <module>client</module> - </modules> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <inherited>false</inherited> - <executions> - <execution> - <id>src</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - <configuration> - <descriptors> - <descriptor>src/main/assembly/src.xml</descriptor> - </descriptors> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>jbi-maven-plugin</artifactId> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/src/main/assembly/src.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/src/main/assembly/src.xml b/examples/jbi/cxf-wsdl-first/src/main/assembly/src.xml deleted file mode 100644 index 8863742..0000000 --- a/examples/jbi/cxf-wsdl-first/src/main/assembly/src.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<assembly> - <id>src</id> - <formats> - <format>tar.gz</format> - <format>zip</format> - </formats> - <fileSets> - <fileSet> - <includes> - <include>README*</include> - <include>LICENSE*</include> - <include>NOTICE*</include> - <include>pom.xml</include> - <include>*.html</include> - <include>src/**/*</include> - <include>*/pom.xml</include> - <include>*/src/**/*</include> - </includes> - </fileSet> - </fileSets> -</assembly> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxf-sa/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxf-sa/pom.xml b/examples/jbi/cxf-wsdl-first/wsdl-first-cxf-sa/pom.xml deleted file mode 100644 index 688197e..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxf-sa/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>cxf-wsdl-first</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-cxf-sa</artifactId> - <packaging>jbi-service-assembly</packaging> - <name>Apache ServiceMix :: Features :: Examples :: WSDL First :: SA</name> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-cxfse-su</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-cxfbc-su</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>jbi-maven-plugin</artifactId> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/pom.xml b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/pom.xml deleted file mode 100644 index e24ab61..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>cxf-wsdl-first</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-cxfbc-su</artifactId> - <packaging>jbi-service-unit</packaging> - <name>Apache ServiceMix :: Features :: Examples :: WSDL First :: CXF BC SU</name> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-cxf-bc</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>jbi-maven-plugin</artifactId> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/person.wsdl ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/person.wsdl b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/person.wsdl deleted file mode 100644 index 1f7c4a5..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/person.wsdl +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- $Rev: 593004 $ $Date: 2007-11-08 04:04:54 +0000 (Thu, 08 Nov 2007) $ --> -<wsdl:definitions name="wsdl-first" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" - xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" - targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> - - <wsdl:types> - <xsd:schema targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types" - elementFormDefault="qualified"> - <xsd:element name="GetPerson"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="GetPersonResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - <xsd:element name="ssn" type="xsd:string"/> - <xsd:element name="name" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="UnknownPersonFault"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:schema> - </wsdl:types> - - <wsdl:message name="GetPersonRequest"> - <wsdl:part name="payload" element="typens:GetPerson"/> - </wsdl:message> - <wsdl:message name="GetPersonResponse"> - <wsdl:part name="payload" element="typens:GetPersonResponse"/> - </wsdl:message> - <wsdl:message name="UnknownPersonFault"> - <wsdl:part name="payload" element="typens:UnknownPersonFault"/> - </wsdl:message> - - <wsdl:portType name="Person"> - <wsdl:operation name="GetPerson"> - <wsdl:input message="tns:GetPersonRequest"/> - <wsdl:output message="tns:GetPersonResponse"/> - <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="PersonSOAPBinding" type="tns:Person"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetPerson"> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - <wsdl:fault name="UnknownPerson"> - <soap:fault use="literal" name="UnknownPerson" /> - </wsdl:fault> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="PersonService"> - <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> - <soap:address location="http://localhost:8092/PersonService/" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/xbean.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/xbean.xml b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/xbean.xml deleted file mode 100644 index b0e1493..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resources/xbean.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" - xmlns:person="http://servicemix.apache.org/samples/wsdl-first"> - - <cxfbc:consumer wsdl="classpath:person.wsdl" - targetService="person:PersonService" - targetInterface="person:Person"/> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml deleted file mode 100644 index 0271a28..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/pom.xml +++ /dev/null @@ -1,118 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>cxf-wsdl-first</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.cxf-wsdl-first</groupId> - <artifactId>wsdl-first-cxfse-su</artifactId> - <packaging>jbi-service-unit</packaging> - <name>Apache ServiceMix :: Features :: Examples :: WSDL First :: CXF SE SU</name> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-cxf-se</artifactId> - </dependency> - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <exclusions> - <exclusion> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>saaj-api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.xml.stream</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.xml.bind</groupId> - <artifactId>jsr173_api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.jws</groupId> - <artifactId>jsr181-api</artifactId> - </exclusion> - <exclusion> - <groupId>javax.jws</groupId> - <artifactId>jsr181</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <executions> - <execution> - <phase>generate-sources</phase> - <configuration> - <sourceRoot>${basedir}/target/jaxws</sourceRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/main/resources/person.wsdl</wsdl> - <extraargs> - <extraarg>-verbose</extraarg> - </extraargs> - </wsdlOption> - - </wsdlOptions> - - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>jbi-maven-plugin</artifactId> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java deleted file mode 100644 index 228d7d1..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.servicemix.samples.wsdl_first; - -import javax.jws.WebService; -import javax.xml.ws.Holder; - -import org.apache.servicemix.samples.wsdl_first.types.GetPerson; -import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse; - -@WebService(serviceName = "PersonService", targetNamespace = "http://servicemix.apache.org/samples/wsdl-first", endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person") -public class PersonImpl implements Person { - - public void getPerson(Holder<String> personId, Holder<String> ssn, Holder<String> name) - throws UnknownPersonFault - { - if (personId.value == null || personId.value.length() == 0) { - org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault(); - fault.setPersonId(personId.value); - throw new UnknownPersonFault(null, fault); - } - name.value = "Guillaume"; - ssn.value = "000-000-0000"; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/person.wsdl ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/person.wsdl b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/person.wsdl deleted file mode 100644 index 1f7c4a5..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/person.wsdl +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!-- $Rev: 593004 $ $Date: 2007-11-08 04:04:54 +0000 (Thu, 08 Nov 2007) $ --> -<wsdl:definitions name="wsdl-first" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" - xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" - targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> - - <wsdl:types> - <xsd:schema targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types" - elementFormDefault="qualified"> - <xsd:element name="GetPerson"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="GetPersonResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - <xsd:element name="ssn" type="xsd:string"/> - <xsd:element name="name" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="UnknownPersonFault"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:schema> - </wsdl:types> - - <wsdl:message name="GetPersonRequest"> - <wsdl:part name="payload" element="typens:GetPerson"/> - </wsdl:message> - <wsdl:message name="GetPersonResponse"> - <wsdl:part name="payload" element="typens:GetPersonResponse"/> - </wsdl:message> - <wsdl:message name="UnknownPersonFault"> - <wsdl:part name="payload" element="typens:UnknownPersonFault"/> - </wsdl:message> - - <wsdl:portType name="Person"> - <wsdl:operation name="GetPerson"> - <wsdl:input message="tns:GetPersonRequest"/> - <wsdl:output message="tns:GetPersonResponse"/> - <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="PersonSOAPBinding" type="tns:Person"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetPerson"> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - <wsdl:fault name="UnknownPerson"> - <soap:fault use="literal" name="UnknownPerson" /> - </wsdl:fault> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="PersonService"> - <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> - <soap:address location="http://localhost:8092/PersonService/" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/xbean.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/xbean.xml b/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/xbean.xml deleted file mode 100644 index 9040850..0000000 --- a/examples/jbi/cxf-wsdl-first/wsdl-first-cxfse-su/src/main/resources/xbean.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"> - - <cxfse:endpoint> - <cxfse:pojo> - <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl" /> - </cxfse:pojo> - </cxfse:endpoint> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/pom.xml b/examples/jbi/pom.xml deleted file mode 100644 index b224767..0000000 --- a/examples/jbi/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>examples</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>jbi</artifactId> - <packaging>pom</packaging> - <name>Apache ServiceMix :: Features :: Examples :: JBI</name> - - <modules> - <module>bridge</module> - <module>bridge-camel</module> - <module>camel</module> - <module>cxf-wsdl-first</module> - <module>cxf-wsdl-first-osgi-package</module> - </modules> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/simple/README.txt ---------------------------------------------------------------------- diff --git a/examples/jbi/simple/README.txt b/examples/jbi/simple/README.txt deleted file mode 100644 index 4f78aa0..0000000 --- a/examples/jbi/simple/README.txt +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Simple Configuration Only Example -================================= - -Purpose -------- -Add new endpoints using XML configuration files only. - - -Explanation ------------ -There are three parts to this example: Quartz, Groovy and WSN. In all three cases, -the JBI endpoints are specified in Spring XML files. When the XML files -are deployed to ServiceMix the endpoints are automatically registered -in the NMR. - -1. Quartz -The quartz.xml file, located in the same director as this README, -shows you how to deploy a Camel route together with a JBI endpoint -in the same XML file. It contains configuration for using the -Quartz job scheduling system to send messages periodically to -a JBI endpoint called 'endpoint'. These messages are routed, -using Camel, to the 'test' logger. - -2. Groovy: -The groovy.xml file, also located in the same directory as this -README, demonstrates how to embed a service implementation in a -configuration file, using a scripting language. In this case, we -use groovy. It uses quartz to send a message every second to the -service 'receiver'. This service is defined as a scripting endpoint, -written in Groovy, using the ServiceMix scripting service engine. -The Groovy script is stored in ServiceMix's document repository -and the script is executed whenever a message is received by the -'receiver' service. - -3. WSN: -The wsn.xml file, also located in the same directory as this README, -demonstrates how to deploy JBI endpoints in XML file. It contains http -endpoints which expose a WS-Notification broker. You can test WS-Notification -broker with the client.html in this folder, open client.html in a browser -and you can -create pull point -subsribe -Notify -getMessages - - - -Prerequisites for Running the Example -------------------------------------- -1. You must have the following installed on your machine: - - - JDK 1.6 or higher - - For more information, see the README in the top-level examples - directory. - -2. Start ServiceMix by running the following command: - - <servicemix_home>/bin/servicemix (on UNIX) - <servicemix_home>\bin\servicemix (on Windows) - - -Running the Example -------------------- -To run the example, copy either of the XML files, quartz.xml or -groovy.xml, from the examples/simple directory to the -<servicemix_home>/deploy directory. - -When the quartz.xml file is copied to the deploy directory, it sends -messages to the log. You can view the log entries by typing the -following command in the ServiceMix console: - - log:display - -You should see an entry similar to the following: - - 14:15:51,202 | INFO | x-camel-thread-4 | test - | rg.apache.camel.processor.Logger 88 | Exchange - [BodyType:javax.xml.transform.dom.DOMSource, - Body:<timer><name>{http://servicemix.apache.org/examples/camel} - service:endpoint</name><group>DEFAULT</group><fullname>DEFAULT. - {http://servicemix.apache.org/examples/camel}service:endpoint - </fullname><description/><fireTime>Mon Mar 23 14:15:51 CST 2009 - </fireTime></timer>] - -When the groovy.xml file is copied to the deploy directory, you should -see the output similar to the following displayed in the console: - - Starting JSR-223 groovy processor - org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@41a330e4 - Hello, I got an input message <?xml version="1.0" encoding="UTF-8" - standalone="no"?><timer><name>{http://servicemix.apache.org/examples - /groovy} service:endpoint</name><group>DEFAULT</group><fullname> - DEFAULT.{http://servicemix.apache.org/examples/groovy}service: - endpoint</fullname><description/><fireTime>Fri Aug 08 13:50:16 - CEST 2008</fireTime></timer> - - -Removing the Example --------------------- -To remove the example, remove the XML file from the -deploy directory. http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/simple/client.html ---------------------------------------------------------------------- diff --git a/examples/jbi/simple/client.html b/examples/jbi/simple/client.html deleted file mode 100644 index 9322364..0000000 --- a/examples/jbi/simple/client.html +++ /dev/null @@ -1,224 +0,0 @@ -<html><head><!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---><!-- $Rev$ $Date$ --><title>ServiceMix SOAP Binding Example</title> - - - - -<script type="text/javascript"> - -function getHTTPObject() { - var xmlhttp = false; - - /* Compilation conditionnelle d'IE */ - /*@cc_on - @if (@_jscript_version >= 5) - try { - xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (E) { - xmlhttp = false; - } - } - @else - xmlhttp = false; - @end @*/ - - /* on essaie de cr�er l'objet si ce n'est pas d�j� fait */ - if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { - try { - xmlhttp = new XMLHttpRequest(); - } catch (e) { - xmlhttp = false; - } - } - - if (xmlhttp) { - /* on d�finit ce qui doit se passer quand la page r�pondra */ - xmlhttp.onreadystatechange=function() { - if (xmlhttp.readyState == 4) { /* 4 : �tat "complete" */ - var response = document.getElementById("response"); - response.value = "STATUS: " + xmlhttp.status + "\n" + xmlhttp.responseText - } - } - } - return xmlhttp; -} - -function send(uri) { - var xmlhttp = getHTTPObject(); - if (!xmlhttp) { - alert('cound not create XMLHttpRequest object'); - return; - } - var request = document.getElementById("request"); - var response = document.getElementById("response"); - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite"); - xmlhttp.open("POST", uri, true); - } catch (e) { - alert('error opening'); - } - xmlhttp.send(request.value); -} - -function sendCPP() { - send("http://localhost:8192/wsn/CreatePullPoint/"); -} - -function sendBroker() { - send("http://localhost:8192/wsn/Broker/"); -} - -var soapPre = "<env:Envelope\n" + - " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" + - " <env:Body>\n"; -var soapPost = " </env:Body>\n" + - "</env:Envelope>\n"; - -function createPullPoint() { - var request = document.getElementById("request"); - request.value = soapPre + - " <wsnt:CreatePullPoint\n" + - " xmlns:wsnt=\"http://docs.oasis-open.org/wsn/b-2\"\n" + - " xmlns:sm=\"http://servicemix.apache.org/wsn2005/1.0\">\n" + - " <sm:address>\n" + - " http://www.consumer.org/service/endpoint\n" + - " </sm:address>\n" + - " </wsnt:CreatePullPoint>\n" + - soapPost; -} - -function subscribe() { - var request = document.getElementById("request"); - request.value = soapPre + - " <wsnt:Subscribe\n" + - " xmlns:wsnt=\"http://docs.oasis-open.org/wsn/b-2\"\n" + - " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\n" + - " xmlns:ncex=\"http://www.consumer.org\"\n" + - " xmlns:npex=\"http://www.producer.org\">\n" + - " <wsnt:ConsumerReference>\n" + - " <wsa:Address>\n" + - " http://www.consumer.org/service/endpoint\n" + - " </wsa:Address>\n" + - " </wsnt:ConsumerReference>\n" + - " <wsnt:Filter>\n" + - " <wsnt:TopicExpression\n" + - " Dialect=\"http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple\">\n" + - " myTopic\n" + - " </wsnt:TopicExpression>\n" + - " </wsnt:Filter>\n" + - " </wsnt:Subscribe>\n" + - soapPost; -} -function notify() { - var request = document.getElementById("request"); - request.value = "<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" + - " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n" + - "<env:Header>\n" + - "<wsa:To>\n" + - "http://www.consumer.org/service/endpoint\n" + - "</wsa:To>\n" + - "</env:Header>\n" + - - "<env:Body>\n" + - "<wsnt:Notify xmlns:wsnt=\"http://docs.oasis-open.org/wsn/b-2\">\n" + - "<wsnt:NotificationMessage>\n" + - "<wsnt:Topic Dialect=\"http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple\">\n" + - "BrewProcess\n" + - "</wsnt:Topic>\n" + - "<wsnt:Message>\n" + - "<alarm:Alarm xmlns:alarm=\"http://alarms.some-host\">\n" + - "<Name>Kettle Overfill</Name>\n" + - "<Desc>Kettle Overfill Alarm</Desc>\n" + - "<Date>2007-09-22-12:00:30:100</Date>\n" + - "<Severity>3</Severity>\n" + - "<Value>110.2</Value>\n" + - "<Ack>false</Ack>\n" + - "</alarm:Alarm>\n" + - "</wsnt:Message>\n" + - "</wsnt:NotificationMessage>\n" + - "</wsnt:Notify>\n" + - "</env:Body>\n" + -"</env:Envelope>" -} -function getMessages() { - var request = document.getElementById("request"); - request.value = "<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" + - "xmlns:wsnt=\"http://docs.oasis-open.org/wsn/b-2\"\n" + - "xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n" + - "<env:Header>\n" + - "<wsa:To>\n" + - "http://www.consumer.org/service/endpoint\n" + - "</wsa:To>\n" + - "</env:Header>\n" + - "<env:Body>\n" + - "<wsnt:GetMessages>\n" + - "<wsnt:MaximumNumber>10</wsnt:MaximumNumber>\n" + - "</wsnt:GetMessages>\n" + - "</env:Body>\n" + -"</env:Envelope>" -} - -</script></head><body> - -<h1>ServiceMix WS-Notification Binding Example</h1> - -<p>Welcome to the WS-Notification example for ServiceMix</p> - -<table> - <tbody><tr> - <td> - <h2>Request</h2> - <textarea id="request" style="width: 600px; height: 300px;"> </textarea> - </td> - <td> - <h2>Response</h2> - <textarea id="response" style="width: 600px; height: 300px;"> </textarea> - </td> - </tr> - <tr> - <td colspan="2"> - <input value="CreatePullPoint" onclick="createPullPoint();" type="button"> - <input value="Send" onclick="sendCPP();" type="button"> - </td> - </tr> - <tr> - <td colspan="2"> - <input value="Subscribe" onclick="subscribe();" type="button"> - <input value="Send" onclick="sendBroker();" type="button"> - </td> - </tr> - <tr> - <td colspan="2"> - <input value="Notify" onclick="notify();" type="button"> - <input value="Send" onclick="sendBroker();" type="button"> - </td> - </tr> - <tr> - <td colspan="2"> - <input value="getMessages" onclick="getMessages();" type="button"> - <input value="Send" onclick="sendBroker();" type="button"> - </td> - - </tr> -</tbody></table> - -</body></html> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/jbi/simple/groovy.xml ---------------------------------------------------------------------- diff --git a/examples/jbi/simple/groovy.xml b/examples/jbi/simple/groovy.xml deleted file mode 100644 index f7870c3..0000000 --- a/examples/jbi/simple/groovy.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:util="http://www.springframework.org/schema/util" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:quartz="http://servicemix.apache.org/quartz/1.0" - xmlns:scripting="http://servicemix.apache.org/scripting/1.0" - xmlns:camel="http://activemq.apache.org/camel/schema/spring" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xmlns:b="http://servicemix.apache.org/examples/groovy" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd - http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd - http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd - http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/quartz/1.0/servicemix-quartz.xsd - http://servicemix.apache.org/scripting/1.0 http://servicemix.apache.org/scripting/1.0/servicemix-scripting.xsd - http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd - http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <quartz:endpoint service="b:service" endpoint="endpoint" targetService="b:receiver"> - <quartz:trigger> - <quartz:simple name="groovy-trigger" repeatCount="500" repeatInterval="1000" startDelay="2000" /> - </quartz:trigger> - </quartz:endpoint> - - <scripting:endpoint service="b:receiver" endpoint="endpoint" - script="document-name:myscript" - disableOutput="true" - language="groovy" /> - - <bean id="myscript" class="org.apache.servicemix.document.impl.spring.SpringDocumentFactory"> - <property name="repository" ref="repository" /> - <property name="document"> - <value> - import javax.jbi.messaging.MessageExchange; - import javax.jbi.messaging.NormalizedMessage; - import org.apache.servicemix.jbi.jaxp.StringSource; - import org.apache.servicemix.jbi.jaxp.SourceTransformer; - - println "Starting JSR-223 groovy processor"; - - println exchange; - def inputMessage = new SourceTransformer().toString(inMessage.getContent()); - println "Hello, I got an input message " + inputMessage; - </value> - </property> - </bean> - - <osgi:reference id="repository" interface="org.apache.servicemix.document.DocumentRepository" /> - - <bean class="org.apache.servicemix.common.osgi.EndpointExporter" /> - -</beans>
