You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Julien Dufourd <ju...@gmail.com> on 2011/06/29 10:37:05 UTC

How to capture SOAP frame in a client java

Hi,

I try to capture the SOAP frame between my client and the java webservice that
Ishould call.
Is there a method or tool to display the fabric of SOAP. The difficulty is
that the SOAPis encoded by a certificate

Dufourd Julien

Re: How to capture SOAP frame in a client java

Posted by Julien Dufourd <ju...@gmail.com>.
Hi,

i have progress in my search for my logging. I have modified my spring file:
Before I had this file:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://cxf.apache.org/jaxws"
  xsi:schemaLocation="
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
   http://cxf.apache.org/jaxws
   http://cxf.apache.org/schemas/jaxws.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

  <jaxws:client id="ServiceValiderInterventionPIDIS2F1"
serviceClass="com.francetelecom.pidi.metierexterne.entree.validationcri.s2f1.ServiceValiderInterventionPIDI"
address="
https://webservices.francetelecom.com/pidiG2R1/servicescxf/ServiceValiderInterventionPIDIS2F1"
/>
  <http:conduit name="*.http-conduit">
    <http:tlsClientParameters secureSocketProtocol="SSL"
disableCNCheck="true">
      <sec:keyManagers keyPassword="XXXX">
           <sec:keyStore type="JKS" password="XXXX" file="XXX.jks"/>
      </sec:keyManagers>

  </http:tlsClientParameters>
   </http:conduit>
</beans>


And now i have made this spring file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:wsa="http://cxf.apache.org/ws/addressing"
  xsi:schemaLocation="
       http://cxf.apache.org/core
   http://cxf.apache.org/schemas/core.xsd
       http://schemas.xmlsoap.org/ws/2005/02/rm/policy
   http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
       http://cxf.apache.org/ws/rm/manager
   http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
   http://cxf.apache.org/jaxws
   http://cxf.apache.org/schemas/jaxws.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="proxyFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
    <property name="serviceClass"
value="com.francetelecom.pidi.metierexterne.entree.validationcri.s2f1.ServiceValiderInterventionPIDI"/>
    <property name="address" value="
https://webservices.francetelecom.com/pidiG2R1/servicescxf/ServiceValiderInterventionPIDIS2F1
"/>
    <property name="inInterceptors">
      <list>
        <ref bean="logIn" />
      </list>
    </property>
    <property name="outInterceptors">
      <list>
        <ref bean="logOut" />
      </list>
    </property>
  </bean>

  <bean id="client" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"
factory-bean="proxyFactory" factory-method="create" />
  <bean id="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor"
/>
  <bean id="logOut" class="org.apache.cxf.interceptor.LoggingOutInterceptor"
/>

  <http:conduit name="*.http-conduit">
    <http:tlsClientParameters secureSocketProtocol="SSL"
disableCNCheck="true">
      <sec:keyManagers keyPassword="XXXX">
           <sec:keyStore type="JKS" password="XXXXX" file="XXXX.jks"/>
      </sec:keyManagers>

  </http:tlsClientParameters>
   </http:conduit>

</beans>

With that new Spring file, i have my log, but the SSL doesn't work anymore
T_T . Did someone have an idee about my mistake ?


Dufourd Julien

2011/6/30 Glen Mazza <gm...@talend.com>

> Wireshark will let you see the encrypted messages[1] which could still show
> you a lot of what you might be looking for.  As for decrypted, I think if
> you activate CXF logging at FINE level you'll be able to see the decrypted
> requests and responses.  Metro has this option[2] for its clients and IIRC
> you can configure soapUI with key information so you'll see the SOAP
> requests and responses unencrypted within that tool.
>
> HTH,
> Glen
>
> [1] http://www.jroller.com/gmazza/**entry/soap_calls_over_**wireshark<http://www.jroller.com/gmazza/entry/soap_calls_over_wireshark>
> [2] http://metro.1045641.n5.**nabble.com/Viewing-the-STS-**
> RequestSecurityToken-XML-**td3323608.html<http://metro.1045641.n5.nabble.com/Viewing-the-STS-RequestSecurityToken-XML-td3323608.html>
>
>
> On 06/29/2011 04:37 AM, Julien Dufourd wrote:
>
>> Hi,
>>
>> I try to capture the SOAP frame between my client and the java webservice
>> that
>> Ishould call.
>> Is there a method or tool to display the fabric of SOAP. The difficulty is
>> that the SOAPis encoded by a certificate
>>
>> Dufourd Julien
>>
>
>
> --
> Glen Mazza
> Application Integration Division
> Talend (http://www.talend.com/ai)
> blog: http://www.jroller.com/gmazza
>
>
>

Re: How to capture SOAP frame in a client java

Posted by Glen Mazza <gm...@talend.com>.
Wireshark will let you see the encrypted messages[1] which could still 
show you a lot of what you might be looking for.  As for decrypted, I 
think if you activate CXF logging at FINE level you'll be able to see 
the decrypted requests and responses.  Metro has this option[2] for its 
clients and IIRC you can configure soapUI with key information so you'll 
see the SOAP requests and responses unencrypted within that tool.

HTH,
Glen

[1] http://www.jroller.com/gmazza/entry/soap_calls_over_wireshark
[2] 
http://metro.1045641.n5.nabble.com/Viewing-the-STS-RequestSecurityToken-XML-td3323608.html

On 06/29/2011 04:37 AM, Julien Dufourd wrote:
> Hi,
>
> I try to capture the SOAP frame between my client and the java webservice that
> Ishould call.
> Is there a method or tool to display the fabric of SOAP. The difficulty is
> that the SOAPis encoded by a certificate
>
> Dufourd Julien


-- 
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza