cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bazaj, Taru \(IT\)" <Taru.Ba...@MorganStanley.com>
Subject RE: CXF Generating Incorrect Namespaces in the Soap Requests
Date Fri, 10 Oct 2008 18:03:56 GMT
Hi Dan,

I tried debugging and verified that HolderOutInterceptor is getting
called. But it is setting the value of holders as null.

Inside HolderOutInterceptor, the code is as follows:

if (o instanceof Holder) {
                    outObjects.set(x, ((Holder)o).value);
                } else {
                    holders.set(x, null);
                }
 
In my code sample, 'o' is an instance of SyncFolderItemsType which
somehow fails to be an instance of Holder. Therefore, else statement
gets executed and holder is set to null.

Any idea what can I do? Is there any specific annotation I need to set
up on the SyncFolderItemsType class?

Thanks a lot,
Taru

Taru Bazaj
Morgan Stanley | Technology
Taru.Bazaj@MorganStanley.com

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: 09 October 2008 02:42
To: users@cxf.apache.org
Subject: Re: CXF Generating Incorrect Namespaces in the Soap Requests


Questions:

Can you debug the sending side to see if the HolderOutInterceptor is
being called?  That SHOULD be setting the CLIENT_HOLDERS object.

Dan




On Wednesday 08 October 2008 2:58:28 pm Bazaj, Taru (IT) wrote:
> Hi Daniel,
>
> I see what you mean. I was using a different factory bean which was 
> not reading from the annotations. Now, I shifted  to using 
> JaxWsProxyFactoryBean class and its working. Thanks a lot!
>
> However, now there is a new problem. When I run under the debug mode, 
> I can see the correct response present in the message, which I am 
> receiving from the server. But somehow in the interceptor 
> 'HolderInInterceptor' its throwing up nullPointerException. What is 
> happening inside this interceptor is that its trying to read
>
> List<Holder> outHolders = CastUtils.cast((List)message.getExchange()
>                 .getOutMessage().get(CLIENT_HOLDERS));
>             for (MessagePartInfo part : parts) {
>                 if (part.getIndex() != 0 && part.getTypeClass() != 
> null) {
>                     Holder holder =
> (Holder)outHolders.get(part.getIndex() - 1);
>                     holder.value = inObjects.get(part);
>                     inObjects.put(part, holder);
>                 }
>
> 'outHolders' is getting assigned a null value. I don't know how to get

> rid of this error.
>
> Any help will be great!
>
> Thanks,
> Taru Bazaj
> Morgan Stanley | Technology
> Taru.Bazaj@MorganStanley.com
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: 08 October 2008 22:35
> To: users@cxf.apache.org
> Cc: Bazaj, Taru (IT)
> Subject: Re: CXF Generating Incorrect Namespaces in the Soap Requests
>
>
> Taru,
>
> How are you creating the client?   Are you using the generated Service
> objects or a factory bean?  If a factory, which one?
>
> Dan
>
> On Wednesday 08 October 2008, Bazaj, Taru (IT) wrote:
> > Hi,
> >
> > I have a web service in .asmx. I have created a java client to talk 
> > to
> >
> > this service using cxf from the wsdl exposed by the .net service.
> >
> > The isssue I am facing is that in the soap request the java client 
> > generates, the namespaces are incorrect. I have used the annotation 
> > @WebService(targetNamespace = 
> > http://schemas.microsoft.com/exchange/services/2006/messages
> > <http://schemas.microsoft.com/exchange/services/2006/messages> ) to 
> > set the correct namespace but still some how this is not getting 
> > picked while generating the SOAP request. Instead, it picks up the 
> > name of the package of the class in the reverse order. Like the 
> > package name is 
> > "messages._2006.services.exchange.com.microsoft.schemas" so the 
> > namespace which gets included in the SOAP request is 
> > "http://schemas.microsoft.com.exchange.services._2006.messages/"
> >
> > If anyone has faced a similar issue or can think of anything to 
> > solve this problem please get back to me.
> >
> > Any help is much appreciated.
> >
> > Thanks,
> > Taru Bazaj
> > Morgan Stanley | Technology
> > Taru.Bazaj@MorganStanley.com
> > --------------------------------------------------------
> >
> > NOTICE: If received in error, please destroy and notify sender. 
> > Sender
> >
> > does not intend to waive confidentiality or privilege. Use of this 
> > email is prohibited when received in error.
>
> --
> J. Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender

> does not intend to waive confidentiality or privilege. Use of this 
> email is prohibited when received in error.



--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

Mime
View raw message