On 22 Apr 2008, at 18:12, Christoph Nagel wrote:
Have anybody a WSDL for the rpc.example?
Hi Christoph,
did you see my earlier mail in this thread? The interface provided by
rpc.pl allow yous to call any otrs method, however it only works
simply with a Perl SOAP::Lite client.
If you want to use one of the many (Java, .net, whatever) SOAP
libraries that will generate client classes for you, you need, as you
say WSDL (which isn't available). Equally importantly, you need the
returned messages to be formatted according to a defined schema to
match that WSDL. Here's a fragment of output from a TicketGet request
using rpc.pl and a SOAP::Lite client (though it doesn't really
matter, the client could be anything).
<soap:Body>
<DispatchResponse xmlns="/Core">
<s-gensym87 xsi:type="xsd:string">TicketID</s-gensym87>
<s-gensym89 xsi:type="xsd:int">33</s-gensym89>
<s-gensym247 xsi:type="xsd:string">TicketNumber</s-
gensym247>
<s-gensym249 xsi:type="xsd:long">2008042210000212</s-
gensym249>
.
.
. etc...
</DispatchResponse>
</soap:Body>
What you really want is something like:
<soap:Body>
<TicketGetByIDResponse xmlns="http://otrs.org/Kernel/
Modules/TicketService">
<Ticket xsi:type="tns:Ticket" xmlns:tns="http://otrs.org/
otrs/Kernel/Modules/TicketService">
<TicketID xsi:type="xsd:int">33</TicketID>
<TicketNumber xsi:type="xsd:long">2008042210000212</
TicketNumber>
.
.
. etc...
</Ticket>
</TicketGetByIDResponse>
</soap:Body>
See the difference? The first example returns an array of results
from the called method. The second has a defined schema.
So, as far as I understand, if you are to have WSDL and autogenerated
client classes to access OTRS, you need to encapsulate the OTRS
classes you require in some additional code and generate your WSDL to
match the returned messages from your new classes. This does not yet
exist.
Of course, if you have a perl client, you can use SOAP::Lite and get
back a blessed hash to do pretty much anything you like.
Does that help?
.... J
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev