It works fine when I'm using the @WebParam annotation. Thanks a lot!

I'm using the following config in the package-info:
@XmlSchema(
namespace="urn:xastory:csm:contract",
elementFormDefault = XmlNsForm.QUALIFIED
)
@XmlAccessorType(XmlAccessType.FIELD)
package net.atos.xastory.csm.contract;

I also tried with a client that uses the Sun-based (Metro) implementation of
JAX-WS and the xmlns attribute is also empty.
Does it mean that Axis2 and Metro do not implement correctly the
elementFormDefault attribute when no WebParam is defined ?

Jonathan



dkulp wrote:
> 
> 
> Two thoughts:
> 
> 1) Definitely upgrade to CXF 2.2.2 or at least 2.1.5.    We're going to
> stop 
> supporting 2.0.x very soon. (July)   Also 2.1 clarified some of the
> namespace 
> mapping/handling a bit better so that alone might fix it.
> 
> 2)  In the wsdl returned from: 
> http://localhost:8080/net.atos.xastory.csm.contract.CatalogueStockManagementService?wsdl
> what does the schema say for the elementFormDefault?   If it says
> "qualified", 
> then the Axis2 message is wrong.  
>  
> You MAY be able to get them to work together if you add a @WebParam
> annotation 
> like:
> net.atos.xastory.csm.contract.WithdrawProductOutput withdrawProducts(
>         @WebParam(name = "input",
> targetNamespace="urn:xastory:csm:contract")
>          net.atos.xastory.csm.contract.WithdrawProductInput input)
> 
> Dan
> 
> 
> On Thu June 18 2009 9:55:12 am Jonathan Macke wrote:
>> 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.CatalogueStockMana
>>gementService?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
> 
> -- 
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis2-client-is-not-working-with-a-CXF-server-tp24093434p24095073.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to