How to call SOAP (WSDL URL) using .PM file from OTRS

English! place to talk about development, programming and coding
Post Reply
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

How to call SOAP (WSDL URL) using .PM file from OTRS

Post by williamrobert1983 »

Hi All,

I want pass the parameters to WSDL url from OTRS. I have created one test.pm file under the generic agent folder.
Anyone give some sample code how to use SOAP and call the wsdl url and print using $Self->{LogObject} in otrs.

Example url : http://examlple.com/web/TestService.wsdl

Test.pm
use strict;
use warnings;
use vars qw(@ISA $VERSION);
use lib "/opt/otrs/Kernel/cpan-lib";
use SOAP::Lite;
use Digest::MD5 qw(md5_hex);

Example WSDL :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.yes.my/service/schema">
<soapenv:Header/>
<soapenv:Body>
<sch:SendMessageRequest>
<sch:SendMessageAuth>
<sch:serviceName>?</sch:serviceName>
<sch:partnerId>?</sch:partnerId>
<sch:requestId>?/sch:requestId>
<sch:refId>?</sch:refId>
<sch:partnerHashCode>?</sch:partnerHashCode>
</sch:SendMessageAuth>
</sch:SendMessageRequest>
</soapenv:Body>
</soapenv:Envelope>

Thanks lot,
WIilliam
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: How to call SOAP (WSDL URL) using .PM file from OTRS

Post by williamrobert1983 »

Anybody advice how to use client wsdl url in pm file :(
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to call SOAP (WSDL URL) using .PM file from OTRS

Post by crythias »

The first entry on a generic search pulled up some information that seems relevant.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: How to call SOAP (WSDL URL) using .PM file from OTRS

Post by williamrobert1983 »

Hi crythias,

thanks for reply. can you explain to me clearly?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to call SOAP (WSDL URL) using .PM file from OTRS

Post by crythias »

If you are inquiring as to the clarity at which point you will comprehend the answer as I present it to you, I cannot say.

There isn't anything otrs specific about your request.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply