Hi,
I wrote a simple service using the JAX-WS API.
@WebService(targetNamespace = "urn:xastory:csm:contract")
public interface CatalogueStockManagementService {
@WebMethod
net.atos.xastory.csm.contract.WithdrawProductOutput withdrawProducts(
net.atos.xastory.csm.contract.WithdrawProductInput
input)
throws net.atos.xastory.csm.contract.ServiceException;
}
Technical Environment:
- CXF 2.0.11
- Tomcat 5.5
- JAXB 2.0
I tried to used this service with a Axis2-based client using JAX-WS.
@Test
public void testAxis2Jaxws() throws Exception{
URL wsdl = new
URL("http://localhost:8080/net.atos.xastory.csm.contract.CatalogueStockManagementService?wsdl");
QName qname = new QName("http://provider.csm.xastory.atos.net/",
"CatalogueStockManagementServiceImplService");
Service service = Service.create(wsdl, qname);
CatalogueStockManagementService catalogueService =
service.getPort(CatalogueStockManagementService.class);
WithdrawProductInput input = new WithdrawProductInput();
//fill the input object
WithdrawProductOutput output = catalogueService.withdrawProducts(input);
}
>From the server side, input is null. I tried with a CXF-based client, I'm
getting the input properly filled.
Here is the SOAP request generated by the CXF client:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:withdrawProducts xmlns:ns1="urn:xastory:csm:contract">
<arg0 xmlns="urn:xastory:csm:contract">
<products>
<externalReference>2</externalReference>
<quantity>3</quantity>
<currentPrice>
<amount>12.0</amount>
<currency>EUR</currency>
</currentPrice>
<taxes>
<percentage>20</percentage>
<taxType>taxType</taxType>
</taxes>
</products>
</arg0>
</ns1:withdrawProducts>
</soap:Body>
</soap:Envelope>
Here is the SOAP request generated by the Axis2 client:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<dlwmin:withdrawProducts
xmlns:dlwmin="urn:xastory:csm:contract">
<arg0 xmlns="">
<dlwmin:products>
<dlwmin:externalReference>2</dlwmin:externalReference>
<dlwmin:quantity>3</dlwmin:quantity>
<dlwmin:currentPrice>
<dlwmin:amount>12.0</dlwmin:amount>
<dlwmin:currency>EUR</dlwmin:currency>
</dlwmin:currentPrice>
<dlwmin:taxes>
<dlwmin:percentage>20</dlwmin:percentage>
<dlwmin:taxType>taxType</dlwmin:taxType>
</dlwmin:taxes>
</dlwmin:products>
</arg0>
</dlwmin:withdrawProducts>
</soapenv:Body>
</soapenv:Envelope>
In Axis2 the xmlns attribute is empty for the arg0 element. CXF seems not
able to treat requests with an empty xmlns in the arg0 element.
Do you have any idea to solve this problem?
Jonathan
--
View this message in context:
http://www.nabble.com/Axis2-client-is-not-working-with-a-CXF-server-tp24093434p24093434.html
Sent from the cxf-user mailing list archive at Nabble.com.