Hello,

I am trying to send soap envelope using cxf client. It creates soap envelope 
however

CXF JMS client creates method qualified name
<submitTrade xmlns="http://service.backoffice.sample.esf.cibtech.citi.com/";>  
[which is Not working for my service]
CXF HTTP client creates method qualified name
<ns2:submitTrade 
xmlns:ns2="http://service.backoffice.sample.esf.cibtech.citi.com/";> [which is 
working fine for my service]

Is there any way I can change it ?
>From <submitTrade 
>xmlns="http://service.backoffice.sample.esf.cibtech.citi.com/";> To 
><ns2:submitTrade 
>xmlns:ns2="http://service.backoffice.sample.esf.cibtech.citi.com/";>
This issue is consistent in CXF 2.1, CXF 2.1.5 and CXF 2.2.3.

Appreciate your help.

Regards,
Manoj

For both http and jms wsdltojava client service is used.

Client code
       com.citi.cibtech.esf.sample.backoffice.service.BackOfficeService service 
= new 
com.citi.cibtech.esf.sample.backoffice.service.BackOfficeService(wsdl.toURL(), 
SERVICE_NAME);
        com.citi.cibtech.esf.sample.backoffice.service.BackOffice backoffice = 
(com.citi.cibtech.esf.sample.backoffice.service.BackOffice)service.getPort(PORT_NAME,
 com.citi.cibtech.esf.sample.backoffice.service.BackOffice.class);

                com.citi.cibtech.esf.sample.backoffice.service.Trade td = new 
com.citi.cibtech.esf.sample.backoffice.service.Trade();
                td.setAccountID(11);
                td.setCUSIP("11");
                td.setCurrency("usd");
                td.setPrice(11.21f);
                td.setTradeID(11);
                td.setTransaction("11");

                System.out.println("server responded with: " + 
backoffice.submitTrade(td));


Wsdl port binding for jms
<wsdl:service name="BackOfficeService">
    <wsdl:port binding="tns:BackOfficeServiceSoapBinding" 
name="BackOfficeImplPort">
               <jms:address
                   destinationStyle="queue"
                   jndiConnectionFactoryName="QueueConnectionFactory"
                   
jndiDestinationName="com.citi.cibtech.esf.sample.backoffice.service.BackOfficeService.request">

                   <jms:JMSNamingProperty name="java.naming.factory.initial" 
value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
                   <jms:JMSNamingProperty name="java.naming.provider.url" 
value="tcp://localhost:xxxx"/>

              </jms:address>
    </wsdl:port>
  </wsdl:service>



Complete evelopes are below

<soapenv:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soapenv:Body>
                <submitTrade 
xmlns="http://service.backoffice.sample.esf.cibtech.citi.com/";>
                        <arg0>
                                <accountID>11</accountID>
                                <CUSIP>11</CUSIP>
                                <currency>usd</currency>
                                <price>11.21</price>
                                <tradeID>11</tradeID>
                                <transaction>11</transaction>
                        </arg0>
                </submitTrade>
        </soapenv:Body>
</soapenv:Envelope>



<soapenv:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soapenv:Body>
                <ns2:submitTrade 
xmlns:ns2="http://service.backoffice.sample.esf.cibtech.citi.com/";>
                        <arg0>
                                <accountID>11</accountID>
                                <CUSIP>11</CUSIP>
                                <currency>usd</currency>
                                <price>11.21</price>
                                <tradeID>11</tradeID>
                                <transaction>11</transaction>
                        </arg0>
                </ns2:submitTrade>
        </soapenv:Body>
</soapenv:Envelope>

Reply via email to