axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lindsey Hess <lindseyhes...@yahoo.com>
Subject Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize
Date Wed, 14 Feb 2007 01:52:36 GMT
I got around the previous exception by defining bean mappings for all complex types.  Now I
get the following exception:

   "Invalid element in SearchResponseType - metadata"

  I have a bean mapping set up for "metadata", which is a complex type.  So,
I'm not sure what's going on.  Has anyone seen this before?
   
  Lindsey

Anne Thomas Manes <atmanes@gmail.com> wrote:
  You need to define bean mappings for all complex types.

On 2/12/07, Lindsey Hess 
wrote:
> Thank you. Perhaps I'm getting further along. I tried the code that you
> said is appropriate, and I now get the following exception:
>
> "org.xml.sax.SAXException: Deserializing parameter 'id': could not find
> deserializer for type {urn:ifis-wsdl}SearchResponseType"
>
> Do you have any ideas, Anne?
>
> Thank you,
>
> Lindsey
>
> Anne Thomas Manes wrote:
> That would be appropriate.
>
> On 2/12/07, Lindsey Hess wrote:
> > Thanks, Anne. I will try your suggestions. Is it necessary to set the
> > resultType for my my call? Should I do something like this:
> >
> > QName qnSearchResponse=new QName("urn:ifis-wsdl", "SearchResponseType");
> > callSearch.setReturnType(qnSearchResponse);
> >
> > Or is that wrong or unncessary?
> >
> > Anne Thomas Manes wrote:
> > Lindsey,
> >
> > First issue: You've imported your schema namespace incorrectly. You
> > can't use the to import a schema. You must use
> > instead. must appear within the
> > definition.
> >
> > Second issue: Based on your current WSDL, your method signature looks like
> > this:
> >
> > searchResponse search(searchRequest);
> >
> > If you want your method signature to accept and return parameters
> > rather than value objects, then you must define the WSDL using the
> > "wrapped" convention (see [1]), and in your WSDD you should define the
> > service thus:
> >
> >
> >
> > Third issue: Remove the "namespace" attribute from your
> > and definitions. (The namespace attribute should be used
> > only with style="rpc".) They should be defined thus:
> >
> >
> > and
> >
> >
> > I've also seen a recurring problem with schemas that have a namespace
> > URI that ends with "#". If you fix the issues above and still have
> > this problem, I suggest your try removing the "#" from the namespace.
> >
> > Anne
> >
> > On 2/12/07, Lindsey Hess wrote:
> > > Hi Anne,
> > >
> > > Attached is the WSDL.
> > >
> > > From my client code, I'm doing this:
> > >
> > > Object[] opParamsSearch=(new PostiveInteger(m_Timeout), queryType);
> > > //queryType is a complex type
> > >
> > > SearchResponseType searchResponse;
> > > try{
> > >
> > >
> >
> searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
> > > }catch(Exception e)
> > > {
> > > e.printStackTrace();
> > > }
> > >
> > >
> > > It may not be apparent from the WSDL, but SearchResponseType returns an
> id
> > > and a result of type ResultType. ResultType is a complex type. It
> contains
> > > a number of required parameters, included a complex type called
> metadata.
> > > Metadata is essentially an array. So, every search response will contain
> > an
> > > id, results, and an array of metadata.
> > >
> > > I should note that in my server-config.wsdd file I have all of the
> > necessary
> > > serializes/deserializers listed (WSDL2Java created them). I'm also
> > defining
> > > my service as follows:
> > >
> > >
> > >
> > > Thank you!
> > >
> > > Lindsey
> > >
> > > Anne Thomas Manes wrote:
> > > Can you post the WSDL please?
> > >
> > > On 2/12/07, Lindsey Hess wrote:
> > > > Hi,
> > > >
> > > > I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas,
> > and
> > > > generated a number of classes. My WSDL contains a number of complex
> > types.
> > > >
> > > > When I invoke a web service from some client code, I get the following
> > > > exception:
> > > >
> > > > "simpledeserializer encountered a child element, which is NOT
> expected,
> > in
> > > > something it was trying to deserialize"
> > > >
> > > > I don't understand why I'm getting this, as I'm setting the required
> > > > parameters in my server code as specified in my WSDL. Does anyone have
> > any
> > > > suggestions?
> > > >
> > > > Thank you,
> > > >
> > > > Lindsey
> > > >
> > > > ________________________________
> > > > Everyone is raving about the all-new Yahoo! Mail beta.
> > > >
> > > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > >
> > >
> > > ________________________________
> > > Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
> > > --0-1514824370-1171307635=:47831--
> > >
> > >
> > >
> >
> >
> >
> > ________________________________
> > Get your own web address.
> > Have a HUGE year through Yahoo! Small Business.
> >
> >
>
>
>
> ________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
>


 
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
Mime
View raw message