Forum OpenACS Q&A: Re: Which version of xotcl-soap (xosoap) should I use?

Stefan, how far did you manage to get with document/literal and is there a way to help speed up the process? I have to connect to a framework at http://atena.ios.krakow.pl/efws/ef.asmx?WSDL and though I am at the moment mainly concerned about the production part (and not the consumption one), I need consumption working as well (which is why I wanted to go with xosoap instead of TwiST).

Also, how would you implement the "getProject" glueing in OpenACS if I have a TCL procedure that returns the project_id when called.

Malte,

Also, how would you implement the "getProject" glueing in OpenACS if I have a TCL procedure that returns the project_id when called.

I tried to sketch a ready-to-take sample for you below ... did I get it right when assuming that you want to expose an existing tcl proc through a soap channel?


# / / / / / / / / / / / / / / / / / / / / / / / / / /
# $Id$

# -) prerequisites

namespace eval :some_name_space { proc getProject {input} { # retrieve project_id based on input ... set project_id 1 return $project_id } }

namespace eval ::cognovis { ::xo::db::require package xotcl-request-broker namespace import ::xorb::* # 1-) provide an interface description aka 'service contract' ServiceContract EchoProject -defines { Abstract getProject \ -arguments { input:xsString } -returns returnValue:xsInteger \ -description { A sample echo operation that returns an arbitrary integer value. } } -ad_doc { This is the sample interface description as requested by Malte ... } # 1a-) deploy your interface description EchoProject deploy # 2-) Provide 'servant' code and register it with the invoker: # 'service implementation' ServiceImplementation EchoProjectImpl \ -implements EchoProject \ -using { Delegate getProject \ -for ::some_name_space::getProject \ {Delegates calls to the servant proc indicated ...} } # 3a-) deploy your service implementation EchoProjectImpl deploy }

As for the second issue, i.e. document/literal support for the consumer side:


... how far did you manage to get with document/literal and is there a way to help speed up the process?

I am closing down and started rewriting xosoap allover, I have a somewhat firm deadline for the Jan 24, so, hopefully, till Sunday, there will be something operative (though not completed). Currently I can't think of anything that I can easily delegate to you, but I will think a bit and come back to you ... thanks for the kind offer!

Hi Stefan, thanks a lot and thanks for the answer and the information about the deadline. Jan 24th doesnt look so bad from my point of view 😊.

Now, as for exposing the above statement, where can I access it? I was looking through the documentation and the FAQ for a hint under which URL I would be able to connect to it (and be it only for round trip self test), but I must have overread / overlooked this.

I found /request-broker/admin and see the service is there (horray). And I found /xosoap/services which says "0 services". But that's pretty much as far as I got so far, I somewhat hoped to find the URL where I could say "url?s=WSDL" (which I found in the FAQ).

For the sake of completeness (and the records). I spotted a critical typo in the code sample above that had evaded my eyes:

# 2-) Provide 'servant' code and register it with the invoker:

  # 'service implementation'

  ServiceImplementation EchoProjectImpl \

      -implements EchoProject \

      -using {

	Delegate getProject \

	    -for ::some_name_space::getProject \

	    {Delegates calls to the servant proc indicated ...}

      }

needs to be

# 2-) Provide 'servant' code and register it with the invoker:

  # 'service implementation'

  ServiceImplementation EchoProjectImpl \

      -implements EchoProject \

      -using {

	Delegate getProject \

	    -for ::some_name_space::getProject \

	    -ad_doc { Delegates calls to the servant proc indicated ...}

      }

Note the missing thingy is the "-ad_doc" flag ...