RockyMyx / as3webservice

Automatically exported from code.google.com/p/as3webservice
0 stars 1 forks source link

NULL pointer exception when return type is an XML document #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a SOAP service with return type XML (We're using ASP.NET webservices)
2. Call this function in a standard way.

What is the expected output? What do you see instead?

 The expected output would be the XML document or string representation.
What we actually see is a NULL pointer exception.

What version of the product are you using? On what operating system?

 From SVN as of 18/01/2008 (Rev: 5)

Please provide any additional information below.

 After inspecting the WSDL I can see that the expected return type is 'any'
which I suspect is not accounted for in the parsing logic. It could be that
returning an XML document is not a standard for SOAP?

Original issue reported on code.google.com by liamlo...@gmail.com on 18 Jan 2008 at 5:06

GoogleCodeExporter commented 9 years ago
When expecting an XML return type the following exception is generated:

ERROR: Webservice returned faulty XML TypeError: Error #1010: A term is 
undefined and
has no properties.
    at be.wellconsidered.services.webservice::WebServiceResponse/createResponseObject()
    at be.wellconsidered.services.webservice::WebServiceResponse()
    at be.wellconsidered.services::Operation/onServiceLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
TypeError: Error #1010: A term is undefined and has no properties.

Original comment by rfo...@gmail.com on 19 Aug 2008 at 1:42

GoogleCodeExporter commented 9 years ago
I have exactly the same problem!

Original comment by cold.bev...@gmail.com on 9 Sep 2008 at 12:24

GoogleCodeExporter commented 9 years ago
idem !

Original comment by thomas...@laposte.net on 1 Dec 2008 at 10:51

GoogleCodeExporter commented 9 years ago
I have the same problem!

but I think it is service part not has "*.dtd" file

Original comment by ado...@qq.com on 16 Jan 2009 at 12:49

GoogleCodeExporter commented 9 years ago
my service xml:

  <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="http://ws.snsoft.com" 
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" 
xmlns:tns="http://ws.snsoft.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://ws.snsoft.com">
- <xsd:element name="sub">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="in0" type="xsd:int" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in1" type="xsd:int" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
- <xsd:element name="subResponse">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:int" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
- <xsd:element name="add">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="in0" type="xsd:int" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in1" type="xsd:int" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
- <xsd:element name="addResponse">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:int" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="subRequest">
  <wsdl:part name="parameters" element="tns:sub" /> 
  </wsdl:message>
- <wsdl:message name="addRequest">
  <wsdl:part name="parameters" element="tns:add" /> 
  </wsdl:message>
- <wsdl:message name="addResponse">
  <wsdl:part name="parameters" element="tns:addResponse" /> 
  </wsdl:message>
- <wsdl:message name="subResponse">
  <wsdl:part name="parameters" element="tns:subResponse" /> 
  </wsdl:message>
- <wsdl:portType name="IMathServicePortType">
- <wsdl:operation name="sub">
  <wsdl:input name="subRequest" message="tns:subRequest" /> 
  <wsdl:output name="subResponse" message="tns:subResponse" /> 
  </wsdl:operation>
- <wsdl:operation name="add">
  <wsdl:input name="addRequest" message="tns:addRequest" /> 
  <wsdl:output name="addResponse" message="tns:addResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="IMathServiceHttpBinding" type="tns:IMathServicePortType">
  <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="sub">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="subRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="subResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="add">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="addRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="addResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="IMathService">
- <wsdl:port name="IMathServiceHttpPort" binding="tns:IMathServiceHttpBinding">
  <wsdlsoap:address 
location="http://127.0.0.1:7080/XfireSpring/services/IMathService" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

fault any where ?

Original comment by ado...@qq.com on 16 Jan 2009 at 2:38

GoogleCodeExporter commented 9 years ago
I've encountered the same issue, but it's not with XML objects.  My issue is 
with any
sequence (arrays, vectors, et cetera) within a class object being passed to a 
Web
method.  Of two of my custom classes, one will work when passed to a Web method 
of
mine while the other custom class will not.  The working class is comprised of 
only
ints and Strings.  The faulty class has three attributes: an int, a String, and 
an
Array, respectively.  I've noticed WebServiceCall.createReference() is called 
three
times, and fails on the third time, as can be seen below in my call stack.

TypeError: Error #1010: A term is undefined and has no properties.
    at be.wellconsidered.services.webservice::WebServiceCall/createReference()
    at be.wellconsidered.services.webservice::WebServiceCall/createReference()
    at be.wellconsidered.services.webservice::WebServiceCall/createReference()
    at be.wellconsidered.services.webservice::WebServiceCall/createSoapCall()
    at be.wellconsidered.services.webservice::WebServiceCall()
    at be.wellconsidered.services::Operation/loadMethod()
    at be.wellconsidered.services::WebService/executeQeuedOperations()
    at be.wellconsidered.services::WebService/onDescrExtractComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at be.wellconsidered.services.webservice::WebServiceMethodCollection/extract()
    at be.wellconsidered.services::WebService/onDescrLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

Original comment by jonathan...@gmail.com on 20 Feb 2009 at 7:09