Lindsey,
First issue: You've imported your schema namespace incorrectly. You
can't use the <wsdl:import> to import a schema. You must use
<xs:import> instead. <xsd:import> must appear within the <xs:schema>
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:
<service name="search" provider="java:RPC" style="wrapped" use="literal">
Third issue: Remove the "namespace" attribute from your <soap:body>
and <soap:fault> definitions. (The namespace attribute should be used
only with style="rpc".) They should be defined thus:
<soap:body use="literal">
and
<soap:fault name="[name]" use="literal">
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 <[EMAIL PROTECTED]> 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:
<service name="search" provider="java:RPC" style="document" use="literal">
Thank you!
Lindsey
Anne Thomas Manes <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
________________________________
Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
--0-1514824370-1171307635=:47831--
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]