Problems deserializing EOGenericRecords via WebServices
Problems deserializing EOGenericRecords via WebServices
- Subject: Problems deserializing EOGenericRecords via WebServices
- From: Riccardo De Menna <email@hidden>
- Date: Mon, 17 Oct 2005 16:17:58 +0200
Hi all,
I was wondering if someone could help me shed some light on a problem
that has locked me for a while. Let me first say I'm no expert on the
subject and I'm a bit lost as I can't find any viable documentation
to help me out.
I'm working on a client/server webservice app that needs to pass back
and forth various EOEnterpriseObjects. For what I've understood, WO
should be able to serialize and deserialize them out of the box. But
I keep getting an error that I don't seem to understand. Everything
else (Strings, Arrays etc) works fine... but as soon as I simply
define a method that returns a EOEnterpriseObject descendant I get:
javax.xml.rpc.ServiceException: Error processing WSDL document:
java.io.IOException: Type EOEnterpriseObject is referenced but not
defined.
Reason: Error processing WSDL document: java.io.IOException: Type
EOEnterpriseObject is referenced but not defined.
at org.apache.axis.client.Service.initService(Service.java:278)
at org.apache.axis.client.Service.<init>(Service.java:193)
at org.apache.axis.client.ServiceFactory.createService
(ServiceFactory.java:232)
at com.webobjects.webservices.client.WOWebService.axisService
(WOWebService.java:185)
at
com.webobjects.webservices.client.WOWebService.createCallForOperation
(WOWebService.java:235)
at com.webobjects.webservices.client.WOWebServiceClient.invoke
(WOWebServiceClient.java:482)
at CalculatorClient.invoke(CalculatorClient.java:51)
at Main.calculate(Main.java:46)
...
...
...
As an example, my server app has a method like the following in the
WS registered class (forgive my lack of imagination :) :
public EOGenericRecord test() {
return new EOGenericRecord();
}
If my client application uses something like
operationsDictionaryForService to fetch the possible operations,
everything ok. I get the list of possible operations and also the EO
based return types are showed. As soon as I use any kind of 'invoke'
on any operation of the server (I mean even if I invoke one of the
previously working string based methods and NOT the one that returns
the EO), I get the exception.
The server app doesn't apparently have any problem and the wsdl
document is regularly generated. The client though seems to have
problems with EOEnterpriseObjects.
How come? Have I missed something I had to do? Following this message
I've attached the full wsdl document I get by manually calling it
with a browser. It's basically what you get from the Calculator and
CalculatorClient Examples from the WO distribution, with the added
test method.
Kind regards,
Riccardo De Menna
<?xml version="1.0"?>
<wsdl:definitions targetNamespace="http://magG5.local:55557/cgi-bin/
WebObjects/Calculator.woa/ws/Calculator" xmlns="http://
schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/
xml-soap" xmlns:impl="http://magG5.local:55557/cgi-bin/WebObjects/
Calculator.woa/ws/Calculator" xmlns:intf="http://magG5.local:55557/
cgi-bin/WebObjects/Calculator.woa/ws/Calculator"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://eocontrol.webobjects.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/
wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema"><wsdl:types><schema targetNamespace="http://xml.apache.org/
xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"><import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType
name="Map"><sequence><element maxOccurs="unbounded" minOccurs="0"
name="item"><complexType><all><element name="key" type="xsd:anyType"/
><element name="value" type="xsd:anyType"/></all></complexType></
element></sequence></complexType></schema><schema
targetNamespace="http://eocontrol.webobjects.com" xmlns="http://
www.w3.org/2001/XMLSchema"><import namespace="http://
schemas.xmlsoap.org/soap/encoding/"/><complexType
name="EOGenericRecord"><complexContent><extension
base="tns1:EOEnterpriseObject"><sequence/></extension></
complexContent></complexType></schema></wsdl:types>
<wsdl:message name="addResponse">
<wsdl:part name="addReturn" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="divideResponse">
<wsdl:part name="divideReturn" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="subtractResponse">
<wsdl:part name="subtractReturn" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="divideRequest">
<wsdl:part name="dividend" type="xsd:double"/>
<wsdl:part name="divisor" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="multiplyRequest">
<wsdl:part name="multiplicand1" type="xsd:double"/>
<wsdl:part name="multiplicand2" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="subtractRequest">
<wsdl:part name="minuend" type="xsd:double"/>
<wsdl:part name="subtrahend" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="testResponse">
<wsdl:part name="testReturn" type="tns2:EOGenericRecord"/>
</wsdl:message>
<wsdl:message name="addRequest">
<wsdl:part name="addend1" type="xsd:double"/>
<wsdl:part name="addend2" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="multiplyResponse">
<wsdl:part name="multiplyReturn" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="testRequest">
</wsdl:message>
<wsdl:portType name="Calculator">
<wsdl:operation name="add" parameterOrder="addend1 addend2">
<wsdl:input message="impl:addRequest" name="addRequest"/>
<wsdl:output message="impl:addResponse"
name="addResponse"/>
</wsdl:operation>
<wsdl:operation name="subtract" parameterOrder="minuend
subtrahend">
<wsdl:input message="impl:subtractRequest"
name="subtractRequest"/>
<wsdl:output message="impl:subtractResponse"
name="subtractResponse"/>
</wsdl:operation>
<wsdl:operation name="multiply"
parameterOrder="multiplicand1 multiplicand2">
<wsdl:input message="impl:multiplyRequest"
name="multiplyRequest"/>
<wsdl:output message="impl:multiplyResponse"
name="multiplyResponse"/>
</wsdl:operation>
<wsdl:operation name="divide" parameterOrder="dividend
divisor">
<wsdl:input message="impl:divideRequest"
name="divideRequest"/>
<wsdl:output message="impl:divideResponse"
name="divideResponse"/>
</wsdl:operation>
<wsdl:operation name="test">
<wsdl:input message="impl:testRequest" name="testRequest"/>
<wsdl:output message="impl:testResponse"
name="testResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CalculatorSoapBinding" type="impl:Calculator">
<wsdlsoap:binding style="rpc" transport="http://
schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="add">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="addRequest">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="addResponse">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://magG5.local:
55557/cgi-bin/WebObjects/Calculator.woa/ws/Calculator" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="subtract">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="subtractRequest">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="subtractResponse">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://magG5.local:
55557/cgi-bin/WebObjects/Calculator.woa/ws/Calculator" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="multiply">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="multiplyRequest">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="multiplyResponse">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://magG5.local:
55557/cgi-bin/WebObjects/Calculator.woa/ws/Calculator" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="divide">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="divideRequest">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="divideResponse">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://magG5.local:
55557/cgi-bin/WebObjects/Calculator.woa/ws/Calculator" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="test">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="testRequest">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="testResponse">
<wsdlsoap:body encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://magG5.local:
55557/cgi-bin/WebObjects/Calculator.woa/ws/Calculator" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Calculator">
<wsdl:port binding="impl:CalculatorSoapBinding"
name="Calculator">
<wsdlsoap:address location="http://magG5.local:55557/cgi-
bin/WebObjects/Calculator.woa/ws/Calculator"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden