a journal of a researcher

Thursday, July 22, 2004

Put RDF into SOAP messages

The following problem is discussed with Michael Sintek today. Here is my understanding and some experiements on it.

If you need RDF embedded in SOAP, I have some ideas for AXIS:
1)      Use “message” type services. You can use objects in Element type as the parameters to invoke the services and get Element type back. Then you can create CDATA as children for Element object. In CDATA, you can define any format of xml. (ref. the “message services” in AXIS manual)

2)      Pass as JavaBean. You can define your own beans. The beans are serialized by BeanSerializeFactory. The SOAP message has tags for the attributes and values of the object. E.g. the sample/userguide/sample5 has a SOAP like following to pass Order. (XML has problem to be included in blog) 

3)      Define your own serializer. It is quite similar to what Bean serializer can do, but in a more controllable way. See the samples/encoding. You can define your own data type

4)      As attachment. AXIS uses MIME Stream for attachments (e.g. activation.jar and mail.jar). The SOAP message has the stream id. Attachments are not inside SOAP message.

I think only 1) and 4) are the choices.



2 Comments:

  • Let me explain the problem. You have RDF, which is XML formated. You want to exchange RDF using SOAP. I think the semantic web people have a lot of need for this. The simple answer is Put RDF in the SOAP body. But how to interprete the SOAP message so that we can get the RDF from it? It depends on the implementation of the SOAP. For AXIS, I gave the solutions. Some of them do not put the RDF in the SOAP body, like using attachments.

    The more general question is how to use Web Services for distributed system, so that we can pass arbitary objects for distributed applications. The Web Services solution is to use WSDL, which is exactly like IDL. I will write another post to explain this.

    By Blogger flydragon, at 11:26 AM  

  • I also have a need for this solution. I want to send RDF file as a payload of SOAP message but i don't have an idea how to set WSDL file for my Web Service. I made RESTfull WS implementation, with Provider and Dispatch interface, that runs on Glassfish server.

    By Anonymous Anonymous, at 2:57 AM  

Post a Comment

<< Home