1 Replies - 3279 Views - Last Post: 12 September 2014 - 12:45 AM

#1 hellhound  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 114
  • Joined: 07-March 09

connection to soap server

Posted 27 April 2014 - 05:41 PM

Hi all,

I have been asked to create a connection to a server using soap 1.1 or 1.2 or http.

I am just starting to use Perl and have created a few basic clients to connect to the servers used here but so far have not been able to work out how that relates to what I am trying to do.

Below is the documention given to me from the people who wrote the server but I have not been able to get a hold of them since.

 SOAP 1.1 
HTTP/1.1 200 OK 
Content-Type: text/xml; charset=utf-8 
Content-Length: length 
 
<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
 <soap:Body> 
 <getCardInfoResponse xmlns="http://www.designa.de/"> 
 <getCardInfoResult> 
 <AmountPayed>int</AmountPayed> 
 <AmountDue>int</AmountDue> 
 <AmountDueCurrency>decimal</AmountDueCurrency> 
 <AmountDuePeriodStart>dateTime</AmountDuePeriodStart> 
 <AmountDuePeriodEnd>dateTime</AmountDuePeriodEnd> 
 <CardUID>guid</CardUID> 
 <ISONumber>string</ISONumber> 
 <CardType>int</CardType> 
 <CarparkUID>guid</CarparkUID> 
 <CarparkNr>int</CarparkNr> 
 <CodingTime>dateTime</CodingTime>  
 <LastTccNumber>int</LastTccNumber> 
 <LastTccTime>dateTime</LastTccTime> 
 <NumberOfPayments>int</NumberOfPayments> 
 <GracePeriod>int</GracePeriod> 
 <VAT>int</VAT> 
 <MoneyConversionFactor>decimal</MoneyConversionFactor> 
 <Currency>string</Currency> 
 <Cheater>boolean</Cheater> 
 <RabattInfo> 
 <Wert>int</Wert> 
 <Zeit>int</Zeit> 
 <Promille>int</Promille> 
 <PromilleGeb>int</PromilleGeb> 
 <GID>int</GID> 
 <NullUntil>int</NullUntil> 
 <CaOrder>string</CaOrder> 
 <WertVerr>int</WertVerr> 
 <ZeitVerr>int</ZeitVerr> 
 <RabattBetragAbsolut>int</RabattBetragAbsolut> 
 </RabattInfo> 
 </getCardInfoResult> 
 </getCardInfoResponse> 
 </soap:Body> 
</soap:Envelope> 
 
 SOAP 1.2 
HTTP/1.1 200 OK 
Content-Type: application/soap+xml; charset=utf-8 
Content-Length: length 
 
<?xml version="1.0" encoding="utf-8"?> 
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> 
 <soap12:Body> 
 <getCardInfoResponse xmlns="http://www.designa.de/"> 
 <getCardInfoResult> 
 <AmountPayed>int</AmountPayed> 
 <AmountDue>int</AmountDue> 
 <AmountDueCurrency>decimal</AmountDueCurrency> 
 <AmountDuePeriodStart>dateTime</AmountDuePeriodStart> 
 <AmountDuePeriodEnd>dateTime</AmountDuePeriodEnd> 
 <CardUID>guid</CardUID> 
 <ISONumber>string</ISONumber> 
 <CardType>int</CardType> 
 <CarparkUID>guid</CarparkUID> 
 <CarparkNr>int</CarparkNr> 
 <CodingTime>dateTime</CodingTime> 
 <LastTccNumber>int</LastTccNumber> 
 <LastTccTime>dateTime</LastTccTime> 
 <NumberOfPayments>int</NumberOfPayments> 
 <GracePeriod>int</GracePeriod> 
 <VAT>int</VAT> 
 <MoneyConversionFactor>decimal</MoneyConversionFactor> 
 <Currency>string</Currency> 
 <Cheater>boolean</Cheater> 
 <RabattInfo> 
 <Wert>int</Wert> 
 <Zeit>int</Zeit> 
 <Promille>int</Promille> 
 <PromilleGeb>int</PromilleGeb> 
 <GID>int</GID> 
 <NullUntil>int</NullUntil> 
 <CaOrder>string</CaOrder> 
 <WertVerr>int</WertVerr> 
 <ZeitVerr>int</ZeitVerr> 
 <RabattBetragAbsolut>int</RabattBetragAbsolut> 
 </RabattInfo> 
 </getCardInfoResult> 
 </getCardInfoResponse> 
 </soap12:Body> 
</soap12:Envelope> 
 
 HTTP POST 
HTTP/1.1 200 OK 
Content-Type: text/xml; charset=utf-8 
Content-Length: length 
 
<?xml version="1.0" encoding="utf-8"?> 
<CardInfo xmlns="http://www.designa.de/"> 
 <AmountPayed>int</AmountPayed> 
 <AmountDue>int</AmountDue> 
 <AmountDueCurrency>decimal</AmountDueCurrency> 
 <AmountDuePeriodStart>dateTime</AmountDuePeriodStart> 
 <AmountDuePeriodEnd>dateTime</AmountDuePeriodEnd> 
 <CardUID>guid</CardUID> 
 <ISONumber>string</ISONumber> 
 <CardType>int</CardType> 
 <CarparkUID>guid</CarparkUID> 
 <CarparkNr>int</CarparkNr> 
 <CodingTime>dateTime</CodingTime> 
 <LastTccNumber>int</LastTccNumber> 
 <LastTccTime>dateTime</LastTccTime> 
 <NumberOfPayments>int</NumberOfPayments> 
 <GracePeriod>int</GracePeriod> 
 <VAT>int</VAT> 
 <MoneyConversionFactor>decimal</MoneyConversionFactor> 
 <Currency>string</Currency> 
 <Cheater>boolean</Cheater> 
 <RabattInfo> 
 <Wert>int</Wert> 
 <Zeit>int</Zeit> 
 <Promille>int</Promille> 
 <PromilleGeb>int</PromilleGeb> 
 <GID>int</GID> 
 <NullUntil>int</NullUntil> 
 <CaOrder>string</CaOrder> 
 <WertVerr>int</WertVerr> 
 <ZeitVerr>int</ZeitVerr> 
 <RabattBetragAbsolut>int</RabattBetragAbsolut> 
 </RabattInfo> 
</CardInfo>




At this point I would be happy if someone could let me know if I am on the right track or is there a better language to do this in or am I going down the wrong track.

The final code is going to be run on a task scheduled every half an hour and needs to connect to a server and pull information out of a table (complete) and based on what it finds connect to the SOAP server and trigger 2 commands before moving onto the next bit of information in the database. Once it has finished everything in the database the program will close.

any help anyone can give will be a great help.

Is This A Good Question/Topic? 0
  • +

Replies To: connection to soap server

#2 rahulbatra  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 186
  • Joined: 28-December 05

Re: connection to soap server

Posted 12 September 2014 - 12:45 AM

I used to work with SOAPLite for quite some time and while it might be a little 'magical', it can be really concise. Unless you get into the very edge cases of hairy WSDL's, you should have no problem.

What I would recommend though, is to first get a request/response structure using SOAPUI. Once you get the exact request you have to send, converting it to SOAPLite is trivial.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1