You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Purohit, Manoj R " <ma...@citi.com> on 2009/10/21 16:29:56 UTC
JMS Soap client namespace causing problem
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>
Re: JMS Soap client namespace causing problem
Posted by Daniel Kulp <dk...@apache.org>.
Those two soap messages are very different. Are the wsdls/schemas for these
services available someplace? Since this is a wsdl2java thing, it sounds
like the schema in the wsdl might be wrong.
Does the schema say something like "elementFormDefault=qualified" in it?
Dan
On Wed October 21 2009 10:29:56 am Purohit, Manoj R wrote:
> 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.toUR
> L(), 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.BackOf
> ficeService.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>
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog