for more information about using JBoss Fuse
39 |
40 | System requirements
41 | -------------------
42 |
43 | To run these quick starts you will need:
44 |
45 | * Maven 3.1.1 or higher
46 | * JDK 1.8
47 | * JBoss Fuse 7.0.0
48 | * SAP JCo3 and IDoc3 libraries (sapjco3.jar, sapidoc3.jar and JCo native library for your OS platform)
49 | * SAP instance with [Flight Data Application](http://help.sap.com/saphelp_erp60_sp/helpdata/en/db/7c623cf568896be10000000a11405a/content.htm) setup.
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/fuse/sap-idoc-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoc-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse IDoc Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 |
34 | org.slf4j
35 | slf4j-api
36 |
37 |
38 | org.slf4j
39 | slf4j-log4j12
40 |
41 |
42 |
43 |
44 |
45 | install
46 |
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-resources-plugin
56 |
57 |
58 |
59 |
60 | org.apache.felix
61 | maven-bundle-plugin
62 | true
63 |
64 |
65 | sap-idoc-destination-fuse
66 | *
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/fuse/sap-idoc-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-idoclist-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoclist-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse IDoc List Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc List Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 |
34 | org.slf4j
35 | slf4j-api
36 |
37 |
38 | org.slf4j
39 | slf4j-log4j12
40 |
41 |
42 |
43 |
44 |
45 | install
46 |
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-resources-plugin
56 |
57 |
58 |
59 |
60 | org.apache.felix
61 | maven-bundle-plugin
62 | true
63 |
64 |
65 | sap-idoclist-destination-fuse
66 | *
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/fuse/sap-idoclist-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-idoclist-server-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoclist-server-fuse
8 | bundle
9 |
10 | Fuse IDoc List Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc List Server endpoint in a JBoss Fuse environment.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 | UTF-8
23 | UTF-8
24 |
25 |
26 |
27 | install
28 |
29 |
30 |
31 | org.apache.maven.plugins
32 | maven-compiler-plugin
33 |
34 |
35 |
36 | org.apache.maven.plugins
37 | maven-resources-plugin
38 |
39 |
40 |
41 |
42 | org.apache.felix
43 | maven-bundle-plugin
44 | true
45 |
46 |
47 | sap-idoclist-server-fuse
48 | *
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/fuse/sap-idoclist-server-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-qidoc-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qidoc-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse Queued IDoc Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued IDoc Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 |
34 | org.slf4j
35 | slf4j-api
36 |
37 |
38 | org.slf4j
39 | slf4j-log4j12
40 |
41 |
42 |
43 |
44 |
45 | install
46 |
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-resources-plugin
56 |
57 |
58 |
59 |
60 | org.apache.felix
61 | maven-bundle-plugin
62 | true
63 |
64 |
65 | sap-qidoc-destination-fuse
66 | *
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/fuse/sap-qidoc-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-qidoclist-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qidoclist-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse Queued IDoc List Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued IDoc List Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 |
34 | org.slf4j
35 | slf4j-api
36 |
37 |
38 | org.slf4j
39 | slf4j-log4j12
40 |
41 |
42 |
43 |
44 |
45 | install
46 |
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-resources-plugin
56 |
57 |
58 |
59 |
60 | org.apache.felix
61 | maven-bundle-plugin
62 | true
63 |
64 |
65 | sap-idoclist-destination-fuse
66 | *
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/fuse/sap-qidoclist-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qrfc-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | sap-quickstarts-parent
13 | 7.1.0.fuse-710023-redhat-00001
14 | ../..
15 |
16 |
17 |
18 | Fuse Queued RFC Destination Example
19 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued RFC Destination endpoint in a JBoss Fuse environment.
20 | http://www.jboss.org/products/fuse/overview/
21 |
22 |
23 |
24 |
25 | org.fusesource
26 | camel-sap
27 |
28 |
29 |
30 | org.apache.camel
31 | camel-core
32 |
33 |
34 |
35 | org.slf4j
36 | slf4j-api
37 |
38 |
39 | org.slf4j
40 | slf4j-log4j12
41 |
42 |
43 |
44 |
45 |
46 | install
47 |
48 |
49 |
50 | org.apache.maven.plugins
51 | maven-compiler-plugin
52 |
53 |
54 |
55 | org.apache.maven.plugins
56 | maven-resources-plugin
57 |
58 |
59 |
60 |
61 | org.apache.felix
62 | maven-bundle-plugin
63 | true
64 |
65 |
66 | sap-qrfc-destination-fuse
67 | *
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_fuse/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_fuse/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_fuse/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_fuse/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-qrfc-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-srfc-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse Synchronous RFC Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP Synchronous RFC Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 | UTF-8
23 | UTF-8
24 |
25 |
26 |
27 |
28 |
29 | org.fusesource
30 | camel-sap
31 |
32 |
33 |
34 | org.apache.camel
35 | camel-core
36 |
37 |
38 |
39 | org.slf4j
40 | slf4j-api
41 |
42 |
43 | org.slf4j
44 | slf4j-log4j12
45 |
46 |
47 |
48 |
49 |
50 | install
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-compiler-plugin
56 |
57 |
58 |
59 | org.apache.maven.plugins
60 | maven-resources-plugin
61 |
62 |
63 |
64 |
65 | org.apache.felix
66 | maven-bundle-plugin
67 | true
68 |
69 |
70 | sap-srfc-destination-fuse
71 | *
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_srfc_destination_fuse/CreateRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_srfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapSynchronousRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateRequest} is a processor bean which builds a request to the GetList method of the FlightCustomer BAPI
25 | * and sets that request in the body of the exchange's message.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the GetList method of the FlightCustomer BAPI
35 | SapSynchronousRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST", SapSynchronousRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add query parameters to the request to retrieve upto 10 Customer records including Web Users.
39 | request.put("CUSTOMER_NAME", "*");
40 | request.put("MAX_ROWS", 10);
41 | request.put("WEB_USER", "*");
42 |
43 | // Set the request in in the body of the exchange's message.
44 | exchange.getIn().setBody(request);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-destination-fuse/src/main/resources/OSGI-INF/blueprint/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
26 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
38 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-server-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-srfc-server-fuse
8 | bundle
9 |
10 | Fuse Synchronous RFC Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Synchronous RFC Server endpoint in a JBoss Fuse environment.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 | UTF-8
23 | UTF-8
24 |
25 |
26 |
27 |
28 |
29 | org.fusesource
30 | camel-sap
31 |
32 |
33 |
34 | org.apache.camel
35 | camel-core
36 |
37 |
38 |
39 | org.slf4j
40 | slf4j-api
41 |
42 |
43 | org.slf4j
44 | slf4j-log4j12
45 |
46 |
47 |
48 |
49 |
50 | install
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-compiler-plugin
56 |
57 |
58 |
59 | org.apache.maven.plugins
60 | maven-resources-plugin
61 |
62 |
63 |
64 |
65 | org.apache.felix
66 | maven-bundle-plugin
67 | true
68 |
69 |
70 | sap-srfc-server-fuse
71 | *
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/fuse/sap-srfc-server-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-trfc-destination-fuse
8 | bundle
9 |
10 |
11 | org.jboss.quickstarts.fuse
12 | 7.1.0.fuse-710023-redhat-00001
13 | ../..
14 | sap-quickstarts-parent
15 |
16 |
17 | Fuse Transactional RFC Destination Example
18 | This Quick Start demonstrates how to use the JBoss Fuse SAP Transactional RFC Destination endpoint in a JBoss Fuse environment.
19 | http://www.jboss.org/products/fuse/overview/
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 |
34 | org.slf4j
35 | slf4j-api
36 |
37 |
38 | org.slf4j
39 | slf4j-log4j12
40 |
41 |
42 |
43 |
44 |
45 | install
46 |
47 |
48 |
49 |
50 | org.apache.maven.plugins
51 | maven-compiler-plugin
52 |
53 |
54 |
55 | org.apache.maven.plugins
56 | maven-resources-plugin
57 |
58 |
59 |
60 |
61 | org.apache.felix
62 | maven-bundle-plugin
63 | true
64 |
65 |
66 | sap-trfc-destination-fuse
67 | *
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_fuse/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_fuse/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_fuse/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_fuse/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_fuse;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-destination-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-server-failover-loadbalancer-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-trfc-server-failover-loadbalancer-fuse
8 | bundle
9 |
10 | Fuse Transactional RFC Server with Failover and Loadbalancing Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Transactional RFC Server endpoint with failover and loadbalancing in a JBoss Fuse environment.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 | UTF-8
23 | UTF-8
24 |
25 |
26 |
27 | install
28 |
29 |
30 |
31 | org.apache.maven.plugins
32 | maven-compiler-plugin
33 |
34 |
35 |
36 | org.apache.maven.plugins
37 | maven-resources-plugin
38 |
39 |
40 |
41 |
42 | org.apache.felix
43 | maven-bundle-plugin
44 | true
45 |
46 |
47 | sap-trfc-server-fuse
48 | *
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-server-failover-loadbalancer-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-server-fuse/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-trfc-server-fuse
8 | bundle
9 |
10 | Fuse Transactional RFC Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Transactional RFC Server endpoint in a JBoss Fuse environment.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 | UTF-8
23 | UTF-8
24 |
25 |
26 |
27 | install
28 |
29 |
30 |
31 | org.apache.maven.plugins
32 | maven-compiler-plugin
33 |
34 |
35 |
36 | org.apache.maven.plugins
37 | maven-resources-plugin
38 |
39 |
40 |
41 |
42 | org.apache.felix
43 | maven-bundle-plugin
44 | true
45 |
46 |
47 | sap-trfc-server-fuse
48 | *
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/fuse/sap-trfc-server-fuse/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/sap_tool_suite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fusesource/sap-quickstarts/e87fb354054fdeb3da044ef35f5d343fbda27dd5/sap_tool_suite.png
--------------------------------------------------------------------------------
/spring-boot/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
14 |
15 | 4.0.0
16 |
17 | org.jboss.quickstarts.fuse
18 | sap-quickstarts-spring-boot-parent
19 | 7.1.0.fuse-710023-redhat-00001
20 | pom
21 |
22 | Spring Boot Examples Parent
23 | The parent of projects demonstrating how to use the JBoss Fuse SAP endpoints .
24 | http://http://www.jboss.org/products/fuse/overview/
25 |
26 |
27 |
28 | org.jboss.quickstarts.fuse
29 | sap-quickstarts-parent
30 | 7.1.0.fuse-710023-redhat-00001
31 | ..
32 |
33 |
34 |
35 |
36 |
37 | org.springframework.boot
38 | spring-boot-dependencies
39 | 1.5.8.RELEASE
40 | pom
41 | import
42 |
43 |
44 | org.apache.camel
45 | camel-core-starter
46 | ${camel-version}
47 |
48 |
49 | org.apache.camel
50 | camel-spring-boot-starter
51 | ${camel-version}
52 |
53 |
54 | org.fusesource
55 | camel-sap-starter
56 | 7.1.0-SNAPSHOT
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_idoc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_idoc_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoc-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_idoclist_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_idoclist_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_idoclist_server_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_idoclist_server_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwhost=${jco.client.gwhost}
8 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwserv=${jco.client.gwserv}
9 | camel.component.sap.configuration.serverDataStore.quickstartServer.progid=QUICKSTART
10 | camel.component.sap.configuration.serverDataStore.quickstartServer.repositoryDestination=quickstartDest
11 | camel.component.sap.configuration.serverDataStore.quickstartServer.connectionCount=2
12 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-idoclist-server-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qidoc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qidoc_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoc-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qidoc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qidoclist_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-qidoclist-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
30 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_spring_boot/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_spring_boot/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_spring_boot/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_spring_boot/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-qrfc-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_srfc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_srfc_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_srfc_destination_spring_boot/CreateRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_srfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapSynchronousRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateRequest} is a processor bean which builds a request to the GetList method of the FlightCustomer BAPI
25 | * and sets that request in the body of the exchange's message.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the GetList method of the FlightCustomer BAPI
35 | SapSynchronousRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST", SapSynchronousRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add query parameters to the request to retrieve upto 10 Customer records including Web Users.
39 | request.put("CUSTOMER_NAME", "*");
40 | request.put("MAX_ROWS", 10);
41 | request.put("WEB_USER", "*");
42 |
43 | // Set the request in in the body of the exchange's message.
44 | exchange.getIn().setBody(request);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_srfc_server_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_srfc_server_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwhost=${jco.client.gwhost}
8 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwserv=${jco.client.gwserv}
9 | camel.component.sap.configuration.serverDataStore.quickstartServer.progid=QUICKSTART
10 | camel.component.sap.configuration.serverDataStore.quickstartServer.repositoryDestination=quickstartDest
11 | camel.component.sap.configuration.serverDataStore.quickstartServer.connectionCount=2
12 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-srfc-server-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_spring_boot/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_spring_boot/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_spring_boot/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_spring_boot/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_spring_boot;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-destination-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_server_spring_boot/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_server_spring_boot;
18 |
19 | import org.springframework.boot.SpringApplication;
20 | import org.springframework.boot.autoconfigure.SpringBootApplication;
21 | import org.springframework.context.annotation.ImportResource;
22 |
23 | @SpringBootApplication
24 | // load regular Spring XML file from the classpath that contains the Camel XML DSL
25 | @ImportResource({"classpath:spring/camel-context.xml"})
26 | public class Application {
27 |
28 | /**
29 | * A main method to start this application.
30 | */
31 | public static void main(String[] args) {
32 | SpringApplication.run(Application.class, args);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | camel.component.sap.configuration.destinationDataStore.quickstartDest.ashost=${jco.client.ashost}
2 | camel.component.sap.configuration.destinationDataStore.quickstartDest.sysnr=${jco.client.sysnr}
3 | camel.component.sap.configuration.destinationDataStore.quickstartDest.client=${jco.client.client}
4 | camel.component.sap.configuration.destinationDataStore.quickstartDest.user=${jco.client.user}
5 | camel.component.sap.configuration.destinationDataStore.quickstartDest.passwd=${jco.client.passwd}
6 | camel.component.sap.configuration.destinationDataStore.quickstartDest.lang=${jco.client.lang}
7 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwhost=${jco.client.gwhost}
8 | camel.component.sap.configuration.serverDataStore.quickstartServer.gwserv=${jco.client.gwserv}
9 | camel.component.sap.configuration.serverDataStore.quickstartServer.progid=QUICKSTART
10 | camel.component.sap.configuration.serverDataStore.quickstartServer.repositoryDestination=quickstartDest
11 | camel.component.sap.configuration.serverDataStore.quickstartServer.connectionCount=2
12 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-boot/sap-trfc-server-spring-boot/src/main/resources/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/standalone/sap-idoc-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-idoc-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoc-destination-standalone
8 | jar
9 |
10 | Standalone IDoc Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/standalone/sap-idoc-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-idoclist-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-idoclist-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoclist-destination-standalone
8 | jar
9 |
10 | Standalone IDoc List Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc List Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/standalone/sap-idoclist-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-idoclist-server-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-idoclist-server-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-idoclist-server-standalone
8 | jar
9 |
10 | Standalone IDoc List Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP IDoc List Server endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-idoclist-server-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-qidoc-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-qidoc-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qidoc-destination-standalone
8 | jar
9 |
10 | Standalone Queued IDoc Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued IDoc Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/standalone/sap-qidoc-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-qidoclist-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-qidoclist-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qidoclist-destination-standalone
8 | jar
9 |
10 | Standalone IDoc List Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued IDoc List Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-qidoclist-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-qrfc-destination-standalone
8 | jar
9 |
10 | Standalone Transactional RFC Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Queued RFC Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_standalone/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_standalone/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_standalone/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_qrfc_destination_standalone/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_qrfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapQueuedRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapQueuedRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-qrfc-destination:quickstartDest:QUICKSTARTQUEUE:BAPI_FLCUST_CREATEFROMDATA", SapQueuedRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-qrfc-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-srfc-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-srfc-destination-standalone
8 | jar
9 |
10 | Standalone Synchronous RFC Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Synchronous RFC Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_srfc_destination_standalone/CreateRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_srfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapSynchronousRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateRequest} is a processor bean which builds a request to the GetList method of the FlightCustomer BAPI
25 | * and sets that request in the body of the exchange's message.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the GetList method of the FlightCustomer BAPI
35 | SapSynchronousRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST", SapSynchronousRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add query parameters to the request to retrieve upto 10 Customer records including Web Users.
39 | request.put("CUSTOMER_NAME", "*");
40 | request.put("MAX_ROWS", 10);
41 | request.put("WEB_USER", "*");
42 |
43 | // Set the request in in the body of the exchange's message.
44 | exchange.getIn().setBody(request);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-destination-standalone/src/main/resources/META-INF/spring/camel-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
30 |
32 |
33 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-server-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-srfc-server-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-srfc-server-standalone
8 | jar
9 |
10 | Standalone Synchronous RFC Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Synchronous RFC Server endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-srfc-server-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-trfc-destination-standalone
8 | jar
9 |
10 | Standalone Transactional RFC Destination Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Transactional RFC Destination endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_standalone/CreateBarneyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateBarneyRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Barney Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBarneyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Barney Rubble");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "barney@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_standalone/CreateBettyRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Betty Rubble'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateBettyRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Betty Rubble");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Pebble Road");
43 | customerData.put("POSTCODE", "98765");
44 | customerData.put("CITY", "Flagstone");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1313");
47 | customerData.put("EMAIL", "betty@flagstone.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_standalone/CreateFredRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Fred Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateFredRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Fred Flintstone");
41 | customerData.put("FORM", "Mr.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "fred@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/src/main/java/org/jboss/quickstarts/fuse/sap_trfc_destination_standalone/CreateWilmaRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | *
16 | */
17 | package org.jboss.quickstarts.fuse.sap_trfc_destination_standalone;
18 |
19 | import org.apache.camel.Exchange;
20 | import org.fusesource.camel.component.sap.SapTransactionalRfcDestinationEndpoint;
21 | import org.fusesource.camel.component.sap.model.rfc.Structure;
22 |
23 | /**
24 | * A {@link CreateFredRequest} is a processor bean which builds a request to the CreateFromData method of the FlightCustomer BAPI
25 | * to create a flight customer record in SAP for 'Wilma Flintstone'.
26 | *
27 | * @author William Collins (punkhornsw@gmail.com)
28 | *
29 | */
30 | public class CreateWilmaRequest {
31 |
32 | public void createRequest(Exchange exchange) throws Exception {
33 |
34 | // Create a request message from the endpoint to the CreateFromData method of the FlightCustomer BAPI
35 | SapTransactionalRfcDestinationEndpoint endpoint = exchange.getContext().getEndpoint("sap-trfc-destination:quickstartDest:BAPI_FLCUST_CREATEFROMDATA", SapTransactionalRfcDestinationEndpoint.class);
36 | Structure request = endpoint.createRequest();
37 |
38 | // Add customer data to the request for customer record.
39 | Structure customerData = request.get("CUSTOMER_DATA", Structure.class);
40 | customerData.put("CUSTNAME", "Wilma Flintstone");
41 | customerData.put("FORM", "Mrs.");
42 | customerData.put("STREET", "123 Rubble Lane");
43 | customerData.put("POSTCODE", "01234");
44 | customerData.put("CITY", "Bedrock");
45 | customerData.put("COUNTR", "US");
46 | customerData.put("PHONE", "800-555-1212");
47 | customerData.put("EMAIL", "wilma@bedrock.com");
48 | customerData.put("CUSTTYPE", "P");
49 | customerData.put("DISCOUNT", "005");
50 | customerData.put("LANGU", "E");
51 |
52 | // Set the request in in the body of the exchange's message.
53 | exchange.getIn().setBody(request);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-destination-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-server-standalone/lib/README.txt:
--------------------------------------------------------------------------------
1 | Place your copies of the IDoc and JCo libraries in this directory.
--------------------------------------------------------------------------------
/standalone/sap-trfc-server-standalone/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | sap-trfc-server-standalone
8 | jar
9 |
10 | Standalone Transactional RFC Server Example
11 | This Quick Start demonstrates how to use the JBoss Fuse SAP Transactional RFC Server endpoint.
12 | http://http://www.jboss.org/products/fuse/overview/
13 |
14 |
15 | org.jboss.quickstarts.fuse
16 | sap-quickstarts-parent
17 | 7.1.0.fuse-710023-redhat-00001
18 | ../..
19 |
20 |
21 |
22 |
23 |
24 | org.fusesource
25 | camel-sap
26 |
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 |
32 |
33 | org.apache.camel
34 | camel-spring
35 |
36 |
37 | org.apache.camel
38 | camel-test-spring
39 |
40 |
41 |
42 | org.slf4j
43 | slf4j-api
44 |
45 |
46 | org.slf4j
47 | slf4j-log4j12
48 |
49 |
50 |
51 | com.sap.conn.jco
52 | sapjco3
53 | ${sapjco3-version}
54 | system
55 | ${basedir}/lib/sapjco3.jar
56 |
57 |
58 | com.sap.conn.idoc
59 | sapidoc3
60 | ${sapidoc3-version}
61 | system
62 | ${basedir}/lib/sapidoc3.jar
63 |
64 |
65 |
66 |
67 |
68 | install
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-compiler-plugin
73 |
74 |
75 | org.apache.maven.plugins
76 | maven-resources-plugin
77 |
78 |
79 | org.apache.camel
80 | camel-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-server-standalone/quickstartServer:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/standalone/sap-trfc-server-standalone/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # JBoss, Home of Professional Open Source
3 | # Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
4 | # contributors by the @authors tag. See the copyright.txt in the
5 | # distribution for a full listing of individual contributors.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | #
19 | # The logging properties used
20 | #
21 | log4j.rootLogger=INFO, out
22 |
23 | # uncomment the following line to turn on Camel debugging
24 | #log4j.logger.org.apache.camel=DEBUG
25 |
26 | # CONSOLE appender not used by default
27 | log4j.appender.out=org.apache.log4j.ConsoleAppender
28 | log4j.appender.out.layout=org.apache.log4j.PatternLayout
29 | log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
30 |
31 | log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
32 |
--------------------------------------------------------------------------------