What version of CXF are you using?   The response message looks like it 
was generated with 2.0 or 2.0.1.   I would definitely suggest upgrading 
to 2.0.3 which should fix the problem.

Dan


On Tuesday 04 December 2007, rm-ramos wrote:
> Hi all,
>
> I'm trying to enter this beautiful world of deploying  CXF WS in
> JBoss, but I'm having some namespace issues with the XML I get as an
> answer, from the WS.
>
> I created a code first service, with the following service endpoint
> interface:
>
>
> @WebService(name="GetWorkOrderService",
> targetNamespace="http://webservice.api.wow/";)
> public interface GetWorkOrderService {
>
> @WebMethod
> @WebResult(targetNamespace="", name = "simpleWODetails")
> public simpleWODetails get(@WebParam(name = "workOrderId") Integer
> workOrderId);
>
>
> The 'get' method's impletation will then return a simpleWODetails'
> object, which is only formed by pojo's. Of course, I have my impl
> annotated with: @WebService(endpointInterface =
> "com.criticalsoftware.wow.GetWorkOrderService")
>
> On generating the WSDL, via java2wsdl, everything goes fine, but when
> I tested the service on soapUI, the XML returned didn't validate. It
> went something like:
>
> #1 - Request
>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:web="http://webservice.api.wow/";>
>    <soapenv:Header/>
>    <soapenv:Body>
>       <web:get>
>          <workOrderId>4054</workOrderId>
>       </web:get>
>          (...)
>
>
> #2 - Response
>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soap:Body>
>       <getResponse xmlns="http://webservice.api.wow/";>
>          <ns2:simpleWODetails xmlns:ns2="http://webservice.api.wow/";>
>             <changeUserId>369</changeUserId>
>             (....)
>
>
> The validation outputs that 'Expected element 'simpleWODetails instead
> of [EMAIL PROTECTED]://webservice.api.wow/', even though I already
> set up the answer's targetNamespace to "" (in the SEI). The strange
> thing is that I can change it to anything else (if I set the
> targetNamespace to "x.y.z", it does change in the answer), but I just
> can't clear it.
>
> As a result, all the calls I make with the stubs generated from the
> WSDL return null, since they can't find the object with the correct
> (empty) namespace on the answer.
>
> Hope you guys can help me out, been stuck on this for some days now...
> Thanks!
> Rui Ramos



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to