Anne,
Thank you! That did the trick J
From: Anne Thomas
Manes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 17, 2006 2:50
PM
To: [email protected]
Subject: Re: Data binding problem
(xmlbeans) - binding subelement to toplevel element?
Andrew,
With RPC style, your message parts must reference types rather than elements
Your WSDL should look something like this:
// TYPES
<complexType name="testSearchRequest">
<sequence>
<element name="testid"
type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
<element
name="testid2" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="testSearchResponse">
<sequence>
<element
name="testid" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
<element
name="testid2" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
</sequence>
</complexType>
// MESSAGES
<message name="testSearchRequest">
<part type="xsd1:testSearchRequest"
name="testSearchRequest"/>
</message>
<message name="testSearchResponse">
<part type="xsd1:testSearchResponse"
name="testSearchResponse"/>
</message>
Anne
On 5/17/06, Andrew
Cohen <[EMAIL PROTECTED]>
wrote:
Apologies in advance if
this is known problem, but I'm hoping the answer to
this is easy...
I can't seem to get passed a data binding problem in my client stub on a
response for a very simple scenario. It appears that the client stub is
trying to bind a subelement of my response ("testid") to the top
level
element ("testSearchResponse").
The error is:
Exception: Data Binding Error caused by:
Caused by: org.apache.xmlbeans.XmlException : error: The document is not a
testSearchResponseParam@http://net.semandex.searchservice.webservice/xsd:
document element local name mismatch expected testSearchResponseParam got
testid
Here is the simple WSDL:
// TYPES
<complexType name="testSearchRequest">
<sequence>
<element
name="testid" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
<element
name="testid2" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="testSearchResponse">
<sequence>
<element
name="testid" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
<element
name="testid2" type="xsd:integer" minOccurs="1"
maxOccurs="1"/>
</sequence>
</complexType>
// MESSAGES
<message name="testSearchRequest">
<part
element="xsd1:testSearchRequestParam"
name="testSearchRequest"/>
</message>
<message name="testSearchResponse">
<part element="xsd1:testSearchResponseParam"
name="testSearchResponse"/>
</message>
// PORTTYPE
<portType name="SearchPortType">
<operation name="testSearch">
<input
message="tns:testSearchRequest"
name="testSearchRequest"/>
<output message="tns:testSearchResponse"
name="testSearchResponse"/>
</operation>
</porttype>
// BINDING
<binding name="SearchPortBinding"
type="tns:SearchPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="testSearch">
<soap:operation
soapAction="testSearch" style="rpc"/>
<input
name="testSearchRequest">
<soap:body
namespace="
http://net.semandex.search.service/Search"
use="literal"/>
</input>
<output
name="testSearchResponse">
<soap:body
namespace="
http://net.semandex.search.service/Search"
use="literal"/>
</output>
</operation>
</binding>
Thanks,
Andrew
|