http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/twoway-endpoint-specific.xml ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/twoway-endpoint-specific.xml b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/twoway-endpoint-specific.xml deleted file mode 100644 index 2ee9c34..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/rm/twoway-endpoint-specific.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:cxf="http://cxf.apache.org/core" - xsi:schemaLocation=" -http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - - <!-- Endpoint Level Interceptors--> - <!-- Inserted From JaxWsEndpointImpl, EndpointImpl--> - <bean id="wrapperClassIn" class="org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor"/> - <bean id="wrapperClassOut" class="org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor"/> - <bean id="holderIn" class="org.apache.cxf.jaxws.interceptors.HolderInInterceptor"/> - <bean id="holderOut" class="org.apache.cxf.jaxws.interceptors.HolderOutInterceptor"/> - <bean id="clientFaultConv" class="org.apache.cxf.interceptor.ClientFaultConverter"/> - <bean id="messageSender" class="org.apache.cxf.interceptor.MessageSenderInterceptor"/> - <!-- Cannot use via config --> - <!-- - <bean id="soapHandler" class="org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor"/> - <bean id="logicalHandler" class="org.apache.cxf.jaxws.handler.LogicalHandlerInterceptor"/> - --> - - <!-- WSA Interceptors--> - <bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator"/> - <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/> - - <!-- WS-RM Interceptors--> - <bean id="rmLogicalOut" class="org.apache.cxf.ws.rm.RMOutInterceptor"> - <property name="bus" ref="cxf"/> - </bean> - <bean id="rmLogicalIn" class="org.apache.cxf.ws.rm.RMInInterceptor"> - <property name="bus" ref="cxf"/> - </bean> - <bean id="rmCodec" class="org.apache.cxf.ws.rm.soap.RMSoapInterceptor"/> - - <!-- Logging and Utility Interceptor--> - <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/> - <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> - - <!--WS-A Interceptors not required in Fault Chain--> - <cxf:bus> - <cxf:inInterceptors> - <ref bean="rmLogicalIn"/> - <ref bean="rmCodec"/> - <ref bean="mapAggregator"/> - <ref bean="mapCodec"/> - <ref bean="wrapperClassIn"/> - <ref bean="holderIn"/> - </cxf:inInterceptors> - <cxf:inFaultInterceptors> - <ref bean="clientFaultConv"/> - </cxf:inFaultInterceptors> - <cxf:outInterceptors> - <ref bean="rmLogicalOut"/> - <ref bean="rmCodec"/> - <ref bean="mapAggregator"/> - <ref bean="mapCodec"/> - <ref bean="wrapperClassOut"/> - <ref bean="holderOut"/> - <ref bean="messageSender"/> - </cxf:outInterceptors> - <cxf:outFaultInterceptors> - <ref bean="rmLogicalOut"/> - <ref bean="rmCodec"/> - <ref bean="mapAggregator"/> - <ref bean="mapCodec"/> - <ref bean="messageSender"/> - </cxf:outFaultInterceptors> - </cxf:bus> - -</beans>
http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks deleted file mode 100644 index 5bd162b..0000000 Binary files a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.properties ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.properties b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.properties deleted file mode 100644 index 1063fe1..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/alice.properties +++ /dev/null @@ -1,23 +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. -# -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=password -org.apache.ws.security.crypto.merlin.keystore.alias=alice -org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/camel/ws/security/alice.jks http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks deleted file mode 100644 index a4f49c5..0000000 Binary files a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.properties ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.properties b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.properties deleted file mode 100644 index f10ab82..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/bob.properties +++ /dev/null @@ -1,23 +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. -# -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=password -org.apache.ws.security.crypto.merlin.keystore.alias=bob -org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/camel/ws/security/bob.jks http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/client.xml ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/client.xml b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/client.xml deleted file mode 100644 index c8f9d4d..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/client.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd - "> - - <jaxws:client name="{http://apache.org/hello_world_soap_http}TimestampSignEncrypt" createdFromAPI="true"> - <jaxws:features> - <bean class="org.apache.cxf.feature.LoggingFeature"/> - </jaxws:features> - <jaxws:outInterceptors> - <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> - <ref bean="TimestampSignEncrypt_Request"/> - </jaxws:outInterceptors> - <jaxws:inInterceptors> - <ref bean="TimestampSignEncrypt_Response"/> - <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/> - </jaxws:inInterceptors> - </jaxws:client> - - <!-- --> - <!-- This bean is an Out interceptor which will add a Timestamp, --> - <!-- sign the Timstamp and Body, and then encrypt the Timestamp --> - <!-- and Body. It uses 3DES as the symmetric key algorithm. --> - <!-- --> - <bean - class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" - id="TimestampSignEncrypt_Request"> - <constructor-arg> - <map> - <entry key="action" value="Timestamp Signature Encrypt"/> - <!-- <entry key="action" value="Timestamp Signature"/> --> - <entry key="user" value="alice"/> - <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> - <entry key="encryptionPropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> - <entry key="encryptionUser" value="Bob"/> - <entry key="signatureKeyIdentifier" value="DirectReference"/> - <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> - <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> - <!-- --> - <!-- Recommendation: signatures should be encrypted --> - <!-- --> - <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> - <!-- <entry key="encryptionKeyTransportAlgorithm" value="RSA15"/> --> - <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> - </map> - </constructor-arg> - </bean> - - <!-- --> - <!-- This bean is an In interceptor which validated a signed, --> - <!-- encrypted resposne, and timestamped. --> - <!-- --> - <!-- --> - <bean - class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" - id="TimestampSignEncrypt_Response"> - <constructor-arg> - <map> - <entry key="action" value="Timestamp Signature Encrypt"/> - <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> - <entry key="decryptionPropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> - <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> - </map> - </constructor-arg> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world.wsdl ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world.wsdl b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world.wsdl deleted file mode 100644 index a3c1d24..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world.wsdl +++ /dev/null @@ -1,43 +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. ---> -<wsdl:definitions - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:tns="http://apache.org/hello_world_soap_http" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - targetNamespace="http://apache.org/hello_world_soap_http" - name="WSSecurity" - > - - <wsdl:import - namespace="http://apache.org/hello_world_soap_http" - location="hello_world_base.wsdl" - /> - - <wsdl:service name="SOAPServiceWSSecurity"> - <wsdl:port - name="TimestampSignEncrypt" - binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncrypt"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> - http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world_base.wsdl ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world_base.wsdl b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world_base.wsdl deleted file mode 100644 index 94144c9..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/hello_world_base.wsdl +++ /dev/null @@ -1,407 +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. ---> -<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:tns="http://apache.org/hello_world_soap_http" - xmlns:x1="http://apache.org/hello_world_soap_http/types" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://apache.org/hello_world_soap_http" name="HelloWorld"> - <wsdl:types> - <schema targetNamespace="http://apache.org/hello_world_soap_http/types" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="http://apache.org/hello_world_soap_http/types" elementFormDefault="qualified"> - <element name="sayHi"> - <complexType/> - </element> - <element name="sayHiResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMe"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - - <element name="testNillable"> - <complexType> - <sequence> - <element name="NillElem" nillable="true" type="string"/> - <element name="intElem" type="int"/> - </sequence> - </complexType> - </element> - <element name="testNillableResponse"> - <complexType> - <sequence> - <element name="responseType" nillable="true" type="string"/> - </sequence> - </complexType> - </element> - - <element name="greetMeLater"> - <complexType> - <sequence> - <element name="requestType" type="long"/> - </sequence> - </complexType> - </element> - <element name="greetMeLaterResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeSometime"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeSometimeResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeOneWay"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="testDocLitFault"> - <complexType> - <sequence> - <element name="faultType" type="string"/> - </sequence> - </complexType> - </element> - <element name="testDocLitFaultResponse"> - <complexType> - <sequence/> - </complexType> - </element> - <complexType name="ErrorCode"> - <sequence> - <element name="minor" type="short"/> - <element name="major" type="short"/> - </sequence> - </complexType> - <element name="NoSuchCodeLit"> - <complexType> - <sequence> - <element name="code" type="x1:ErrorCode"/> - </sequence> - </complexType> - </element> - <element name="BadRecordLit" type="string"/> - <complexType name="BadRecord"> - <sequence> - <element name="reason" type="string"/> - <element name="code" type="short"/> - </sequence> - </complexType> - <complexType name="addNumbers"> - <sequence> - <element name="arg0" type="int"/> - <element name="arg1" type="int"/> - </sequence> - </complexType> - <element name="addNumbers" type="x1:addNumbers"/> - <complexType name="addNumbersResponse"> - <sequence> - <element name="return" type="int"/> - </sequence> - </complexType> - <element name="addNumbersResponse" type="x1:addNumbersResponse"/> - <complexType name="stringStruct"> - <sequence> - <element name="arg0" type="string"/> - <element name="arg1" type="string"/> - </sequence> - </complexType> - <element name="BareDocument" type="string"/> - <element name="BareDocumentResponse"> - <complexType> - <sequence> - <element name="company" type="string"/> - </sequence> - <attribute name="id" type="int"/> - </complexType> - </element> - </schema> - </wsdl:types> - <wsdl:message name="sayHiRequest"> - <wsdl:part name="in" element="x1:sayHi"/> - </wsdl:message> - <wsdl:message name="sayHiResponse"> - <wsdl:part name="out" element="x1:sayHiResponse"/> - </wsdl:message> - <wsdl:message name="greetMeRequest"> - <wsdl:part name="in" element="x1:greetMe"/> - </wsdl:message> - <wsdl:message name="greetMeResponse"> - <wsdl:part name="out" element="x1:greetMeResponse"/> - </wsdl:message> - <wsdl:message name="testNillableRequest"> - <wsdl:part name="in" element="x1:testNillable"/> - </wsdl:message> - <wsdl:message name="testNillableResponse"> - <wsdl:part name="out" element="x1:testNillableResponse"/> - </wsdl:message> - <wsdl:message name="greetMeLaterRequest"> - <wsdl:part name="in" element="x1:greetMeLater"/> - </wsdl:message> - <wsdl:message name="greetMeLaterResponse"> - <wsdl:part name="out" element="x1:greetMeLaterResponse"/> - </wsdl:message> - <wsdl:message name="greetMeSometimeRequest"> - <wsdl:part name="in" element="x1:greetMeSometime"/> - </wsdl:message> - <wsdl:message name="greetMeSometimeResponse"> - <wsdl:part name="out" element="x1:greetMeSometimeResponse"/> - </wsdl:message> - <wsdl:message name="greetMeOneWayRequest"> - <wsdl:part name="in" element="x1:greetMeOneWay"/> - </wsdl:message> - <wsdl:message name="testDocLitFaultRequest"> - <wsdl:part name="in" element="x1:testDocLitFault"/> - </wsdl:message> - <wsdl:message name="testDocLitFaultResponse"> - <wsdl:part name="out" element="x1:testDocLitFaultResponse"/> - </wsdl:message> - <wsdl:message name="NoSuchCodeLitFault"> - <wsdl:part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/> - </wsdl:message> - <wsdl:message name="BadRecordLitFault"> - <wsdl:part name="BadRecordLit" element="x1:BadRecordLit"/> - </wsdl:message> - <wsdl:message name="testDocLitBareRequest"> - <wsdl:part name="in" element="x1:BareDocument"/> - </wsdl:message> - <wsdl:message name="testDocLitBareResponse"> - <wsdl:part name="out" element="x1:BareDocumentResponse"/> - </wsdl:message> - <wsdl:portType name="Greeter"> - <wsdl:operation name="sayHi"> - <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/> - <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMe"> - <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/> - <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/> - </wsdl:operation> - <wsdl:operation name="testNillable"> - <wsdl:input name="testNillableRequest" message="tns:testNillableRequest"/> - <wsdl:output name="testNillableResponse" message="tns:testNillableResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMeLater"> - <wsdl:input name="greetMeLaterRequest" message="tns:greetMeLaterRequest"/> - <wsdl:output name="greetMeLaterResponse" message="tns:greetMeLaterResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMeSometime"> - <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/> - <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMeOneWay"> - <wsdl:input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/> - </wsdl:operation> - <wsdl:operation name="testDocLitFault"> - <wsdl:input name="testDocLitFaultRequest" message="tns:testDocLitFaultRequest"/> - <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse"/> - <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/> - <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/> - </wsdl:operation> - - </wsdl:portType> - - <wsdl:portType name="DocLitBare"> - <wsdl:operation name="testDocLitBare"> - <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/> - <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="sayHi"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMe"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="testNillable"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMeLater"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMeSometime"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMeOneWay"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - </wsdl:operation> - <wsdl:operation name="testDocLitFault"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - <wsdl:fault name="NoSuchCodeLitFault"> - <soap:fault name="NoSuchCodeLitFault" use="literal"/> - </wsdl:fault> - <wsdl:fault name="BadRecordLitFault"> - <soap:fault name="BadRecordLitFault" use="literal"/> - </wsdl:fault> - </wsdl:operation> - - </wsdl:binding> - <wsdl:binding name="Doc_Lit_Bare_SOAPBinding" type="tns:DocLitBare"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="testDocLitBare"> - <soap:operation style="document" soapAction="http://apache.org/hello_world_soap_http/testDocLitBare"/> - <wsdl:input name="testDocLitBareRequest"> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output name="testDocLitBareResponse"> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - - <wsdl:service name="SOAPService"> - <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:19000/SoapContext/SoapPort"/> - </wsdl:port> - - <wsdl:port name="SoapPort1" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:7000/SoapContext/SoapPort"/> - </wsdl:port> - </wsdl:service> - - <wsdl:service name="SOAPProviderService"> - <wsdl:port name="SoapProviderPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9003/SoapContext/SoapProviderPort"/> - </wsdl:port> - </wsdl:service> - - <wsdl:service name="SOAPDispatchService"> - <wsdl:port name="SoapDispatchPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9006/SOAPDispatchService/SoapDispatchPort"/> - </wsdl:port> - </wsdl:service> - - <wsdl:service name="SOAPService_DocLitBare"> - <wsdl:port name="SoapPort2" binding="tns:Doc_Lit_Bare_SOAPBinding"> - <soap:address location="http://localhost:7600/SoapContext/SoapPort"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPServiceAddressingDocLitBare"> - <wsdl:port name="SoapPort" binding="tns:Doc_Lit_Bare_SOAPBinding"> - <soap:address location="http://localhost:7600/SoapContext/SoapPort"/> - <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPService_Test1"> - <wsdl:port name="SoapPort_Test1" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9100"/> - </wsdl:port> - <wsdl:port name="SoapPort_Test2" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9101"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPServiceAddressing"> - <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9008/SoapContext/SoapPort"/> - <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPServiceConcurrencyTest"> - <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9009/SoapContext/SoapPort"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPServiceBogusAddressTest"> - <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="FOO"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPServiceMultiPortTypeTest"> - <wsdl:port name="GreeterPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9020/MultiPort/GreeterPort"/> - </wsdl:port> - <wsdl:port name="DocLitBarePort" binding="tns:Doc_Lit_Bare_SOAPBinding"> - <soap:address location="http://localhost:9021/MultiPort/DocBarePort"/> - </wsdl:port> - </wsdl:service> -</wsdl:definitions> - http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml b/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml deleted file mode 100644 index 188277e..0000000 --- a/camel/servicemix-camel/src/test/resources/org/apache/servicemix/camel/ws/security/server.xml +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xmlns:test="http://apache.org/hello_world_soap_http" - xmlns:cxf="http://camel.apache.org/schema/cxf" - xmlns:smx="http://servicemix.apache.org/camelEndpoint/" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd - http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd - http://servicemix.apache.org/camelEndpoint/ http://servicemix.apache.org/camelEndpoint/.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd - "> - <import resource="classpath:META-INF/cxf/cxf.xml"/> - - <bean class="org.apache.camel.component.cxf.transport.CamelTransportFactory" lazy-init="true"> - <property name="bus" ref="cxf"/> - <property name="camelContext" ref="camel_context"/> - <property name="transportIds"> - <list> - <value>http://cxf.apache.org/transports/camel</value> - </list> - </property> - </bean> - - <camel:camelContext id="camel_context"> - </camel:camelContext> - - <cxf:cxfEndpoint id="routerEndpoint" name="test:TimestampSignEncrypt" address="camel://jetty:http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncrypt" serviceClass="org.apache.hello_world_soap_http.Greeter"> - <cxf:features> - <bean class="org.apache.cxf.feature.LoggingFeature"/> - </cxf:features> - <cxf:outInterceptors> - <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> - <ref bean="TimestampSignEncrypt_Response"/> - </cxf:outInterceptors> - <cxf:inInterceptors> - <ref bean="TimestampSignEncrypt_Request"/> - <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/> - </cxf:inInterceptors> - <cxf:properties> - <entry key="setDefaultBus" value="true"/> - </cxf:properties> - </cxf:cxfEndpoint> - - - <cxf:cxfEndpoint id="serviceEndpoint" address="local://smx/hello_world" - serviceClass="org.apache.hello_world_soap_http.Greeter"> - <cxf:properties> - <entry key="setDefaultBus" value="true"/> - </cxf:properties> - </cxf:cxfEndpoint> - - - <bean - class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" - id="TimestampSignEncrypt_Response"> - <constructor-arg> - <map> - <entry key="action" value="Timestamp Signature Encrypt"/> - <entry key="user" value="bob"/> - <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> - <entry key="encryptionPropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> - <entry key="encryptionUser" value="Alice"/> - <entry key="signatureKeyIdentifier" value="DirectReference"/> - <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> - <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> - <!-- --> - <!-- Recommendation: signatures should be encrypted --> - <!-- --> - <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> - <!-- <entry key="encryptionKeyTransportAlgorithm" value="RSA15"/> --> - <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> - </map> - </constructor-arg> - </bean> - <bean - class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" - id="TimestampSignEncrypt_Request"> - <constructor-arg> - <map> - <!-- Use this action order for local clients --> - <entry key="action" value="Timestamp Signature Encrypt"/> - <!-- Use this action spec for WCF clients - <entry key="action" value="Signature Encrypt Timestamp"/> - --> - <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> - <entry key="decryptionPropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> - <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> - </map> - </constructor-arg> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/camel/servicemix-camel/src/test/resources/person.wsdl ---------------------------------------------------------------------- diff --git a/camel/servicemix-camel/src/test/resources/person.wsdl b/camel/servicemix-camel/src/test/resources/person.wsdl deleted file mode 100644 index ed8e29a..0000000 --- a/camel/servicemix-camel/src/test/resources/person.wsdl +++ /dev/null @@ -1,97 +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. - ---> -<wsdl:definitions name="wsdl-first" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" - xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" - targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> - - <wsdl:types> - <xsd:schema targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types" - elementFormDefault="qualified"> - <xsd:element name="GetPerson"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="GetPersonResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - <xsd:element name="ssn" type="xsd:string"/> - <xsd:element name="name" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="UnknownPersonFault"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="personId" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:schema> - </wsdl:types> - - <wsdl:message name="GetPersonRequest"> - <wsdl:part name="payload" element="typens:GetPerson"/> - </wsdl:message> - <wsdl:message name="GetPersonResponse"> - <wsdl:part name="payload" element="typens:GetPersonResponse"/> - </wsdl:message> - <wsdl:message name="UnknownPersonFault"> - <wsdl:part name="payload" element="typens:UnknownPersonFault"/> - </wsdl:message> - - <wsdl:portType name="Person"> - <wsdl:operation name="GetPerson"> - <wsdl:input message="tns:GetPersonRequest"/> - <wsdl:output message="tns:GetPersonResponse"/> - <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="PersonSOAPBinding" type="tns:Person"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetPerson"> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - <wsdl:fault name="UnknownPerson"> - <soap:fault use="literal" name="UnknownPerson" /> - </wsdl:fault> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="PersonService"> - <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> - <soap:address location="http://localhost:8192/PersonService/" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/pom.xml ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/pom.xml b/cxf/cxf-binding-nmr/pom.xml deleted file mode 100644 index 5ec0ea9..0000000 --- a/cxf/cxf-binding-nmr/pom.xml +++ /dev/null @@ -1,243 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.cxf</groupId> - <artifactId>cxf</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <artifactId>org.apache.servicemix.cxf.binding.nmr</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Features :: CXF Support :: Binding For NMR</name> - <description>Apache CXF Binding integration in the NMR </description> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix.nmr</groupId> - <artifactId>org.apache.servicemix.nmr.api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix.nmr</groupId> - <artifactId>org.apache.servicemix.nmr.core</artifactId> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>org.springframework.context</artifactId> - </exclusion> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>org.springframework.beans</artifactId> - </exclusion> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>org.springframework.core</artifactId> - </exclusion> - <exclusion> - <groupId>org.springframework</groupId> - <artifactId>org.springframework.aop</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-bundle</artifactId> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-testutils</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-annotation_1.0_spec</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix.specs</groupId> - <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymockclassextension</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <!-- Bundle generation --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Description>${project.description}</Bundle-Description> - <Import-Package> - javax.xml.stream;version="[0.0,2)", - * - </Import-Package> - <!-- Needed for jaxb annotations classes --> - <DynamicImport-Package>*</DynamicImport-Package> - <Export-Package> - ${project.artifactId}*, - '=META-INF.cxf.binding.nmr' - </Export-Package> - <Private-Package /> - <_failok>true</_failok> - <Spring-Context>*;publish-context:=false</Spring-Context> - <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy> - </instructions> - </configuration> - </plugin> - <!-- generate dependencies versions --> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>depends-maven-plugin</artifactId> - <version>${depends-maven-plugin.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> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <executions> - <execution> - <id>generate-test-sources</id> - <phase>generate-sources</phase> - <configuration> - <sourceRoot>${basedir}/target/generated</sourceRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/test/resources/hello_world_nmr.wsdl</wsdl> - <extraargs> - <extraarg>-verbose</extraarg> - </extraargs> - </wsdlOption> - </wsdlOptions> - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - - <profiles> - <profile> - <id>ibmjdk</id> - <activation> - <property> - <name>java.vendor</name> - <value>IBM Corporation</value> - </property> - </activation> - <!-- Add the Sun jaxp-ri as a dependency when using the ibm jdk, so that - cxf's dependency on the Sun saaj can work with the ibm jdk. --> - <dependencies> - <dependency> - <groupId>com.sun.xml.parsers</groupId> - <artifactId>jaxp-ri</artifactId> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>**/*Test*</include> - </includes> - <excludes> - <exclude>**/*$*</exclude> - </excludes> - <forkMode>${surefire.fork.mode}</forkMode> - <systemProperties> - <property> - <name>derby.system.home</name> - <value>${basedir}/target/derby</value> - </property> - <!-- With Maven 2.0.7, it's possible that jaxp-ri will be placed - in front of woodstox on the classpath. If this happens, cxf will not use - woodstox, causing test failures (e.g., CxfBcProviderConsumerMtomTest). So, - set these properties to ensure woodstox is used. Maven 2.0.9 doesn't require - this work-around since it consistently places jaxp-ri at the end of the dependencies. --> - <property> - <name>javax.xml.stream.XMLInputFactory</name> - <value>com.ctc.wstx.stax.WstxInputFactory</value> - </property> - <property> - <name>javax.xml.stream.XMLOutputFactory</name> - <value>com.ctc.wstx.stax.WstxOutputFactory</value> - </property> - </systemProperties> - </configuration> - </plugin> - - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java deleted file mode 100644 index 33e4c7a..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBinding.java +++ /dev/null @@ -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; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java deleted file mode 100644 index d2e3b49..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingFactory.java +++ /dev/null @@ -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; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java deleted file mode 100644 index 60fbe4e..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRBindingInfo.java +++ /dev/null @@ -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); - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java deleted file mode 100644 index 6afc2c4..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRConstants.java +++ /dev/null @@ -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 - } -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java deleted file mode 100644 index edf29d7..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRFault.java +++ /dev/null @@ -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; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java deleted file mode 100644 index 465bc62..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/NMRMessage.java +++ /dev/null @@ -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); - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java deleted file mode 100644 index 0ed3167..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultInInterceptor.java +++ /dev/null @@ -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)); - } - - } -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java deleted file mode 100644 index 30642af..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMRFaultOutInterceptor.java +++ /dev/null @@ -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; - } -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java ---------------------------------------------------------------------- diff --git a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java b/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java deleted file mode 100644 index ce66c59..0000000 --- a/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java +++ /dev/null @@ -1,72 +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()!= 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); - } - -}
