axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cohen" <and...@semandex.net>
Subject Data binding problem (xmlbeans) - binding subelement to toplevel element?
Date Wed, 17 May 2006 15:14:50 GMT
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





Mime
View raw message