• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems deserializing EOGenericRecords via WebServices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems deserializing EOGenericRecords via WebServices


  • Subject: Re: Problems deserializing EOGenericRecords via WebServices
  • From: Riccardo De Menna <email@hidden>
  • Date: Wed, 19 Oct 2005 11:44:48 +0200


Following my previous messages, I did try to figure out how the wsdl file is written and among the tests I created a subclass of EOGenericRecord.
The resulting wsdl type declaration shows:


tns1:EOEnterpriseObject
tns3:EOGenericRecord
tns2:MyEOTestObject

But on top of the wsdl file (in the definitions... so I guess that the error 'referred but not defined' was referring to this) I only see two of those:

<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://DefaultNamespace";
xmlns:tns3="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";>


Looks like I miss the xmlns:tns1="http://eocontrol.webobjects.com"; piece of definition. This looks like a bug to me. Is there a workaround to manually add a namespace definition to the WSDL document? Maybe interacting with the AXIS service? Anyone familiar with it?

Kind regards,
Riccardo De Menna


On 18 ott 2005, at 21:22, Riccardo De Menna wrote:
No luck... I did try what pointed out, but the problem does not seem to be in the server's wsdl. I mean... if I remove the test method and build the app, the wsdl lacks the type definition for the EO stuff... in detail:

<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>


If I compile with the 'test' method this fragment finds it's way inside the wsdl. This is also the only place where actually the EOEnterpriseObject is referred as I had only used concrete classes like EOGenericRecord.

I would say that the server has correctly recognized the EO classes and has added some stuff to the wsdl. If that stuff is wrong I can't tell :-(

Would anybody have even the shortest snippet of code in which they pass an EO object between webservices it would help a lot. At lest I could check what I did wrong.

Bye,
Riccardo


On 17 ott 2005, at 21:34, LD wrote:


Hi there,

On 18/10/2005, at 12:17 AM, Riccardo De Menna wrote:



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.createCallForOperatio n(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();
}



Random thoughts/guesses... 1) try the full package/class path: i.e., public com.webobjects.eocontrol.EOGenericRecord test() {...}

2) Would you have any better luck using the other constructor, where you provide the class description. Is that what it means by being undefined perhaps...
return new EOGenericRecord (EOClassDescription.classDescriptionForEntityName("Author"));


3) Make sure the entity type is understood by the client app.

with regards,
--

LD




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
web.com


This email sent to email@hidden



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

References: 
 >Problems deserializing EOGenericRecords via WebServices (From: Riccardo De Menna <email@hidden>)
 >Re: Problems deserializing EOGenericRecords via WebServices (From: LD <email@hidden>)
 >Re: Problems deserializing EOGenericRecords via WebServices (From: Riccardo De Menna <email@hidden>)

  • Prev by Date: Re: Adding to relationships - what method to use?
  • Next by Date: WO and servermgr
  • Previous by thread: Re: Problems deserializing EOGenericRecords via WebServices
  • Next by thread: Database replication and WO
  • Index(es):
    • Date
    • Thread