Od razu powiem że nigdy nie bawiłem się obsługą xml.
Muszę wyslać na serwer Signal Iduna zapytanie xml i odebrać wiadomość zwrotną, ale nie wiem jak to ugryść.
Bardzo prosiłbym o pomoc i nakierowanie w jaki sposób to zrobić.
Dane do wysłania:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.signal-iduna.pl/etravel2/types"> <soapenv:Header/> <soapenv:Body> <typ:PolicyOfferRequest> <typ:Agent> <typ:AgSymbol>334455</typ:AgSymbol> <typ:TaxNumber>1234567890</typ:TaxNumber> </typ:Agent> <typ:SalesMode>ETR_WS</typ:SalesMode> <typ:PortalCode>www.portalurl.pl </typ:PortalCode> <!-- Element opcjonalny (identyfikator oferty po stronie pośrednika) --> <typ:ExternalOfferIdentifier>EXT_OFF_ID</typ:ExternalOfferIdentifier> <typ:PackageCode>PTUR_BPD</typ:PackageCode> <typ:GtcVersion>TUR_BPD_2010</typ:GtcVersion> <!-- Sekcja zależna od pakietu, opisana w tabeli Warianty polisy --> <typ:PolicyVariant> <typ:VariantCode>S_BPD_TR_STD_EUROPA</typ:VariantCode> <typ:VariantParam/> <typ:Risks> <typ:Risk> <typ:RiskCode>S_KL</typ:RiskCode> <typ:InsuranceSum> <typ:Amount>30000</typ:Amount> <typ:Currency>EUR</typ:Currency> </typ:InsuranceSum> </typ:Risk> <typ:Risk> <typ:RiskCode>S_NNW</typ:RiskCode> <typ:InsuranceSum> <typ:Amount>15000</typ:Amount> <typ:Currency>PLN</typ:Currency> </typ:InsuranceSum> </typ:Risk> <typ:Risk> <typ:RiskCode>S_BP</typ:RiskCode> <typ:InsuranceSum> <typ:Amount>1000</typ:Amount> <typ:Currency>PLN</typ:Currency> </typ:InsuranceSum> </typ:Risk> <typ:Risk> <typ:RiskCode>S_OC</typ:RiskCode> <typ:InsuranceSum> <typ:Amount>30000</typ:Amount> <typ:Currency>EUR</typ:Currency> </typ:InsuranceSum> </typ:Risk> </typ:Risks> </typ:PolicyVariant> <typ:TravelDateFrom>2011-11-24</typ:TravelDateFrom> <typ:TravelDateTo>2011-11-24</typ:TravelDateTo> <!-- Słownikowy kod kraju --> <typ:Destination>GB</typ:Destination> <typ:TravelType>STAY</typ:TravelType> <typ:Clauses> <typ:Clause code="GTC" answer="Y" IPFrom="10.0.0.1"/> <typ:Clause code="MED_DOC" answer="Y" IPFrom="10.0.0.1"/> <typ:Clause code="MARKETING" answer="N" IPFrom="10.0.0.1"/> </typ:Clauses> <typ:Statements> <typ:Statement code="STAY_IN_RP" answer="Y" IPFrom="10.0.0.1"/> <typ:Statement code="STAY_IN_RESIDENCE_CTRY" answer="Y" IPFrom="10.0.0.1"/> </typ:Statements> <typ:PolicyLevelModifiers> <typ:PolicyLevelModifier> <typ:ModifierCode>ID_SALE</typ:ModifierCode> <typ:ModifierValue>-0.1</typ:ModifierValue> </typ:PolicyLevelModifier> </typ:PolicyLevelModifiers> <typ:PolicyHolder> <typ:Person> <typ:PrsFirstName>Norbert</typ:PrsFirstName> <typ:FullName>Traczyk</typ:FullName> <typ:PrsNationalID>80010112340</typ:PrsNationalID> <typ:PrsBirthDate>1980-01-01</typ:PrsBirthDate> <typ:Contact> <typ:Tel>+480225056272</typ:Tel> <typ:Email>norbert.traczyk@signal-iduna.pl</typ:Email> </typ:Contact> <typ:Addresses> <typ:Address> <typ:Street>Dluga</typ:Street> <typ:HouseNumber>5</typ:HouseNumber> <typ:Postcode>00-950</typ:Postcode> <typ:City>Warszawa</typ:City> <typ:CountryCode>PL</typ:CountryCode> <typ:AddressType>KOR</typ:AddressType> </typ:Address> </typ:Addresses> </typ:Person> </typ:PolicyHolder> <typ:Insureds> <typ:Insured> <typ:Person> <typ:PrsFirstName>Norbert</typ:PrsFirstName> <typ:FullName>Traczyk</typ:FullName> <typ:PrsNationalID>80010112340</typ:PrsNationalID> <typ:PrsBirthDate>1980-01-01</typ:PrsBirthDate> <typ:Contact> <typ:Tel>+480225056272</typ:Tel> </typ:Contact> <typ:Addresses> <typ:Address> <typ:Street>Dluga</typ:Street> <typ:HouseNumber>5</typ:HouseNumber> <typ:Postcode>00-950</typ:Postcode> <typ:City>Warszawa</typ:City> <typ:CountryCode>PL</typ:CountryCode> <typ:AddressType>KOR</typ:AddressType> </typ:Address> </typ:Addresses> </typ:Person> <typ:InsuredLevelModifiers> <typ:InsuredLevelModifier> <typ:ModifierCode>SZ</typ:ModifierCode> </typ:InsuredLevelModifier> </typ:InsuredLevelModifiers> </typ:Insured> <typ:Insured> <typ:Person> <typ:PrsFirstName>Dziadek</typ:PrsFirstName> <typ:FullName>Traczyk</typ:FullName> <typ:PrsBirthDate>1920-01-01</typ:PrsBirthDate> </typ:Person> <typ:InsuredLevelModifiers> <typ:InsuredLevelModifier> <typ:ModifierCode>CP</typ:ModifierCode> </typ:InsuredLevelModifier> <typ:InsuredLevelModifier> <typ:ModifierCode>SZ</typ:ModifierCode> </typ:InsuredLevelModifier> </typ:InsuredLevelModifiers> </typ:Insured> <typ:Insured> <typ:Person> <typ:PrsFirstName>Dziecko</typ:PrsFirstName> <typ:FullName>Traczyk</typ:FullName> <typ:PrsBirthDate>2010-01-01</typ:PrsBirthDate> </typ:Person> </typ:Insured> </typ:Insureds> </typ:PolicyOfferRequest> </soapenv:Body> </soapenv:Envelope>
Dane do odebrania:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.signal-iduna.pl/etravel2/types"> <env:Body> <ns0:PolicyOfferResponse version="1.7.3.4/202" environmentCode="TEST" xmlns:ns2="http://www.signal-iduna.pl/etravel2/types"> <ns2:StatusCode>OK</ns2:StatusCode> <ns2:Premium> <ns2:Amount>40.88</ns2:Amount> <ns2:Currency>PLN</ns2:Currency> </ns2:Premium> <ns2:PremiumWithoutID> <ns2:Amount>45.41</ns2:Amount> <ns2:Currency>PLN</ns2:Currency> </ns2:PremiumWithoutID> <ns2:OfferId>10596</ns2:OfferId> </ns0:PolicyOfferResponse> </env:Body> </env:Envelope>
Pozdrawiam