You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Freeman Fang <fr...@gmail.com> on 2008/08/01 12:19:26 UTC

Re: SOAPFault not returning in CXFBC Consumer

Hi,

Please append the STAKE.xsd as well.

And from the xbean.xml of your provider, seems the bean 
TimestampSignEncrypt_Request is not used, right? and you use a bean 
TimestampSignEncrypt_Response (but I can't see this bean definition in 
your xbean.xml) for outInterceptors, but it's a little bit wired for me 
since generally you should use "request" for outInterceptor and 
"response" for  inInterceptor since cxf bc provider play the role as a 
client against external service.

Also, would you please try without the SAAJ/WSS4J interceptor for your 
provider since I fix a issue [1] last week about cxf bc provider can't 
handle response soap message with ws-securitly header, but this fix is 
not in the fuse esb 3.3.1.3 you are using.

[1]http://issues.apache.org/activemq/browse/SM-1471

Freeman


wrote:
> I have attached the wsdl and schema files (except for STAKE.xsd, it was too
> large).  Hopefully the wsdl is all you need.  If not, I can send it to you
> STAKE.xsd separately.
>
> My consumer service and provider service use the same wsdl.  The whole
> operation is just a pass-thru.  The provider adds WS-Security headers, but
> other than that everything is the same.  Here it is:
>
>     <cxfbc:provider wsdl="classpath:wsdl/DataGateway.wsdl"
> 	             
> locationURI="http://outsideserver:8081/gateway/services/DataMaintenanceService"
>                       endpoint="DataMaintenanceSOAPPort"
> 		      service="dgw:DataMaintenanceService">
>       <cxfbc:inInterceptors>
>           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>       </cxfbc:inInterceptors>
>       <cxfbc:outInterceptors>
>   	<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> 	<ref bean="saajout"/>
>              <ref bean="TimestampSignEncrypt_Response"/>
>              <bean class="com.issinc.apache.cxf.ContentTypeFixer"/>
>       </cxfbc:outInterceptors>
>       <cxfbc:inFaultInterceptors>
>           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>       </cxfbc:inFaultInterceptors>
>       <cxfbc:outFaultInterceptors>
>           <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>       </cxfbc:outFaultInterceptors>
>     </cxfbc:provider>
>
>     <bean
>         class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"
>         id="TimestampSignEncrypt_Request">
>         <constructor-arg>
>             <map>
>                 <entry key="action" value="UsernameToken"/>
>                 <entry key="passwordCallbackClass"
> value="org.apache.servicemix.samples.cxf_ws_security.KeystorePasswordCallback"/>
>             </map>
>         </constructor-arg>
>     </bean>
>   


Re: SOAPFault not returning in CXFBC Consumer

Posted by dhaas <do...@issinc.com>.
here is the provider again.  I missed the bean as you said.  The STAKE.xsd
file is about 6M and I can't upload it to this issue because of the size.

<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
       xmlns:stake="urn:com.issinc.stake"
       xmlns:dgw="http://www.issinc.com/gateway/services/wsdl">
  
       <cxfbc:consumer wsdl="classpath:wsdl/DataGateway.wsdl"
	               targetService="stake:dgw-request-response"
	               endpoint="DataMaintenanceJBISOAPPort"
		       service="dgw:DataMaintenanceJBIService"/>

    <cxfbc:provider wsdl="classpath:wsdl/DataGateway.wsdl"
	             
locationURI="http://localhost:8081/gateway/services/DataMaintenanceService"
                      endpoint="DataMaintenanceSOAPPort"
		      service="dgw:DataMaintenanceService">
      <cxfbc:inInterceptors>
          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
      </cxfbc:inInterceptors>
      <cxfbc:outInterceptors>
  	<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
	<ref bean="saajout"/>
             <ref bean="TimestampSignEncrypt_Response"/>
             <bean class="com.issinc.apache.cxf.ContentTypeFixer"/>
      </cxfbc:outInterceptors>
      <cxfbc:inFaultInterceptors>
          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
      </cxfbc:inFaultInterceptors>
      <cxfbc:outFaultInterceptors>
          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
      </cxfbc:outFaultInterceptors>
    </cxfbc:provider>
    
    <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"
id="saajout"/>
    <bean
        class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
        id="TimestampSignEncrypt_Response">
        <constructor-arg>
            <map>
		    <!-- <entry key="action" value="Timestamp Signature Encrypt"/> -->
                <entry key="action" value="UsernameToken"/>
                <entry key="user" value="system"/>
                <entry key="passwordType" value="PasswordText"/>
                <entry key="signaturePropFile" value="bob.properties"/>
                <entry key="encryptionPropFile" value="alice.properties"/>
                <entry key="encryptionUser" value="Alice"/>
                <entry key="signatureKeyIdentifier"
value="DirectReference"/>
                <entry key="passwordCallbackClass"
value="org.apache.servicemix.samples.cxf_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>
                <entry key="action" value="UsernameToken"/>
                <entry key="signaturePropFile" value="alice.properties"/>
                <entry key="decryptionPropFile" value="bob.properties"/>
                <entry key="passwordCallbackClass"
value="org.apache.servicemix.samples.cxf_ws_security.KeystorePasswordCallback"/>
            </map>
        </constructor-arg>
    </bean>

</beans>

-- 
View this message in context: http://www.nabble.com/SOAPFault-not-returning-in-CXFBC-Consumer-tp18716659p18781636.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.