Thanks Anne! Using elementFormDefault="qualified" did the trick!
Thanks for the informative response, I'm trying to get it all to sink
in ;-) .
I've got two questions please:
1) Considering this example uses the latest axis2 svn on both the
client and server side, is this a bug with xmlbeans data binding, ie,
should I log a jira? Your solutions 2 and 3 gave me the impression
that perhaps its something axis2 should be handling itself assumming
that this use case is indeed valid.
2) Looking at my wsdl I believe that both namespaces should be tns
here, for example:
<element name="findElementoGerenciadoByIdResponse">
<complexType>
<complexContent>
<extension base="tns:ReturnWebBase">
<sequence>
<!-- on Exception there will be no complex object in
the message -->
<element minOccurs="0" maxOccurs="1"
name="ElementoGerenciadoComplexo"
type="tns:ElementoGerenciadoComplexo"/>
</sequence>
</extension>
</complexContent>
</complexType>
</element>
But changing this to my namespace ns2 also works:
<element minOccurs="0" maxOccurs="1"
name="ElementoGerenciadoComplexo"
type="ns2:ElementoGerenciadoComplexo"/>
I'm in doubt what is correct or if it matters in this case.
Thanks!
Robert
http://www.braziloutsource.com/
On 7/6/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
Your response message does not match your schema definition.
- Your schema does not specify elementFormDefault="qualified";
therefore, all local elements must be unqualified.
- Your response message defines a default namespace; therefore, all
non-explicitly qualified elements are qualified by the default
namespace.
You have a number of options:
1. Add elementFormDefault="qualified" to your schema (best option).
2. Don't change the schema, but specify an explicit namespace in your
response message rather than a default namespace, e.g.:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns:findElementoGerenciadoByIdResponse xmlns:ns="http://swaMaragatoNS/types">
<errorMessage>FRAMEX_ENTITY_NOTFOUND:
Entidade do tipo class
br.com.atlantico.maragato.nucleogerencia.model.ElementoGerenciadoTO
com id 9.999 não pode ser
achada</errorMessage>
<successErrorCode>-1</successErrorCode>
</ns:findElementoGerenciadoByIdResponse>
</soapenv:Body>
</soapenv:Envelope>
2. Don't change the schema, and don't specify an explicit namespace in
your response message, but override the default namespace in the local
elements, e.g.:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<findElementoGerenciadoByIdResponse xmlns:ns="http://swaMaragatoNS/types">
<errorMessage xmlns="">FRAMEX_ENTITY_NOTFOUND:
Entidade do tipo class
br.com.atlantico.maragato.nucleogerencia.model.ElementoGerenciadoTO
com id 9.999 não pode ser
achada</errorMessage>
<successErrorCode xmlns="">-1</successErrorCode>
</ns:findElementoGerenciadoByIdResponse>
</soapenv:Body>
</soapenv:Envelope>
Anne
On 7/6/06, robert lazarski <[EMAIL PROTECTED]> wrote:
> I've agot a wsdl that's giving me some problems, can someone give a
> look at it for me? It seems to validate using eclipse's validator.
>
> I have two namespaces that I'm having a hard time with - tns and ns2 .
> When validating a response on the client side, I'm getting:
>
> Error Message: Expected element 'errorMessage' instead of
> '[EMAIL PROTECTED]://swaMaragatoNS/types' here in element
> [EMAIL PROTECTED]://swaMaragatoNS/types
>
> Location of invalid XML: <errorMessage
> xmlns="http://swaMaragatoNS/types"
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">FRAMEX_ENTITY_NOTFOUND:
> Entidade do tipo class
> br.com.atlantico.maragato.nucleogerencia.model.ElementoGerenciadoTO
> com id 9.999 não pode ser achada</errorMessage>
>
> Here's the soap message the client is getting:
>
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
> /><soapenv:Body><findElementoGerenciadoByIdResponse
> xmlns="http://swaMaragatoNS/types"><errorMessage>FRAMEX_ENTITY_NOTFOUND:
> Entidade do tipo class
> br.com.atlantico.maragato.nucleogerencia.model.ElementoGerenciadoTO
> com id 9.999 não pode ser
>
achada</errorMessage><successErrorCode>-1</successErrorCode></findElementoGerenciadoByIdResponse></soapenv:Body></soapenv:Envelope>
>
> My wsdl is attached. Please help!
> Robert
> http://www.braziloutsource.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]