How to convert SOAP request and response in XML format?
<p>I've set up a SOAP WebServiceProvider in JAX-WS, but I'm having trouble figuring out how to get request and response in XML format from a SOAP request and response. Here's a sample of the code I've got right now, and where I'm trying to grab the XML:</p>

<pre><code>          package com.ewb.socialbanking.creditcardMain;
          import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
          import org.springframework.ws.soap.client.core.SoapActionCallback;
          import com.ewb.socialbanking.creditcardws.GetCcNumber;
          import com.ewb.socialbanking.creditcardws.GetCcNumberResponse;
          import com.safenet.wsdl.LoginUser;

           /*THIS IS HOW I AM GIVING THE REQUEST :
         AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
              ctx.register(CreditCardConfig.class);
             ctx.refresh();

            CreditCardClient cCClient = ctx.getBean(CreditCardClient.class);
           GetCcNumber cCNumber = new GetCcNumber();

    ObjectFactory enrollObjFactory = new ObjectFactory();

    cCNumber.setT24Cif(enrollObjFactory.createString("abc"));
    cCNumber.setLinkId(enrollObjFactory.createString("def"));
    cCNumber.setCcCif(enrollObjFactory.createString("ghi"));
    cCNumber.setMsgRefNo(enrollObjFactory.createString("jkl"));

    GetCcNumberResponse valueForRes = cCClient.getCreditCardDetails(cCNumber);*/



        public class CreditCardClient extends WebServiceGatewaySupport {
       public GetCcNumberResponse getCreditCardDetails(GetCcNumber request) {
       //I want here request in xml format??
       System.out.println("req : "+request);
       //Right now it is coming as : 
        //req : com.ewb.socialbanking.creditcardws.GetCcNumber@5d534f5d
       GetCcNumberResponse response = null;
    try {
        response = (GetCcNumberResponse) getWebServiceTemplate()
                .marshalSendAndReceive(
                        request,
                        new SoapActionCallback(
                                "http://F9M9MV1RENTAL:8088/mocksoap/GetCcNumber"));
    } catch (Exception e) {
        e.printStackTrace();
    }
    //I want here response in xml format??
     System.out.println("res : "+response);
       //Right now it is coming as : 
         //res : com.ewb.socialbanking.creditcardws.GetCcNumberResponse@514646ef
    return response;
}
</code></pre>

<p>}</p>