Modify webservice Envelope

Moderator: crythias

Post Reply
skila
Znuny newbie
Posts: 4
Joined: 30 Apr 2015, 14:38
Znuny Version: 3.3.12
Real Name: Carlo Schilardi
Company: HP

Modify webservice Envelope

Post by skila »

Hi all
I am having an issue sending a Web Service to a remote system.
I have tried just about every configuration I could find on the GUI (the SOAP.pm and the Invoker files) but with unsuccessfull.
The issue is that into the body we have to add more tag-fields as the following red-bold code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:namesp2="http://servicecenter.peregrine.com/namesp2" xmlns:com="http://servicecenter.peregrine.com/namesp2/Common">
<soapenv:Body>
<namesp2:CreateIncidentRequest xmlns:ns="http://servicecenter.peregrine.com/namesp2/Common">
<model>
<keys/>
<instance>

<Description>Descrizione</Description>
<Category>incident</Category>
<Urgency>1 low</Urgency>
<AssignmentGroup>Network BA</AssignmentGroup>
<subcategory>Application </subcategory>
<product.type>Sistema </product.type>
<res.anal.code>243</res.anal.code>
<Title>OTRS- Ticket di test</Title>
<status>open</status>
<Impact>1 low</Impact>
<Service>Collaudo</Service>
<Contact>OTRS</Contact>
<TicketOwner>otrs</TicketOwner>
<Company>MCTC</Company>
</instance>
</model>

</namesp2:CreateIncidentRequest>
</soapenv:Body>
</soapenv:Envelope>
Can someone please help us?

Carlo
OTRS 3.3.12 ITSM, FAQ, Win2012, Apache2+MysQL 5
eandrex
Znuny expert
Posts: 213
Joined: 04 Nov 2012, 23:58
Znuny Version: OTRS 4.x
Real Name: Esteban
Company: NORTON DE COLOMBIA

Re: Modify webservice Envelope

Post by eandrex »

at the end of your "PrepareRequest" method, did you try the "following"?

Code: Select all

return {
 Success => 1,
 Data => {
  model => {
   instance => {
     Urgency => '1 low',
     Category => 'incident',
     Title => 'OTRS Ticket',
     #And so on..
   },
  },
 },
};
   
	
skila
Znuny newbie
Posts: 4
Joined: 30 Apr 2015, 14:38
Znuny Version: 3.3.12
Real Name: Carlo Schilardi
Company: HP

[SOLVED ]Re: Modify webservice Envelope

Post by skila »

It works!!! :D

Thanks!
OTRS 3.3.12 ITSM, FAQ, Win2012, Apache2+MysQL 5
Post Reply