Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move EJB support to a branch and rename CXF support

  • Loading branch information...
commit 23aa676f3317fa01989e1cbf86af337b388c9afb 1 parent e8661c0
@gnodet gnodet authored
Showing with 0 additions and 3,252 deletions.
  1. +0 −131 bundles/cxf/pom.xml
  2. +0 −72 bundles/jaxws-api/pom.xml
  3. +0 −89 bundles/neethi/pom.xml
  4. +0 −7 bundles/pom.xml
  5. +0 −73 bundles/saaj-impl/pom.xml
  6. +0 −58 bundles/wsdl4j/pom.xml
  7. +0 −56 bundles/xmlresolver/pom.xml
  8. +0 −56 bundles/xmlschema/pom.xml
  9. +0 −120 cxf-binding-nmr/pom.xml
  10. +0 −50 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java
  11. +0 −67 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java
  12. +0 −30 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java
  13. +0 −37 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java
  14. +0 −64 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java
  15. +0 −35 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java
  16. +0 −71 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java
  17. +0 −103 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java
  18. +0 −71 ...binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java
  19. +0 −139 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRWrapperInInterceptor.java
  20. +0 −102 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRWrapperOutInterceptor.java
  21. +0 −36 cxf-binding-nmr/src/main/resources/META-INF/cxf/binding/nmr/cxf-binding-nmr.xml
  22. +0 −61 cxf-binding-nmr/src/main/resources/org/apache/servicemix/cxf/binding/nmr/interceptors/Messages.properties
  23. +0 −120 cxf-transport-nmr/pom.xml
  24. +0 −71 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
  25. +0 −166 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduitOutputStream.java
  26. +0 −157 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
  27. +0 −99 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
  28. +0 −55 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRMessageHelper.java
  29. +0 −155 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java
  30. +0 −42 cxf-transport-nmr/src/main/resources/META-INF/cxf/transport/nmr/cxf-transport-nmr.xml
  31. +0 −46 cxf-transport-nmr/src/main/resources/org/apache/servicemix/cxf/transport/nmr/Messages.properties
  32. +0 −123 cxf-transport-osgi/pom.xml
  33. +0 −105 cxf-transport-osgi/src/main/java/org/apache/servicemix/cxf/transport/http_osgi/OsgiDestination.java
  34. +0 −75 cxf-transport-osgi/src/main/java/org/apache/servicemix/cxf/transport/http_osgi/OsgiDestinationRegistry.java
  35. +0 −294 cxf-transport-osgi/src/main/java/org/apache/servicemix/cxf/transport/http_osgi/OsgiServlet.java
  36. +0 −70 cxf-transport-osgi/src/main/java/org/apache/servicemix/cxf/transport/http_osgi/OsgiTransportFactory.java
  37. +0 −53 cxf-transport-osgi/src/main/java/org/apache/servicemix/cxf/transport/http_osgi/SpringOsgiServlet.java
  38. +0 −48 cxf-transport-osgi/src/main/resources/META-INF/cxf/osgi/cxf-extension-osgi.xml
  39. +0 −42 cxf-transport-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
  40. +0 −3  pom.xml
View
131 bundles/cxf/pom.xml
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.cxf-2.0.5</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: cxf</name>
- <description>
- This bundle simply wraps cxf ${pkgVersion}.
- </description>
-
- <properties>
- <pkgVersion>2.0.5.incubator</pkgVersion>
- <servicemix.osgi.export>
- org.apache.cxf*;version=${pkgVersion};-split-package:=merge-first,
- org.xmlsoap.schemas*;version=${pkgVersion};-split-package:=merge-first,
- '=META-INF.cxf'
- </servicemix.osgi.export>
- <servicemix.osgi.import.pkg>
- com.ibm*;resolution:=optional,
- com.sun*;resolution:=optional,
- javanet.staxutils*;resolution:=optional,
- javax.jms*;resolution:=optional,
- javax.xml.soap,
- junit.framework*;resolution:=optional,
- org.apache.commons.lang*;resolution:=optional,
- org.apache.log4j*;resolution:=optional,
- org.apache.tools.ant*;resolution:=optional,
- org.apache.velocity*;resolution:=optional,
- org.apache.xmlbeans*;resolution:=optional,
- org.apache.ws.security*;resolution:=optional,
- org.codehaus.jra*;resolution:=optional,
- org.jdom*;resolution:=optional,
- org.junit*;resolution:=optional,
- org.mortbay*;resolution:=optional,
- org.mozilla.javascript*;resolution:=optional,
- org.springframework*;resolution:=optional,
- *
- </servicemix.osgi.import.pkg>
- <servicemix.osgi.private.pkg>
- META-INF*;-split-package:=merge-first,
- schemas*;-split-package:=merge-first
- </servicemix.osgi.private.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
- <version>2.0.5-incubator</version>
- <optional>true</optional>
- </dependency>
-
- <!-- Dependency on other bundles -->
- <dependency>
- <groupId>org.apache.ws.commons.schema</groupId>
- <artifactId>XmlSchema</artifactId>
- <version>1.3.2</version>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ws.commons</groupId>
- <artifactId>ws-commons-java5</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>bundle</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Export-Package>${servicemix.osgi.export}</Export-Package>
- <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
- <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
- <_exportcontents>META-INF.cxf</_exportcontents>
- <_failok>true</_failok>
- </instructions>
- <unpackBundle>true</unpackBundle>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
View
72 bundles/jaxws-api/pom.xml
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxws-api-2.0</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>jaxws-api</pkgArtifactId>
- <pkgVersion>${jaxws.api.version}</pkgVersion>
- <servicemix.osgi.export.pkg>javax.xml.ws*</servicemix.osgi.export.pkg>
- <servicemix.osgi.import.pkg>
- javax.xml.soap*;resolution:=optional,
- *
- </servicemix.osgi.import.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>javax.xml.ws</groupId>
- <artifactId>${pkgArtifactId}</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- <exclusions>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-api-2.0</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-saaj_1.3_spec</artifactId>
- <version>${geronimo.saaj.version}</version>
- </dependency>
- </dependencies>
-</project>
View
89 bundles/neethi/pom.xml
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.neethi-2.0.2</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>neethi</pkgArtifactId>
- <pkgVersion>2.0.2</pkgVersion>
- <servicemix.osgi.import.pkg>
- org.apache.axiom*;resolution:=optional,
- sun.misc*;resolution:=optional,
- *
- </servicemix.osgi.import.pkg>
- <servicemix.osgi.export.pkg>
- org.apache.neethi
- </servicemix.osgi.export.pkg>
- <servicemix.osgi.private.pkg></servicemix.osgi.private.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-parent</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
-</project>
View
7 bundles/pom.xml
@@ -34,15 +34,8 @@
<modules>
<module>commons-cli</module>
- <module>cxf</module>
- <module>jaxws-api</module>
- <module>neethi</module>
<module>openjpa</module>
- <module>saaj-impl</module>
<module>swizzle</module>
- <module>wsdl4j</module>
- <module>xmlresolver</module>
- <module>xmlschema</module>
</modules>
<properties>
View
73 bundles/saaj-impl/pom.xml
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.saaj-impl-1.3</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>saaj-impl</pkgArtifactId>
- <pkgVersion>1.3</pkgVersion>
- <servicemix.osgi.export.pkg>com.sun.xml.messaging.saaj</servicemix.osgi.export.pkg>
- <servicemix.osgi.import.pkg>
- com.sun.image.codec.jpeg*;resolution:=optional,
- com.sun.xml.fastinfoset*;resolution:=optional,
- javax.xml.soap,
- org.jvnet.fastinfoset*;resolution:=optional,
- *
- </servicemix.osgi.import.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.sun.xml.messaging.saaj</groupId>
- <artifactId>${pkgArtifactId}</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-saaj_1.3_spec</artifactId>
- <version>${geronimo.saaj.version}</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-</project>
View
58 bundles/wsdl4j/pom.xml
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.wsdl4j-1.6.1</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>wsdl4j</pkgArtifactId>
- <pkgVersion>1.6.1</pkgVersion>
- <servicemix.osgi.export>
- javax.wsdl*;version=1.2,
- com.ibm.wsdl*;version=${pkgVersion}
- </servicemix.osgi.export>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
-</project>
View
56 bundles/xmlresolver/pom.xml
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.xmlresolver-1.2</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>xmlresolver</pkgArtifactId>
- <pkgVersion>1.2</pkgVersion>
- <servicemix.osgi.export.pkg>org.apache.xml.resolver</servicemix.osgi.export.pkg>
- <servicemix.osgi.private.pkg></servicemix.osgi.private.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>xml-resolver</groupId>
- <artifactId>xml-resolver</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
-</project>
View
56 bundles/xmlschema/pom.xml
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3.bundles</groupId>
- <artifactId>bundles</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.xmlschema-1.3.2</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
- <description>
- This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
- </description>
-
- <properties>
- <pkgArtifactId>xmlschema</pkgArtifactId>
- <pkgVersion>1.3.2</pkgVersion>
- <servicemix.osgi.export.pkg>org.apache.ws.commons.schema</servicemix.osgi.export.pkg>
- <servicemix.osgi.private.pkg></servicemix.osgi.private.pkg>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.ws.commons.schema</groupId>
- <artifactId>XmlSchema</artifactId>
- <version>${pkgVersion}</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
-</project>
View
120 cxf-binding-nmr/pom.xml
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3</groupId>
- <artifactId>ejb3</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.ejb3</groupId>
- <artifactId>org.apache.servicemix.cxf.binding.nmr</artifactId>
- <packaging>bundle</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>ServiceMix CXF Binding for NMR</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.servicemix.nmr</groupId>
- <artifactId>org.apache.servicemix.nmr.api</artifactId>
- <version>${servicemix.nmr.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Bundle generation -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Import-Package>
- javax.xml.rpc*;resolution:=optional,
- javax.xml.soap,
- com.ctc.wstx.stax;resolution:=optional,
- org.apache.axis.soap;resolution:=optional,
- org.apache.axis2.saaj;resolution:=optional,
- com.sun.xml.messaging.saaj.soap.ver1_1;resolution:=optional,
- com.sun.xml.messaging.saaj.client.p2p;resolution:=optional,
- com.sun.xml.messaging.saaj.soap;resolution:=optional,
- *
- </Import-Package>
- <!-- Needed for jaxb annotations classes -->
- <DynamicImport-Package>*</DynamicImport-Package>
- <Export-Package>
- ${pom.artifactId}*,
- '=META-INF.cxf.binding.nmr'
- </Export-Package>
- <Private-Package></Private-Package>
- <_failok>true</_failok>
- <Spring-Context>*;publish-context:=false</Spring-Context>
- </instructions>
- </configuration>
- </plugin>
- <!-- generate dependencies versions -->
- <plugin>
- <groupId>org.apache.servicemix.kernel.testing</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <version>${servicemix.kernel.version}</version>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>pertest</forkMode>
- <systemProperties>
- <property>
- <name>javax.xml.parsers.DocumentBuilderFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.datatype.DatatypeFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.parsers.SAXParserFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
View
50 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr;
-
-import org.apache.cxf.binding.Binding;
-import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.BindingInfo;
-
-public class NMRBinding extends AbstractBasicInterceptorProvider implements Binding {
-
- private NMRBindingInfo bindingInfo;
-
- public NMRBinding(NMRBindingInfo bindingInfo) {
- this.bindingInfo = bindingInfo;
- }
-
- public Message createMessage() {
- return createMessage(new MessageImpl());
- }
-
- public Message createMessage(Message m) {
- if (!m.containsKey(Message.CONTENT_TYPE)) {
- m.put(Message.CONTENT_TYPE, "text/xml");
- }
- return new NMRMessage(m);
- }
-
- public BindingInfo getBindingInfo() {
- return bindingInfo;
- }
-
-}
View
67 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.binding.AbstractBindingFactory;
-import org.apache.cxf.binding.Binding;
-import org.apache.cxf.interceptor.StaxInInterceptor;
-import org.apache.cxf.interceptor.StaxOutInterceptor;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.OperationInfo;
-import org.apache.cxf.service.model.ServiceInfo;
-import org.apache.servicemix.cxf.binding.nmr.interceptors.NMRFaultInInterceptor;
-import org.apache.servicemix.cxf.binding.nmr.interceptors.NMRFaultOutInterceptor;
-import org.apache.servicemix.cxf.binding.nmr.interceptors.NMROperationInInterceptor;
-import org.apache.servicemix.cxf.binding.nmr.interceptors.NMRWrapperInInterceptor;
-import org.apache.servicemix.cxf.binding.nmr.interceptors.NMRWrapperOutInterceptor;
-
-public class NMRBindingFactory extends AbstractBindingFactory {
-
- public Binding createBinding(BindingInfo binding) {
- NMRBinding jb = new NMRBinding((NMRBindingInfo) binding);
- jb.getInInterceptors().add(new StaxInInterceptor());
- jb.getInInterceptors().add(new NMROperationInInterceptor());
- jb.getInInterceptors().add(new NMRWrapperInInterceptor());
- jb.getOutInterceptors().add(new StaxOutInterceptor());
- jb.getOutInterceptors().add(new NMRWrapperOutInterceptor());
- jb.getOutFaultInterceptors().add(new StaxOutInterceptor());
- jb.getOutFaultInterceptors().add(new NMRFaultOutInterceptor());
-
- jb.getInFaultInterceptors().add(new NMRFaultInInterceptor());
- return jb;
- }
-
- public BindingInfo createBindingInfo(ServiceInfo service, String namespace, Object config) {
- NMRBindingInfo info = new NMRBindingInfo(service, NMRConstants.NS_NMR_BINDING);
- info.setName(new QName(service.getName().getNamespaceURI(),
- service.getName().getLocalPart() + "NMRBinding"));
-
- for (OperationInfo op : service.getInterface().getOperations()) {
- BindingOperationInfo bop =
- info.buildOperation(op.getName(), op.getInputName(), op.getOutputName());
- info.addOperation(bop);
- }
-
- return info;
- }
-
-}
View
30 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr;
-
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.ServiceInfo;
-
-public class NMRBindingInfo extends BindingInfo {
-
- public NMRBindingInfo(ServiceInfo service, String bindingId) {
- super(service, bindingId);
- }
-
-}
View
37 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr;
-
-import javax.xml.namespace.QName;
-
-
-public final class NMRConstants {
-
- public static final String NS_NMR_BINDING = "http://cxf.apache.org/bindings/nmr";
-
- public static final String NS_JBI_WRAPPER = "http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper";
-
- public static final QName JBI_WRAPPER_MESSAGE = new QName(NS_JBI_WRAPPER, "message");
-
- public static final QName JBI_WRAPPER_PART = new QName(NS_JBI_WRAPPER, "part");
-
- private NMRConstants() {
- //utility class
- }
-}
View
64 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.binding.nmr;
-
-import java.util.ResourceBundle;
-
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.interceptor.Fault;
-
-public class NMRFault extends Fault {
- public static final String NMR_FAULT_PREFIX = "jfns";
-
- public static final String NMR_FAULT_ROOT = "NMRFault";
- public static final String NMR_FAULT_STRING = "faultstring";
-
- public static final String NMR_FAULT_DETAIL = "detail";
-
- public static final String NMR_FAULT_CODE_SERVER = "SERVER";
-
- public static final String NMR_FAULT_CODE_CLIENT = "CLIENT";
-
-
- static final long serialVersionUID = 100000;
-
- public NMRFault(Message message, Throwable throwable) {
- super(message, throwable);
- }
-
- public NMRFault(Message message) {
- super(message);
- }
-
- public NMRFault(String message) {
- super(new Message(message, (ResourceBundle) null));
- }
-
- public static NMRFault createFault(Fault f) {
- if (f instanceof NMRFault) {
- return (NMRFault) f;
- }
- Throwable th = f.getCause();
- NMRFault jbiFault = new NMRFault(new Message(f.getMessage(), (ResourceBundle) null), th);
- jbiFault.setDetail(f.getDetail());
- return jbiFault;
- }
-
-}
View
35 cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr;
-
-import org.apache.cxf.message.AbstractWrappedMessage;
-import org.apache.cxf.message.Message;
-import org.apache.servicemix.nmr.api.Exchange;
-
-public class NMRMessage extends AbstractWrappedMessage {
-
- public NMRMessage(Message msg) {
- super(msg);
- }
-
- public Exchange getNmrExchange() {
- return get(Exchange.class);
- }
-
-}
View
71 ...c/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.binding.nmr.interceptors;
-
-import java.util.ResourceBundle;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.w3c.dom.Element;
-
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.staxutils.DepthXMLStreamReader;
-import org.apache.cxf.staxutils.FragmentStreamReader;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.servicemix.cxf.binding.nmr.NMRFault;
-import org.apache.servicemix.cxf.binding.nmr.NMRMessage;
-
-
-public class NMRFaultInInterceptor extends AbstractPhaseInterceptor<NMRMessage> {
-
- private static final ResourceBundle BUNDLE = BundleUtils.getBundle(NMRFaultInInterceptor.class);
- public NMRFaultInInterceptor() {
- super(Phase.UNMARSHAL);
- addBefore("*");
- }
-
- public void handleMessage(NMRMessage message) throws Fault {
- XMLStreamReader xsr = message.getContent(XMLStreamReader.class);
- DepthXMLStreamReader reader = new DepthXMLStreamReader(xsr);
-
- try {
-
- if (!StaxUtils.toNextElement(reader)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("ILLEGAL_JBIFAULT_FORMAT", BUNDLE));
- }
- Fault fault = new NMRFault(new org.apache.cxf.common.i18n.Message(NMRFault.NMR_FAULT_STRING,
- (ResourceBundle) null));
-
- if (StaxUtils.toNextElement(reader)) {
- // handling detail
- Element detail = StaxUtils.read(new FragmentStreamReader(reader)).getDocumentElement();
- fault.setDetail(detail);
- }
- message.setContent(Exception.class, fault);
- } catch (XMLStreamException xse) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", BUNDLE));
- }
-
- }
-}
View
103 .../main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java
@@ -1,103 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr.interceptors;
-
-import java.util.ResourceBundle;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.helpers.NSStack;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.servicemix.cxf.binding.nmr.NMRConstants;
-import org.apache.servicemix.cxf.binding.nmr.NMRFault;
-import org.apache.servicemix.cxf.binding.nmr.NMRMessage;
-
-public class NMRFaultOutInterceptor extends AbstractPhaseInterceptor<NMRMessage> {
-
- private static final ResourceBundle BUNDLE = BundleUtils.getBundle(NMRFaultOutInterceptor.class);
-
- public NMRFaultOutInterceptor() {
- super(Phase.MARSHAL);
- }
-
- public void handleMessage(NMRMessage message) throws Fault {
- message.put(org.apache.cxf.message.Message.RESPONSE_CODE, new Integer(500));
- NSStack nsStack = new NSStack();
- nsStack.push();
-
-
-
- try {
- XMLStreamWriter writer = getWriter(message);
- Fault fault = getFault(message);
- NMRFault jbiFault = NMRFault.createFault(fault);
- nsStack.add(NMRConstants.NS_NMR_BINDING);
- String prefix = nsStack.getPrefix(NMRConstants.NS_NMR_BINDING);
- StaxUtils.writeStartElement(writer, prefix, NMRFault.NMR_FAULT_ROOT,
- NMRConstants.NS_NMR_BINDING);
- if (!jbiFault.hasDetails()) {
- writer.writeEmptyElement("fault");
- } else {
- Element detail = jbiFault.getDetail();
- NodeList details = detail.getChildNodes();
- for (int i = 0; i < details.getLength(); i++) {
- if (details.item(i) instanceof Element) {
- StaxUtils.writeNode(details.item(i), writer, true);
- break;
- }
- }
- }
- writer.writeEndElement();
- writer.flush();
-
- } catch (XMLStreamException xe) {
- throw new Fault(new Message("XML_WRITE_EXC", BUNDLE), xe);
- }
- }
-
- protected Fault getFault(NMRMessage message) {
- Exception e = message.getContent(Exception.class);
- Fault fault;
- if (e == null) {
- throw new IllegalStateException(new Message("NO_EXCEPTION", BUNDLE).toString());
- } else if (e instanceof Fault) {
- fault = (Fault) e;
- } else {
- fault = new Fault(e);
- }
- return fault;
- }
-
- protected XMLStreamWriter getWriter(NMRMessage message) {
- XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
- if (writer == null) {
- throw new IllegalStateException(new Message("NO_XML_STREAM_WRITER", BUNDLE).toString());
- }
- return writer;
- }
-}
View
71 ...in/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr.interceptors;
-
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.MessageInfo;
-import org.apache.cxf.service.model.OperationInfo;
-import org.apache.servicemix.cxf.binding.nmr.NMRMessage;
-
-public class NMROperationInInterceptor extends AbstractPhaseInterceptor<NMRMessage> {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMROperationInInterceptor.class);
-
- private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
-
- public NMROperationInInterceptor() {
- super(Phase.PRE_PROTOCOL);
- }
-
- public void handleMessage(NMRMessage message) throws Fault {
- Exchange ex = message.getExchange();
- Endpoint ep = ex.get(Endpoint.class);
- BindingOperationInfo boi = ex.get(BindingOperationInfo.class);
- if (boi == null && message.getNmrExchange().getOperation() != null) {
- BindingInfo service = ep.getEndpointInfo().getBinding();
- boi = getBindingOperationInfo(service, message.getNmrExchange().getOperation());
- if (boi == null) {
- throw new Fault(new Message("UNKNOWN_OPERATION", BUNDLE,
- message.getNmrExchange().getOperation().toString()));
- }
- ex.put(BindingOperationInfo.class, boi);
- ex.put(OperationInfo.class, boi.getOperationInfo());
- ex.setOneWay(boi.getOperationInfo().isOneWay());
- message.put(MessageInfo.class, boi.getInput().getMessageInfo());
- }
- }
-
- protected BindingOperationInfo getBindingOperationInfo(BindingInfo service, QName operation) {
- return service.getOperation(operation);
- }
-
-}
View
139 ...main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRWrapperInInterceptor.java
@@ -1,139 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr.interceptors;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.servicemix.cxf.binding.nmr.NMRBindingInfo;
-import org.apache.servicemix.cxf.binding.nmr.NMRConstants;
-import org.apache.servicemix.cxf.binding.nmr.NMRFault;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.databinding.DataReader;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingMessageInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.MessageInfo;
-import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.cxf.staxutils.DepthXMLStreamReader;
-import org.apache.cxf.staxutils.StaxUtils;
-
-public class NMRWrapperInInterceptor extends AbstractInDatabindingInterceptor {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRWrapperInInterceptor.class);
-
- private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
-
- public NMRWrapperInInterceptor() {
- super(Phase.UNMARSHAL);
- }
-
- public void handleMessage(Message message) throws Fault {
- if (isGET(message)) {
- LOG.info("JbiMessageInInterceptor skipped in HTTP GET method");
- return;
- }
- XMLStreamReader xsr = message.getContent(XMLStreamReader.class);
-
- DepthXMLStreamReader reader = new DepthXMLStreamReader(xsr);
-
- Endpoint ep = message.getExchange().get(Endpoint.class);
- BindingInfo binding = ep.getEndpointInfo().getBinding();
- if (!(binding instanceof NMRBindingInfo)) {
- throw new IllegalStateException(
- new org.apache.cxf.common.i18n.Message("NEED_JBIBINDING", BUNDLE).toString());
- }
-
- if (!StaxUtils.toNextElement(reader)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION_ELEMENT", BUNDLE));
- }
-
- Exchange ex = message.getExchange();
- QName startQName = reader.getName();
-
- // handling jbi fault message
- if (startQName.getLocalPart().equals(NMRFault.NMR_FAULT_ROOT)) {
- message.getInterceptorChain().abort();
-
- if (ep.getInFaultObserver() != null) {
- ep.getInFaultObserver().onMessage(message);
- return;
- }
- }
-
-
- // handling xml normal inbound message
- if (!startQName.equals(NMRConstants.JBI_WRAPPER_MESSAGE)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message(
- "NO_JBI_MESSAGE_ELEMENT", BUNDLE));
- }
-
- try {
- BindingOperationInfo bop = ex.get(BindingOperationInfo.class);
- DataReader<XMLStreamReader> dr = getDataReader(message);
- List<Object> parameters = new ArrayList<Object>();
- reader.next();
- BindingMessageInfo messageInfo = !isRequestor(message) ? bop.getInput() : bop.getOutput();
- message.put(MessageInfo.class, messageInfo.getMessageInfo());
- for (MessagePartInfo part : messageInfo.getMessageParts()) {
- if (!StaxUtils.skipToStartOfElement(reader)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("NOT_ENOUGH_PARTS", BUNDLE));
- }
- startQName = reader.getName();
- if (!startQName.equals(NMRConstants.JBI_WRAPPER_PART)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("NO_JBI_PART_ELEMENT", BUNDLE));
- }
- if (part.isElement()) {
- reader.next();
- if (!StaxUtils.toNextElement(reader)) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("EXPECTED_ELEMENT_IN_PART", BUNDLE));
- }
- }
- parameters.add(dr.read(part, reader));
- // skip end element
- if (part.isElement()) {
- reader.next();
- }
- }
- int ev = reader.getEventType();
- while (ev != XMLStreamConstants.END_ELEMENT
- && ev != XMLStreamConstants.START_ELEMENT
- && ev != XMLStreamConstants.END_DOCUMENT) {
- ev = reader.next();
- }
- message.setContent(List.class, parameters);
- } catch (XMLStreamException e) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", BUNDLE), e);
- }
- }
-
-}
View
102 ...ain/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRWrapperOutInterceptor.java
@@ -1,102 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.binding.nmr.interceptors;
-
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.servicemix.cxf.binding.nmr.NMRConstants;
-
-public class NMRWrapperOutInterceptor extends AbstractOutDatabindingInterceptor {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRWrapperOutInterceptor.class);
-
- private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
-
- public NMRWrapperOutInterceptor() {
- super(Phase.MARSHAL);
- }
-
- public void handleMessage(Message message) throws Fault {
- BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
- XMLStreamWriter xmlWriter = getXMLStreamWriter(message);
- Service service = message.getExchange().get(Service.class);
-
- DataWriter<XMLStreamWriter> dataWriter = getDataWriter(message, service, XMLStreamWriter.class);
-
- try {
- xmlWriter.setPrefix("jbi", NMRConstants.NS_JBI_WRAPPER);
- xmlWriter.writeStartElement(NMRConstants.NS_JBI_WRAPPER,
- NMRConstants.JBI_WRAPPER_MESSAGE.getLocalPart());
- xmlWriter.writeNamespace("jbi", NMRConstants.NS_JBI_WRAPPER);
-
- List<MessagePartInfo> parts = null;
- if (!isRequestor(message)) {
- parts = bop.getOutput().getMessageParts();
- } else {
- parts = bop.getInput().getMessageParts();
- }
- List<?> objs = (List<?>) message.getContent(List.class);
- if (objs.size() < parts.size()) {
- throw new Fault(new org.apache.cxf.common.i18n.Message(
- "NOT_EQUAL_ARG_NUM", BUNDLE));
- }
- for (int idx = 0; idx < parts.size(); idx++) {
- MessagePartInfo part = parts.get(idx);
- Object obj = objs.get(idx);
- if (!part.isElement()) {
- if (part.getTypeClass() == String.class) {
- xmlWriter.writeStartElement(NMRConstants.NS_JBI_WRAPPER,
- NMRConstants.JBI_WRAPPER_PART.getLocalPart());
- xmlWriter.writeCharacters(obj.toString());
- xmlWriter.writeEndElement();
- } else {
- part = new MessagePartInfo(part.getName(), part.getMessageInfo());
- part.setElement(false);
- part.setConcreteName(NMRConstants.JBI_WRAPPER_PART);
- dataWriter.write(obj, part, xmlWriter);
- }
- } else {
- xmlWriter.writeStartElement(NMRConstants.NS_JBI_WRAPPER,
- NMRConstants.JBI_WRAPPER_PART.getLocalPart());
- dataWriter.write(obj, part, xmlWriter);
- xmlWriter.writeEndElement();
- }
- }
- xmlWriter.writeEndElement();
-
- } catch (XMLStreamException e) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_WRITE_EXC", BUNDLE), e);
- }
- }
-
-}
View
36 cxf-binding-nmr/src/main/resources/META-INF/cxf/binding/nmr/cxf-binding-nmr.xml
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean class="org.apache.servicemix.cxf.binding.nmr.NMRBindingFactory"
- id="org.apache.servicemix.cxf.binding.nmr.NMRBindingFactory"
- lazy-init="true">
- <property name="bus" ref="cxf"/>
- <property name="activationNamespaces">
- <set>
- <value>http://cxf.apache.org/bindings/nmr</value>
- </set>
- </property>
- </bean>
-
-</beans>
View
61 ...src/main/resources/org/apache/servicemix/cxf/binding/nmr/interceptors/Messages.properties
@@ -1,61 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-NOT.IMPLEMENTED=not yet implemented
-INVOKE.SERVICE=invoking service\t
-CREATE.MESSAGE.EXCHANGE=create message exchange svc:\t
-EXCHANGE.ENDPOINT=exchange endpoint:\t
-NO.MESSAGE=no message yet
-UNABLE.RETRIEVE.MESSAGE=unable to retrieve message
-CONTEXT.MUST.BE=context must be of type JBIOutputStreamMessageContext
-RECEIVED.MESSAGE=received message:\t
-ACTIVE.JBI.SERVER.TRANSPORT=activating JBI server transport
-BUILDING.DOCUMENT=building document from bytes
-CREATE.NORMALIZED.MESSAGE=creating NormalizedMessage
-POST.DISPATCH=postDispatch sending out message to NWR
-ERROR.SEND.MESSAGE=error sending Out message
-DISPATCH.MESSAGE.ON.CALLBACK=dispatching message on callback:\t
-ERROR.PREPARE.MESSAGE=error preparing message
-RECEIVE.THREAD.START=JBIServerTransport message receiving thread started
-DISPATCH.TO.SU=dispatching to CXF service unit
-NO.SU.FOUND=no CXFServiceUnit found
-ERROR.DISPATCH.THREAD=error running dispatch thread
-JBI.SERVER.TRANSPORT.MESSAGE.PROCESS.THREAD.EXIT=JBIServerTransport message processing thread exiting
-CONFIG.DELIVERY.CHANNEL=configuring DeliveryChannel:\t
-CONFIG.SU.MANAGER=configuring ServiceUnitManager:\t
-JBI.TRANSPORT.FACTORY.NOT.INITIALIZED=JBITransportFactory is not properly initialized
-SU.MANAGER=CXFServiceUnitManager:\t
-DELIVERY.CHANNEL=DeliveryChannel:\t
-JBI.TRANSPORT.FACTORY.NOT.FULLY.INITIALIZED=JBITransport factory not fully initialized
-CREATE.SERVER.TRANSPORT=creating JBI server transport
-CREATE.CLIENT.TRANSPORT=creating JBI client transport
-UNKNOWN_OPERATION=unknown operation {0}
-NO_OPERATION_ELEMENT=no operation element
-NO_JBI_MESSAGE_ELEMENT=no jbi message element
-NOT_ENOUGH_PARTS=not enough parts
-NO_JBI_PART_ELEMENT=no jbi part element
-EXPECTED_ELEMENT_IN_PART=expected element in part
-TOO_MANY_PARTS=too many parts
-ILLEGAL_JBIFAULT_FORMAT=illegal jbi fault format
-STAX_READ_EXC=stax read exception
-XML_WRITE_EXC=xml write exception
-STAX_WRITE_EXC=stax write exception
-NOT_EQUAL_ARG_NUM=The number of arguments is not equal
-NEED_JBIBINDING=BindingInfo should be a JbiBindingInfo
-NO_EXCEPTION=No exception on this message
-NO_XML_STREAM_WRITER=No XMLStreamWriter on this message
View
120 cxf-transport-nmr/pom.xml
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicemix.ejb3</groupId>
- <artifactId>ejb3</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.servicemix.ejb3</groupId>
- <artifactId>org.apache.servicemix.cxf.transport.nmr</artifactId>
- <packaging>bundle</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>ServiceMix CXF Transport for NMR</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.servicemix.nmr</groupId>
- <artifactId>org.apache.servicemix.nmr.api</artifactId>
- <version>${servicemix.nmr.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Bundle generation -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Import-Package>
- javax.xml.rpc*;resolution:=optional,
- javax.xml.soap,
- com.ctc.wstx.stax;resolution:=optional,
- org.apache.axis.soap;resolution:=optional,
- org.apache.axis2.saaj;resolution:=optional,
- com.sun.xml.messaging.saaj.soap.ver1_1;resolution:=optional,
- com.sun.xml.messaging.saaj.client.p2p;resolution:=optional,
- com.sun.xml.messaging.saaj.soap;resolution:=optional,
- *
- </Import-Package>
- <!-- Needed for jaxb annotations classes -->
- <DynamicImport-Package>*</DynamicImport-Package>
- <Export-Package>
- ${pom.artifactId}*,
- '=META-INF.cxf.transport.nmr'
- </Export-Package>
- <Private-Package></Private-Package>
- <_failok>true</_failok>
- <Spring-Context>*;publish-context:=false</Spring-Context>
- </instructions>
- </configuration>
- </plugin>
- <!-- generate dependencies versions -->
- <plugin>
- <groupId>org.apache.servicemix.kernel.testing</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <version>${servicemix.kernel.version}</version>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>pertest</forkMode>
- <systemProperties>
- <property>
- <name>javax.xml.parsers.DocumentBuilderFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.datatype.DatatypeFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.parsers.SAXParserFactory</name>
- <value>com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
View
71 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.transport.AbstractConduit;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.servicemix.nmr.api.Channel;
-import org.apache.servicemix.nmr.api.NMR;
-
-
-public class NMRConduit extends AbstractConduit {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRConduit.class);
-
- private NMR nmr;
- private Bus bus;
-
- public NMRConduit(EndpointReferenceType target, NMR nmr) {
- this(null, target, nmr);
- }
-
- public NMRConduit(Bus bus, EndpointReferenceType target, NMR nmr) {
- super(target);
- this.nmr = nmr;
- this.bus = bus;
- }
-
- public Bus getBus() {
- return bus;
- }
-
- public NMR getNmr() {
- return nmr;
- }
-
- protected Logger getLogger() {
- return LOG;
- }
-
- public void prepare(Message message) throws IOException {
- getLogger().log(Level.FINE, "JBIConduit send message");
-
- message.setContent(OutputStream.class,
- new NMRConduitOutputStream(message, nmr, target, this));
- }
-}
View
166 ...ort-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduitOutputStream.java
@@ -1,166 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.cxf.wsdl.EndpointReferenceUtils;
-import org.apache.servicemix.nmr.api.Channel;
-import org.apache.servicemix.nmr.api.Endpoint;
-import org.apache.servicemix.nmr.api.NMR;
-import org.apache.servicemix.nmr.api.Pattern;
-import org.apache.servicemix.nmr.api.Reference;
-import org.apache.servicemix.nmr.api.Status;
-
-public class NMRConduitOutputStream extends CachedOutputStream {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRConduitOutputStream.class);
-
- private Message message;
- private boolean isOneWay;
- private Channel channel;
- private NMRConduit conduit;
- private EndpointReferenceType target;
-
- public NMRConduitOutputStream(Message m, NMR nmr, EndpointReferenceType target,
- NMRConduit conduit) {
- message = m;
- this.channel = nmr.createChannel();
- this.conduit = conduit;
- this.target = target;
-
- }
-
- @Override
- protected void doFlush() throws IOException {
-
- }
-
- @Override
- protected void doClose() throws IOException {
- isOneWay = message.getExchange().isOneWay();
- commitOutputMessage();
- if (target != null) {
- target.getClass();
- }
- channel.close();
- }
-
- private void commitOutputMessage() throws IOException {
- try {
- Member member = (Member) message.get(Method.class.getName());
- Class<?> clz = member.getDeclaringClass();
- Exchange exchange = message.getExchange();
- BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
-
- LOG.info(new org.apache.cxf.common.i18n.Message("INVOKE.SERVICE", LOG).toString() + clz);
-
- WebService ws = clz.getAnnotation(WebService.class);
- assert ws != null;
- QName interfaceName = new QName(ws.targetNamespace(), ws.name());
- QName serviceName;
- if (target != null) {
- serviceName = EndpointReferenceUtils.getServiceName(target);
- } else {
- serviceName = message.getExchange().get(org.apache.cxf.service.Service.class).getName();
- }
-
- LOG.info(new org.apache.cxf.common.i18n.Message("CREATE.MESSAGE.EXCHANGE", LOG).toString() + serviceName);
- org.apache.servicemix.nmr.api.Exchange xchng;
- if (isOneWay) {
- xchng = channel.createExchange(Pattern.InOnly);
- } else if (bop.getOutput() == null) {
- xchng = channel.createExchange(Pattern.RobustInOnly);
- } else {
- xchng = channel.createExchange(Pattern.InOut);
- }
-
- org.apache.servicemix.nmr.api.Message inMsg = xchng.getIn();
- LOG.info(new org.apache.cxf.common.i18n.Message("EXCHANGE.ENDPOINT", LOG).toString() + serviceName);
- LOG.info("setup message contents on " + inMsg);
- inMsg.setBody(getMessageContent(message));
- LOG.info("service for exchange " + serviceName);
-
- Map<String,Object> refProps = new HashMap<String,Object>();
- refProps.put(Endpoint.INTERFACE_NAME, interfaceName);
- refProps.put(Endpoint.SERVICE_NAME, serviceName);
- Reference ref = channel.getNMR().getEndpointRegistry().lookup(refProps);
- xchng.setTarget(ref);
- xchng.setOperation(bop.getName());
- LOG.info("sending message");
- if (!isOneWay) {
- channel.sendSync(xchng);
- Source content = null;
- if (xchng.getFault(false) != null) {
- content = xchng.getFault().getBody(Source.class);
- } else {
- content = xchng.getOut().getBody(Source.class);
- }
- Message inMessage = new MessageImpl();
- message.getExchange().setInMessage(inMessage);
- InputStream ins = NMRMessageHelper.convertMessageToInputStream(content);
- if (ins == null) {
- throw new IOException(new org.apache.cxf.common.i18n.Message("UNABLE.RETRIEVE.MESSAGE", LOG).toString());
- }
- inMessage.setContent(InputStream.class, ins);
- conduit.getMessageObserver().onMessage(inMessage);
-
- xchng.setStatus(Status.Done);
- channel.send(xchng);
- } else {
- channel.sendSync(xchng);
- }
- } catch (IOException e) {
- throw e;
- } catch (Exception e) {
- e.printStackTrace();
- new IOException(e.toString());
- }
- }
-
- private Source getMessageContent(Message message2) throws IOException {
- return new StreamSource(this.getInputStream());
-
- }
-
- @Override
- protected void onWrite() throws IOException {
-
- }
-
-}
View
157 cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
@@ -1,157 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.AbstractConduit;
-import org.apache.cxf.transport.AbstractDestination;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.cxf.wsdl.EndpointReferenceUtils;
-import org.apache.servicemix.nmr.api.Channel;
-import org.apache.servicemix.nmr.api.Endpoint;
-import org.apache.servicemix.nmr.api.Exchange;
-import org.apache.servicemix.nmr.api.NMR;
-import org.apache.servicemix.nmr.api.ServiceMixException;
-
-public class NMRDestination extends AbstractDestination implements Endpoint {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRDestination.class);
- private NMR nmr;
- private Channel channel;
- private Map<String, Object> properties;
-
- public NMRDestination(EndpointInfo info, NMR nmr) {
- super(getTargetReference(info, null), info);
- this.nmr = nmr;
- this.properties = new HashMap<String, Object>();
- this.properties.put(Endpoint.NAME, info.getName().toString());
- this.properties.put(Endpoint.SERVICE_NAME, info.getService().getName());
- this.properties.put(Endpoint.INTERFACE_NAME, info.getInterface().getName());
- }
-
- public void setChannel(Channel dc) {
- this.channel = dc;
- }
-
- public Channel getChannel() {
- return this.channel;
- }
-
- protected Logger getLogger() {
- return LOG;
- }
-
- /**
- * @param inMessage the incoming message
- * @return the inbuilt backchannel
- */
- protected Conduit getInbuiltBackChannel(Message inMessage) {
- return new BackChannelConduit(EndpointReferenceUtils.getAnonymousEndpointReference(),
- inMessage);
- }
-
- public void shutdown() {
- nmr.getEndpointRegistry().unregister(this, properties);
- }
-
- public void deactivate() {
- nmr.getEndpointRegistry().unregister(this, properties);
- }
-
- public void activate() {
- nmr.getEndpointRegistry().register(this, properties);
- }
-
- public void process(Exchange exchange) {
- QName opName = exchange.getOperation();
- getLogger().fine("dispatch method: " + opName);
-
- org.apache.servicemix.nmr.api.Message nm = exchange.getIn();
- try {
-
- MessageImpl inMessage = new MessageImpl();
- inMessage.put(Exchange.class, exchange);
-
- final InputStream in = NMRMessageHelper.convertMessageToInputStream(nm.getBody(Source.class));
- inMessage.setContent(InputStream.class, in);
- inMessage.setDestination(this);
- getMessageObserver().onMessage(inMessage);
-
- } catch (Exception ex) {
- getLogger().log(Level.SEVERE, new org.apache.cxf.common.i18n.Message("ERROR.PREPARE.MESSAGE", getLogger()).toString(), ex);
- throw new ServiceMixException(ex);
- }
- }
-
-
- protected class BackChannelConduit extends AbstractConduit {
-
- protected Message inMessage;
- protected NMRDestination nmrDestination;
-
- BackChannelConduit(EndpointReferenceType ref, Message message) {
- super(ref);
- inMessage = message;
- }
-
- /**
- * Register a message observer for incoming messages.
- *
- * @param observer the observer to notify on receipt of incoming
- */
- public void setMessageObserver(MessageObserver observer) {
- // shouldn't be called for a back channel conduit
- }
-
- /**
- * Send an outbound message, assumed to contain all the name-value
- * mappings of the corresponding input message (if any).
- *
- * @param message the message to be sent.
- */
- public void prepare(Message message) throws IOException {
- // setup the message to be send back
- Channel dc = channel;
- message.put(Exchange.class, inMessage.get(Exchange.class));
- message.setContent(OutputStream.class, new NMRDestinationOutputStream(inMessage, dc));
- }
-
- protected Logger getLogger() {
- return LOG;
- }
- }
-
-}
View
99 ...nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
@@ -1,99 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.dom.DOMSource;
-
-import org.w3c.dom.Document;
-
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.message.Message;
-import org.apache.servicemix.nmr.api.Channel;
-import org.apache.servicemix.nmr.api.Exchange;
-
-public class NMRDestinationOutputStream extends CachedOutputStream {
-
- private static final Logger LOG = LogUtils.getL7dLogger(NMRDestinationOutputStream.class);
- private Message inMessage;
- private Channel channel;
-
- public NMRDestinationOutputStream(Message m,
- Channel dc) {
- super();
- inMessage = m;
- channel = dc;
- }
-
- @Override
- protected void doFlush() throws IOException {
- // so far do nothing
- }
-
- @Override
- protected void doClose() throws IOException {
- commitOutputMessage();
- }
-
- @Override
- protected void onWrite() throws IOException {
- // so far do nothing
- }
-
- private void commitOutputMessage() throws IOException {
- try {
- if (inMessage.getExchange().isOneWay()) {
- return;
- } else {
- InputStream bais = getInputStream();
- LOG.finest(new org.apache.cxf.common.i18n.Message("BUILDING.DOCUMENT", LOG).toString());
- DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
- docBuilderFactory.setNamespaceAware(true);
- DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
- Document doc = builder.parse(bais);
-
- Exchange xchng = inMessage.get(Exchange.class);
- LOG.fine(new org.apache.cxf.common.i18n.Message("CREATE.NORMALIZED.MESSAGE", LOG).toString());
- if (inMessage.getExchange().getOutFaultMessage() != null) {
- org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault) inMessage.getContent(Exception.class);
- if (f.hasDetails()) {
- xchng.getFault().setBody(new DOMSource(doc));
- } else {
- xchng.setError(f);
- }
- } else {
- xchng.getOut().setBody(new DOMSource(doc));
- }
- LOG.fine(new org.apache.cxf.common.i18n.Message("POST.DISPATCH", LOG).toString());
- channel.send(xchng);
- }
- } catch (Exception ex) {
- LOG.log(Level.SEVERE, new org.apache.cxf.common.i18n.Message("ERROR.SEND.MESSAGE", LOG).toString(), ex);
- }
- }
-
-}
View
55 ...transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRMessageHelper.java
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-
-
-
-public final class NMRMessageHelper {
-
-
- private static final TransformerFactory TRANSFORMER_FACTORY = TransformerFactory.newInstance();
-
- private NMRMessageHelper() {
- // complete
- }
-
- public static InputStream convertMessageToInputStream(Source src) throws IOException,
- TransformerConfigurationException, TransformerException {
-
- final Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- StreamResult result = new StreamResult(baos);
- transformer.transform(src, result);
-
- return new ByteArrayInputStream(baos.toByteArray());
- }
-}
View
155 ...nsport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java
@@ -1,155 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.servicemix.cxf.transport.nmr;
-
-import java.io.IOException;
-import java.util.Collection;