Hey Jonathan,

I have implemented an axis Client which sends the following SOAP message!
It's like the same such as the rpc example SOAP message for
TicketCreateNumber.

I can send the message but I get this failure "Transport error: 411 Error:
Length Required"

Have you any idea what can be wrong?

<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/";
standalone="no"?> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Body>
<TicketCreateNumber xmlns="Kernel::System::Ticket">
<c-gensym4>Password</c-gensym4> <c-gensym6>User</c-gensym6>
<c-gensym8>TicketObject</c-gensym8>
<c-gensym10>TicketCreateNumber</c-gensym10>
</TicketCreateNumber>
</soapenv:Body>
</soapenv:Envelope>

Thanks for the help

Christoph

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von
jonathan sartin
Gesendet: Mittwoch, 23. April 2008 00:28
An: Development community of OTRS.org
Betreff: Re: AW: [dev] Java WebServiceClient for OTRS


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

_______________________________________________
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

Reply via email to