OTRS 3.1. Using the GenericInterface to push SOAP messages

Moderator: crythias

Post Reply
pitchblack408
Znuny newbie
Posts: 21
Joined: 27 May 2011, 00:14
Znuny Version: 3.0.7
Real Name: Michael A Martin

OTRS 3.1. Using the GenericInterface to push SOAP messages

Post by pitchblack408 »

Hello,

I have recently installed OTRS 3.1.1 and I wish to test the web service capability out. But I am experiencing some problems configuring this.
How do I configure the generic interface to push info out to another system. I see that I am suppose to setup service requester.


Name:Pushout

Remote System: [IPaddress of the host I am going to push to]

OTRS as Service Provider is left blank

OTRS as Service Requester
Network Transport: HTTP::SOAP

Then I click save

I then go back to
OTRS as Service Requester
I click on configure

I believe end point ask for the uri of the web service and this is what I put
* Endpoint: https://IPaddress/ws/soap/core/CallService

I am unsure what the Namespace is suppose to be. But I loaded the wsdl uri in soap ui and in the SOAP structure I get:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:brok="urn:ws.solvedirect.com/broker">
So, I then place
Namespace: urn:ws.solvedirect.com/broker

Encoding is left blank
SOAPAction separator:#

* User:23456
* Password:1234

After that all is configuration but what do I do next? There are no clear directions. Do you have a guide out there? If I have to code in pearl that is fine, but where do I start?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1. Using the GenericInterface to push SOAP messag

Post by jojo »

you need to develop a connector first
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pitchblack408
Znuny newbie
Posts: 21
Joined: 27 May 2011, 00:14
Znuny Version: 3.0.7
Real Name: Michael A Martin

Re: OTRS 3.1. Using the GenericInterface to push SOAP messag

Post by pitchblack408 »

Are there any instructions on how to develop a connector?
pitchblack408
Znuny newbie
Posts: 21
Joined: 27 May 2011, 00:14
Znuny Version: 3.0.7
Real Name: Michael A Martin

Re: OTRS 3.1. Using the GenericInterface to push SOAP messag

Post by pitchblack408 »

I found out why I couldn't see an invoker. I had to go to the sysconfig and import the invoker Test and TestSimple. TestSimple seems to be the one to pick because it doesn't do any checks. After I selected the new invoker, I feel in the invoker details.

* Name:putCall

The name is typically used to call up an operation of a remote web service.
Invoker backend:Test:TestSimple

This OTRS invoker backend module will be called to prepare the data to be sent to the remote system, and to process its response data.
Mapping for outgoing request data:Simple

The data from the invoker of OTRS will be processed by this mapping, to transform it to the kind of data the remote system expects.
Mapping for incoming response data:Simple
I don't understand how to use the mapping, so I leave it as is.

The response data will be processed by this mapping, to transform it to the kind of data the invoker of OTRS expects.
Event Triggers:TicketQueueUpdate
Asynchronous

I then test this out and in the debugger I see the response:
Xml data received from remote system(2012-03-19 12:48:31, debug)
S:ServerRequest did not contain a valid CallData tagRequest did not contain a valid CallData tag

I also see in the debugger:
Xml data sent to remote system(2012-03-19 12:48:31, debug)
5764n22012-03-19 11:51:13213321779652012-03-19 10:26:054unlock1mmartin23 normal3Network (OCN - Osato Chem Network)::Escalate to Gerneral Services Co9root@localhost1open4open22012031910000016Incident22

The xml that was sent isn't even xml, so what am I doing wrong? Where do I go from here?
pitchblack408
Znuny newbie
Posts: 21
Joined: 27 May 2011, 00:14
Znuny Version: 3.0.7
Real Name: Michael A Martin

Re: OTRS 3.1. Using the GenericInterface to push SOAP messag

Post by pitchblack408 »

I found a way. I installed tcpdump on the otrs server and then I fired the trigger that causes the message to be sent out. Then I took the dump and used wireshark to look at lines with http/xml for the protocal. I then found the outbound transaction. After I looked at the transaction, I can see that the output being sent has the otrs tags and I now know the values for those tags. I can also see that the root tag will not be accepted by the other application because the root tag needs to be CallData. So, I then logged in otrs and go to the admin->web service->my webservice->click on the invoker->Make sure simple is selected for Mapping for outgoing request data->click on configure for Mapping for outgoing request data. I then add new key to map and the key "OldTicketData" is mapped to "CallData". After I do this I save and then retry to send the message out. I received a success message and I see the message in the other system.
pitchblack408
Znuny newbie
Posts: 21
Joined: 27 May 2011, 00:14
Znuny Version: 3.0.7
Real Name: Michael A Martin

Re: OTRS 3.1. Using the GenericInterface to push SOAP messag

Post by pitchblack408 »

I just realize that the otrs web service debugger isn't working correctly because in the pane where it states xml data sent to remote system, I would expect to see the soap message with the xml data or just the xml data. Instead I see a lines that are useless:

Xml data sent to remote system(2012-03-19 12:48:31, debug)
5764n22012-03-19 11:51:13213321779652012-03-19 10:26:054unlock1mmartin23 normal3Network (OCN - Osato Chem Network)::Escalate to Gerneral Services Co9root@localhost1open4open22012031910000016Incident22
Post Reply