axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Menahem Elgavi <menah...@xor-t.com>
Subject Unexpected subelement issue when using Axis2 and eclipse
Date Mon, 15 Dec 2008 11:11:12 GMT
Hi All

I`m having a "Unexpected subelement getMetaDataResponse" exception when 
calling my web service. the WS was created from a POJO using the Axis2 
eclipse plugin.
im using Apache Tomcat as my web server.

i followed the code in the generated stub class , and it fails when doing:
if(reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null) 
The condition eval`s to false , and the code just looks on for the "return" , 
while the reader is still on "getMetaDataResponse" .

below is some data i think might help.

Can anyone help ? 
Thanks in advance

Mena


this is the request i captured:
(i dont mind the service returning null)

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns3:getMetaData 
xmlns:ns3="http://ws.collector.pn.xor.com/xsd"><ns3:strIPAddresses 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:nil="1" /></ns3:getMetaData></soapenv:Body></soapenv:Envelope>

This is the response from the web server:

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body><ns:getMetaDataResponse 
xmlns:ns="http://ws.collector.pn.xor.com/xsd" /></soapenv:Body></soapenv:Envelope>

my WSDL looks like this (also created using Axis2, using the eclipse plugin 
wizard.) 

- <wsdl:definitions xmlns:axis2="http://ws.collector.pn.xor.com" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
xmlns:ns0="http://configuration.collector.pn.xor.com/xsd" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
xmlns:ns1="http://ws.collector.pn.xor.com/xsd" 
xmlns:ns2="http://elements.collector.pn.xor.com/xsd" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
targetNamespace="http://ws.collector.pn.xor.com">
  <wsdl:documentation>Please Type your service description 
here</wsdl:documentation> 
- <wsdl:types>
- <xs:schema xmlns:ns="http://ws.collector.pn.xor.com/xsd" 
attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://ws.collector.pn.xor.com/xsd">
- <xs:element name="getMetaData">
- <xs:complexType>
- <xs:sequence>
  <xs:element maxOccurs="unbounded" name="strIPAddresses" nillable="true" 
type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:element name="getMetaDataResponse">
- <xs:complexType>
- <xs:sequence>
  <xs:element maxOccurs="unbounded" name="return" nillable="true" 
type="ns2:AgentMetaData" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  <xs:element name="AgentMetaData" type="ax24:AgentMetaData" /> 
- <xs:complexType name="AgentMetaData">
- <xs:sequence>
  <xs:element name="iPAddress" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" name="objData" nillable="true" 
type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="getMetaDataMessage">
  <wsdl:part name="part1" element="ns1:getMetaData" /> 
  </wsdl:message>
- <wsdl:message name="getMetaDataResponse">
  <wsdl:part name="part1" element="ns1:getMetaDataResponse" /> 
  </wsdl:message>
- <wsdl:portType name="CollectorWSPortType">
- <wsdl:operation name="getMetaData">
  <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
message="axis2:getMetaDataMessage" wsaw:Action="urn:getMetaData" /> 
  <wsdl:output message="axis2:getMetaDataResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="CollectorWSSOAP11Binding" 
type="axis2:CollectorWSPortType">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="document" /> 
- <wsdl:operation name="getMetaData">
  <soap:operation soapAction="urn:getMetaData" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="CollectorWSSOAP12Binding" 
type="axis2:CollectorWSPortType">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="document" /> 
- <wsdl:operation name="getMetaData">
  <soap12:operation soapAction="urn:getMetaData" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="CollectorWSHttpBinding" 
type="axis2:CollectorWSPortType">
  <http:binding verb="POST" /> 
- <wsdl:operation name="getMetaData">
  <http:operation location="getMetaData" /> 
- <wsdl:input>
  <mime:content type="text/xml" /> 
  </wsdl:input>
- <wsdl:output>
  <mime:content type="text/xml" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="CollectorWS">
- <wsdl:port name="CollectorWSSOAP11port_http" 
binding="axis2:CollectorWSSOAP11Binding">
  <soap:address 
location="http://127.0.0.1:8080/HPOMCollector/services/CollectorWS" /> 
  </wsdl:port>
- <wsdl:port name="CollectorWSSOAP12port_http" 
binding="axis2:CollectorWSSOAP12Binding">
  <soap12:address 
location="http://127.0.0.1:8080/HPOMCollector/services/CollectorWS" /> 
  </wsdl:port>
- <wsdl:port name="CollectorWSHttpport" 
binding="axis2:CollectorWSHttpBinding">
  <http:address 
location="http://127.0.0.1:8080/HPOMCollector/services/CollectorWS" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

-------------------------------------------------------

Mime
View raw message