Jump to content
php.lv forumi

dExIT

Reģistrētie lietotāji
  • Content Count

    14
  • Joined

  • Last visited

About dExIT

  • Rank
    Māceklis

Profile Information

  • Gender
    Male
  • Location
    Rugby, UK
  1. Sveiki, Velejos vispirms atvainoties par garumzimju neessamiibu, valsts kura atrodos un vieta no kuras rakstu ierobezo mani. Problema ar ko saskaros: * ir WSDL serviss no kura velos pieprasit datus par reportiem * Ir manualis ka ar vinju runat tikai caur C# un vienkarshi XML/SOAP envelope request/response piemeeri * Ir stradajosh kods no StackOverflow -> Apskatam te lai gjenereetu valid Auth un ieguutu vajadziigo "SESSION ID". Pec SO koda es pievienoju vienkarshu pieprasijumu $client->GetSystemSettings(); Kas gjeneree: <?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:Header> <UserSessionCredentials xmlns="http://www.NSadrese.net/"> <UserId>int</UserId> <ClientId>string</ClientId> <SessionId>string</SessionId> </UserSessionCredentials> </soap:Header> <soap:Body> <GetSystemSettings xmlns="http://www.NSadrese.net/" /> </soap:Body> </soap:Envelope> Atbilde <IntegrationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.NSadrese.net/"> <ResponseId>0</ResponseId> <TotalCount>0</TotalCount> <Detail>dd/MM/yyyy HH:mm</Detail> <Statuses/> <ImportingQueueId>0</ImportingQueueId> <SalesOrdersToDespatchIds/> </IntegrationResponse> Kas pieraada ka es speeju sarunaaties ar sho WSDL servisu. Bet tiklidz es veelos piekljuut savadaakiem datiem, man vienmeer raada ka ir objekts kursh nav "atrakstiits", lasot dziljaak saprotu ka neesmu pareizi izveidojis pieprasiijumu (struktruura). Vel paseedeeju paaris dienas un sapratu ka nav lemts. Tad uzduros uz shi servisa http://www.soapclient.com/soaptest.html Kas ljauj man ievadit WSDL linku, un gjeneree HTML INPUT formas un te viss straadaa, es veeleetos sho informaaciju padot no sava WEBservera caur PHP SOAP bet dotajaa gadijumaa es laizhu visu caur file_get_contents kaa ENCODED url request uz sho formu un tad sijaaju XML responsi etc. Ludzu skatiet : Gribetu zinat ka shis Serviss uzgjeneree pareizus pieprasijumus Un vel vairaak neizprotu kadelj kad pieprasijums ir pabeigts, XML rezultats ir shads: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetReportDataResponse xmlns="http://www.NSadrese.net/"> <GetReportDataResult> <ResponseId>0</ResponseId> <TotalCount>1896</TotalCount> <Detail> "Total","Type" "1747","Allocated" "14","Partially allocated" "1","Partially despatched" "8","Partially picked" "126","Picked" </Detail> <Statuses/> <ImportingQueueId>0</ImportingQueueId> <SalesOrdersToDespatchIds/> </GetReportDataResult> </GetReportDataResponse> </soap:Body> </soap:Envelope> PS>Mani pa lielam interesee tikai <TotalCount> un <Detail> Pashaas beigaas sapratu ka esmu lops un vajadzeetu saprast ka lietot CLASS / un CLASSMAP, bet Tad izmantojot http://www.stccorp.net/ewsdl2php/wsdl2php.php Ieguvu sho : <?php class Authenticate{ var $clientId;//string var $username;//string var $password;//string } class AuthenticateResponse{ var $AuthenticateResult;//IntegrationResponse } class IntegrationResponse{ var $ResponseId;//int var $TotalCount;//int var $Detail;//string var $Statuses;//ArrayOfIntegrationStatusResponse var $ImportingQueueId;//int var $SalesOrdersToDespatchIds;//ArrayOfInt } class ArrayOfIntegrationStatusResponse{ var $IntegrationStatusResponse;//IntegrationStatusResponse } class IntegrationStatusResponse{ var $Reference;//string var $Status;//IntegrationResponseStatuses var $LineNo;//int var $Details;//string } class ArrayOfInt{ var $int;//int } class GetData{ var $getRequest;//GetRequest } class GetRequest{ var $TemplateName;//string var $PageNo;//int var $ItemsPerPage;//int var $SearchClause;//string } class GetDataResponse{ var $GetDataResult;//IntegrationResponse } class UserSessionCredentials{ var $UserId;//int var $ClientId;//string var $SessionId;//string } class GetSystemSettings{ } class GetSystemSettingsResponse{ var $GetSystemSettingsResult;//IntegrationResponse } class GetReportData{ var $getReportRequest;//GetReportRequest } class GetReportRequest{ var $FilterClause;//string var $OrderBy;//string var $Columns;//string } class GetReportDataResponse{ var $GetReportDataResult;//IntegrationResponse } class GetReportColumns{ var $templateName;//string } class GetReportColumnsResponse{ var $GetReportColumnsResult;//IntegrationResponse } class GetSaveTemplate{ var $templateName;//string } class GetSaveTemplateResponse{ var $GetSaveTemplateResult;//IntegrationResponse } class SaveData{ var $saveRequest;//SaveRequest } class SaveRequest{ var $TemplateName;//string var $CsvData;//string var $Action;//int } class SaveDataResponse{ var $SaveDataResult;//IntegrationResponse } class SubscribeEvent{ var $eventType;//SubscriptionEventTypes var $filter;//string var $callbackUrl;//string } class SubscribeEventResponse{ var $SubscribeEventResult;//IntegrationResponse } class SubscribeEventWithSitesFilters{ var $eventType;//SubscriptionEventTypes var $filter;//string var $sitesFilter;//string var $callbackUrl;//string } class SubscribeEventWithSitesFiltersResponse{ var $SubscribeEventWithSitesFiltersResult;//IntegrationResponse } class SubscribePostEvent{ var $eventType;//SubscriptionEventTypes var $filter;//string var $postUrl;//string var $postParams;//string } class SubscribePostEventResponse{ var $SubscribePostEventResult;//IntegrationResponse } class UnsubscribeEvent{ var $subscriptionId;//int } class UnsubscribeEventResponse{ var $UnsubscribeEventResult;//IntegrationResponse } class Range { var $soapClient; private static $classmap = array('Authenticate'=>'Authenticate' ,'AuthenticateResponse'=>'AuthenticateResponse' ,'IntegrationResponse'=>'IntegrationResponse' ,'ArrayOfIntegrationStatusResponse'=>'ArrayOfIntegrationStatusResponse' ,'IntegrationStatusResponse'=>'IntegrationStatusResponse' ,'ArrayOfInt'=>'ArrayOfInt' ,'GetData'=>'GetData' ,'GetRequest'=>'GetRequest' ,'GetDataResponse'=>'GetDataResponse' ,'UserSessionCredentials'=>'UserSessionCredentials' ,'GetSystemSettings'=>'GetSystemSettings' ,'GetSystemSettingsResponse'=>'GetSystemSettingsResponse' ,'GetReportData'=>'GetReportData' ,'GetReportRequest'=>'GetReportRequest' ,'GetReportDataResponse'=>'GetReportDataResponse' ,'GetReportColumns'=>'GetReportColumns' ,'GetReportColumnsResponse'=>'GetReportColumnsResponse' ,'GetSaveTemplate'=>'GetSaveTemplate' ,'GetSaveTemplateResponse'=>'GetSaveTemplateResponse' ,'SaveData'=>'SaveData' ,'SaveRequest'=>'SaveRequest' ,'SaveDataResponse'=>'SaveDataResponse' ,'SubscribeEvent'=>'SubscribeEvent' ,'SubscribeEventResponse'=>'SubscribeEventResponse' ,'SubscribeEventWithSitesFilters'=>'SubscribeEventWithSitesFilters' ,'SubscribeEventWithSitesFiltersResponse'=>'SubscribeEventWithSitesFiltersResponse' ,'SubscribePostEvent'=>'SubscribePostEvent' ,'SubscribePostEventResponse'=>'SubscribePostEventResponse' ,'UnsubscribeEvent'=>'UnsubscribeEvent' ,'UnsubscribeEventResponse'=>'UnsubscribeEventResponse' ); function __construct($url='integrationservicev4.asmx?WSDL') { $this->soapClient = new SoapClient($url,array("classmap"=>self::$classmap,"trace" => true,"exceptions" => true)); } function Authenticate(Authenticate $Authenticate) { $AuthenticateResponse = $this->soapClient->Authenticate($Authenticate); return $AuthenticateResponse; } function GetData(GetData $GetData) { $GetDataResponse = $this->soapClient->GetData($GetData); return $GetDataResponse; } function GetSystemSettings(GetSystemSettings $GetSystemSettings) { $GetSystemSettingsResponse = $this->soapClient->GetSystemSettings($GetSystemSettings); return $GetSystemSettingsResponse; } function GetReportData(GetReportData $GetReportData) { $GetReportDataResponse = $this->soapClient->GetReportData($GetReportData); return $GetReportDataResponse; } function GetReportColumns(GetReportColumns $GetReportColumns) { $GetReportColumnsResponse = $this->soapClient->GetReportColumns($GetReportColumns); return $GetReportColumnsResponse; } function GetSaveTemplate(GetSaveTemplate $GetSaveTemplate) { $GetSaveTemplateResponse = $this->soapClient->GetSaveTemplate($GetSaveTemplate); return $GetSaveTemplateResponse; } function SaveData(SaveData $SaveData) { $SaveDataResponse = $this->soapClient->SaveData($SaveData); return $SaveDataResponse; } function SubscribeEvent(SubscribeEvent $SubscribeEvent) { $SubscribeEventResponse = $this->soapClient->SubscribeEvent($SubscribeEvent); return $SubscribeEventResponse; } function SubscribeEventWithSitesFilters(SubscribeEventWithSitesFilters $SubscribeEventWithSitesFilters) { $SubscribeEventWithSitesFiltersResponse = $this->soapClient->SubscribeEventWithSitesFilters($SubscribeEventWithSitesFilters); return $SubscribeEventWithSitesFiltersResponse; } function SubscribePostEvent(SubscribePostEvent $SubscribePostEvent) { $SubscribePostEventResponse = $this->soapClient->SubscribePostEvent($SubscribePostEvent); return $SubscribePostEventResponse; } function UnsubscribeEvent(UnsubscribeEvent $UnsubscribeEvent) { $UnsubscribeEventResponse = $this->soapClient->UnsubscribeEvent($UnsubscribeEvent); return $UnsubscribeEventResponse; } function Authenticate(Authenticate $Authenticate) { $AuthenticateResponse = $this->soapClient->Authenticate($Authenticate); return $AuthenticateResponse; } function GetData(GetData $GetData) { $GetDataResponse = $this->soapClient->GetData($GetData); return $GetDataResponse; } function GetSystemSettings(GetSystemSettings $GetSystemSettings) { $GetSystemSettingsResponse = $this->soapClient->GetSystemSettings($GetSystemSettings); return $GetSystemSettingsResponse; } function GetReportData(GetReportData $GetReportData) { $GetReportDataResponse = $this->soapClient->GetReportData($GetReportData); return $GetReportDataResponse; } function GetReportColumns(GetReportColumns $GetReportColumns) { $GetReportColumnsResponse = $this->soapClient->GetReportColumns($GetReportColumns); return $GetReportColumnsResponse; } function GetSaveTemplate(GetSaveTemplate $GetSaveTemplate) { $GetSaveTemplateResponse = $this->soapClient->GetSaveTemplate($GetSaveTemplate); return $GetSaveTemplateResponse; } function SaveData(SaveData $SaveData) { $SaveDataResponse = $this->soapClient->SaveData($SaveData); return $SaveDataResponse; } function SubscribeEvent(SubscribeEvent $SubscribeEvent) { $SubscribeEventResponse = $this->soapClient->SubscribeEvent($SubscribeEvent); return $SubscribeEventResponse; } function SubscribeEventWithSitesFilters(SubscribeEventWithSitesFilters $SubscribeEventWithSitesFilters) { $SubscribeEventWithSitesFiltersResponse = $this->soapClient->SubscribeEventWithSitesFilters($SubscribeEventWithSitesFilters); return $SubscribeEventWithSitesFiltersResponse; } function SubscribePostEvent(SubscribePostEvent $SubscribePostEvent) { $SubscribePostEventResponse = $this->soapClient->SubscribePostEvent($SubscribePostEvent); return $SubscribePostEventResponse; } function UnsubscribeEvent(UnsubscribeEvent $UnsubscribeEvent) { $UnsubscribeEventResponse = $this->soapClient->UnsubscribeEvent($UnsubscribeEvent); return $UnsubscribeEventResponse; }} ?> -- Vai kaads butu spejigs mani apgaismot ka izmantot/lietot sho gjenereeto PHP failu lai iegutu sev velamos rezultatus -> GetReportData ? Atvainojos varbut par nelogjiskumu/valodu esmu gandriz jau zaudejis praatu un nespeeju atrast resursus kas man speetu palidzeet. -- EDIT--- Ja kaads veelas atbildeet uz sho jautaajumu SO - luudzu : http://stackoverflow.com/questions/43340131/using-easy-php2wsdl-generated-php-code
  2. gribeju nokomentēt, Gameplace kā viens no veidotājiem, nemaksā 100ls :D jo projekts ir tik tālu atīstīts backgroundā, ka nu labi neizplūdīšu... Bet prieks ka kāds cenšas mācīties, bet iesaku domāt k-ko jaunu veidot :) Ja nav idejas nav jēgas taisīt ntiem vienādu saitu :)
  3. Kā jau atbildēju Tev, foxc iekš GFX, sazinies ar mani, par vienu alternatīvu kura ir LV EE un LT atbalsts sms ka arī paypal estrādāts, sīkāka informācija pa skype : dexit-
  4. www.gameplace.lv - līkām rokām rakstīts CMS, protams pašiem patīk ^^ orģinālais autors dAboy, līdzautors es.... www.dyc.lv - taisnām rokām rakstīts Server managment cms, kas spēj real-taimā rediģēt serverus, mainīt informāciju etc...
  5. Cik esi gatavs atlīdzināt ?
  6. www.solarf.lv vai dabū mani rokā, daudz labāki un nopietnāki risinājumi nekā fortumo... Otrkārt var mierīgi sarunāt ka automātiski tiek samaksāti nodokļi unnevajag rupji sakot čakarēties ar VID :)
  7. dExIT

    sms shop

    Kāda tipa Operatoru vēlies izmantot ? Forumo / Esteria / Solar-F ? Un tad kad esi izvēlējies un jau parakstījis līgumu, tad var domāt par SMS šop :)
  8. dExIT

    PAR MKV -> AVI !?

    hmm paldies.. Kristabs. :) Bet vnk man uz Vistas daudzas programmas nestrādā =/
  9. dExIT

    ipb panel

    Cik maksāsi ? :) pati ideja ir IBportal izkārtojumam... nekas tur grūts nav.. tikai vajag izmantot google u pakustināt smadzenes... skype : dExIT- uzraksti man... ja noveiksies palīdzēšu :D
  10. www.google.lv -> WEBMIN ... un viss.. nevajag lieki citu laiku tērēt..
  11. dExIT

    PAR MKV -> AVI !?

    Neko nevar nopietnu atrast.. =/
  12. dExIT

    PAR MKV -> AVI !?

    Vai var lūdzu kāds uzrakstī pamācību, via pateikt programmu ar ko varētu konvertēt mkv(zinu ka tas ir kontainers) , uz AVI vai kādu citu tipu, jo cik meklējis esmu vnk bez rezultātiem, un arī ir bijis rakstīts k-kas kas uzved uz īstā ceļa.. bet beigās nekas... Man ir vajadzīgs, lai es PC varu vnk pārveidot šo MKV video failu uz AVI vai kādu citu kuru varu lietot VIDEO montāžas un apstrādes programmās... Ir kādam ieteikumi ?
  13. Šis ir kā, priekš Showcase, teiksim atrāda ko ir panācis :) Es atagd balstoties uz Tava CMS ideoloģiju ^^ veicu modifikācijas priekš LA2 serveriem un vēlak citam spēlēm ... ^^ Būtu labi ja būtu uz IPB 2.3.x
  14. Tāds jautājums uzradās, vai nevēlies pievienot phpBB versiju ar kuru viņs savienojas, vai arī tas ir gluži vienalga šajā gadījumā, un bagus vaidzēs labot pašam ( nezkatoties ka tas ir tikai BETA )
×
×
  • Create New...