cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Landbo Frederiksen" <C...@Ementor.dk>
Subject Figuring out why params turn to null
Date Mon, 15 Dec 2008 14:57:19 GMT
I am using CXF 2.1

 

I expose a java class/method like this

 

@WebService(name="EchoService",
targetNamespace="http://echo.dk/2008/11/16")

public interface EchoService {

            

            @WebMethod

            public String echo(@WebParam(name = "hello") String hello)

 

 

This turns into this wsdl:

 

<xs:schema attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://echo.dk/2008/11/16"
xmlns="http://echo.dk/2008/11/16"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <xs:element name="echo" type="echo"/>

      <xs:complexType name="echo">

        <xs:sequence>

          <xs:element minOccurs="0" name="hello" type="xs:string"/>

        </xs:sequence>

      </xs:complexType>

      <xs:element name="echoResponse" type="echoResponse"/>

      <xs:complexType name="echoResponse">

        <xs:sequence>

          <xs:element minOccurs="0" name="return" type="xs:string"/>

        </xs:sequence>

      </xs:complexType>

    </xs:schema>

 

 

Can successfully be called in SOAP-UI:

 

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://optagelse.dk/2008/11/16">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:echo>

                                            <hello>Champ</hello>

      </ns:echo>

   </soapenv:Body>

</soapenv:Envelope>

 

But another client generates this:

 

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >

   <soapenv:Header/>

   <soapenv:Body>

      <echo xmlns="http://optagelse.dk/2008/11/16">

                                            <hello>Champ</hello>

      </echo>

   </soapenv:Body>

</soapenv:Envelope>

 

And this results in the param being null in the method

 

The problem is that the param only works when it is given without
namespace.

ns:hello gives the same result in the first example.

 

Is this not a bug? The schema in the wsdl has targetNamespace set so you
would assume that the client namespace on the param would work.

 

/Chr

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message