Search Results

Search found 5 results on 1 pages for 'pastor'.

Page 1/1 | 1 

  • How do you get XML::Pastor to set xsi:type for programmatically generated elements?

    - by Derrick
    I'm learning how to use Perl as an automation test framework tool for a Java web service and running into trouble generating xml requests from the Pastor generated modules. The problem is that when including a type that extends from the required type for an element, the xsi:type is not included in the generated xml string. Say, for example, I want to generate the following xml request from the modules that XML::Pastor generated from my xsd: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PromptAnswersRequest xmlns="http://mycompany.com/api"> <Uri>/some/url</Uri> <User ref="1"/> <PromptAnswers> <PromptAnswer xsi:type="textPromptAnswer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Prompt ref="2"/> <Children> <PromptAnswer xsi:type="choicePromptAnswer"> <Prompt ref="1"/> <Choice ref="2"/> </PromptAnswer> </Children> <Value>totally</Value> </PromptAnswer> </PromptAnswers> </PromptAnswersRequest> What I'm getting currently is this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PromptAnswersRequest xmlns="http://mycompany.com/api"> <Uri>/some/url</Uri> <User ref="1"/> <PromptAnswers> <PromptAnswer> <Prompt ref="2"/> <Children> <PromptAnswer> <Prompt ref="1"/> <Choice ref="2"/> </PromptAnswer> </Children> <Value>totally</Value> </PromptAnswer> </PromptAnswers> </PromptAnswersRequest> Here are some relavent snippets from the xsd: <xs:complexType name="request"> <xs:sequence> <xs:element name="Uri" type="xs:anyURI"/> </xs:sequence> </xs:complexType> <xs:complexType name="promptAnswersRequest"> <xs:complexContent> <xs:extension base="api:request"> <xs:sequence> <xs:element name="User" type="api:ref"/> <xs:element name="PromptAnswers" type="api:promptAnswerList"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="promptAnswerList"> <xs:sequence> <xs:element name="PromptAnswer" type="api:promptAnswer" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="promptAnswer" abstract="true"> <xs:sequence> <xs:element name="Prompt" type="api:ref"/> <xs:element name="Children" type="api:promptAnswerList" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="textPromptAnswer"> <xs:complexContent> <xs:extension base="promptAnswer"> <xs:sequence> <xs:element name="Value" type="api:nonEmptyString" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> And here are relavent parts of the script: my $promptAnswerList = new My::API::Type::promptAnswerList; my @promptAnswers; my $promptAnswerList2 = new My::API::Type::promptAnswerList; my @textPromptAnswerChildren; my $textPromptAnswer = new My::API::Type::textPromptAnswer; my $textPromptAnswerRef = new My::API::Type::ref; $textPromptAnswerRef->ref('2'); $textPromptAnswer->Prompt($textPromptAnswerRef); my $choicePromptAnswer = new My::API::Type::choicePromptAnswer; my $choicePromptAnswerPromptRef = new My::API::Type::ref; my $choicePromptAnswerChoiceRef = new My::API::Type::ref; $choicePromptAnswerPromptRef->ref('1'); $choicePromptAnswerChoiceRef->ref('2'); $choicePromptAnswer->Prompt($choicePromptAnswerPromptRef); $choicePromptAnswer->Choice($choicePromptAnswerChoiceRef); push(@textPromptAnswerChildren, $choicePromptAnswer); $promptAnswerList2->PromptAnswer(@textPromptAnswerChildren); $textPromptAnswer->Children($promptAnswerList2); $textPromptAnswer->Value('totally'); push(@promptAnswers, $pulseTextPromptAnswer); push(@promptAnswers, $textPromptAnswer); I haven't seen this addressed anywhere in the documentation for the XML::Pastor modules, so if anyone can point me at a good reference for its use it would be greatly appreciated. Also, I'm only using XML::Pastor because I don't know of any other modules that can do this, so if any of you know of something either easier to use, or more well maintained, please let me know about that too!

    Read the article

  • Can I Hide a part of joomla link in source code? [migrated]

    - by pastor
    link rel="stylesheet" type="text/css" href="/nettt/plugins/system/jch_optimize/cache/jscss.php?f=019a87662ec9a3b8c890c566b8019f23-cache-plg_jch_optimize-652b9fac2d3cde50d0b5ec53b6e540d4&amp;type=css&amp;gz=gz&amp;d=30"/> I wont to hide /nettt/plugins/system/jch_optimize/cache/jscss.php?f=019a87662ec9a3b8c890c566b8019f23-cache-plg_jch_optimize-652b9fac2d3cde50d0b5ec53b6e540d4&amp any ideas?

    Read the article

  • How many results were returned?

    - by Pastor Bones
    I'm performing a query on a worksheet. I want to update the row if it exists or insert it if it doesn't. How can you check if a result was returned or not? $query = new Zend_Gdata_Spreadsheets_ListQuery(); $query->setSpreadsheetKey($this->currKey); $query->setWorksheetId($this->currWkshtId); $query->setSpreadsheetQuery('cid = ' . $data['cid']); $listFeed = $this->gdClient->getListFeed($query); // This does not work! if(empty($listFeed)){ echo 'No results found!'; }

    Read the article

  • PHP Mail Not Sending Messages

    - by Kenton de Jong
    I realize this question title is pretty overused, but I couldn't find an answer to my problem. This could be because either I'm not too good with PHP and I don't understand the problem, or because I have a different issue, but I thought I would post it and see if somebody can help me. I developed a website for a local church in my city and I made the site on my computer, put it onto my website as a sub directory and tested it all. It worked great. One of the things the client wanted was there to be an email form that can send emails. I made it and all was good. I then uploaded it onto the church server and thought it went good too. But then we decided to try the email form out, and for some reason it didn't work. I made the email form by having the user select a recipient (pastor, office manager, etc.) with a radio button, and that would change the action of the email form. I just did something like this: if (recipent == "pastor") { document.forms[0].action = "../scripts/php/pastor_contact.php"; } else if (recipent == "pastoralAssist") { document.forms[0].action = "../scripts/php/pastoral_assist_contact.php"; } else if (recipent == "famMinistry") { document.forms[0].action = "../scripts/php/sacra_assist_contact.php"; } else if (recipent == "sacraAssist") { document.forms[0].action = "../scripts/php/fam_ministry_contact.php"; } I know this isn't the cleanest, but it works great. The php files then, all look very similar to this (just a different email)" <?php $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $formcontent="From: $name \n Email: $email \n Phone Number: $phone \n Message: $message"; $recipient = "[email protected]"; $subject = $_POST['subject']; $mailheader = "$subject \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("There seems to be an error with this form. Sorry about the inconveince. We are working to get this fixed."); header('Location: ../../quickylinks/message_sent.html') ; ?> What this does, briefly, is collect the information from the email form, submit it as an email and then redirect the user to a "Message Sent" page. This works on my server, but not theirs so I believe it's something to do with their server. You can see their server information here and mine here. When the user sends the message, they get "There seems to be an error with this form. Sorry about the inconveince. We are working to get this fixed." and the email doesn't go through, although the code is the same on my server and it works fine there. My initial thought was that PHP wasn't installed on their server (rare, but it does happen). But it was. So then I thought maybe it was installed, but the "mail" function was disabled. So I tried the following php code: <?php if (function_exists('mail')) { echo 'mail() is available'; } else { echo 'mail() has been disabled'; } ?> And it came back with "mail() is available". So now I'm stuck and I don't know the problem could be. As I said, I'm not very good at PHP yet so if somebody could give a detailed answer, I would be really really thankful! Thank you so much!

    Read the article

  • PHP Curl - returned html all messed up

    - by yoda
    I'm trying to fetch some contents about articles in a website via Curl, which I'm doing as follows : $url = 'http://lisboacity.olx.pt/oportunidade-pastor-alemao-7-meses-com-lop-iid-432402267'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322'); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $data = curl_exec($ch); curl_close($ch); echo $data; However, as you can see, the result is this : result For indexation purposes, I'm leaving a small paste of the output here : ‹ÜW_oÛ6N€~F{hD’å?±“ØÜÄm‚&qZ;-Ö¢0h‰–™R¢JR¶Óapcèð}*ö²§)%Vœ&YÚ·†eêî~¿;òx<6×ö{{ƒ_N»èp|„NÏžî!ËvÝו=×Ýìg‚ªSòÐ@àXREyŒ™ëvO,dM”Jv\w6›9³ŠÃEè^º±ªË8—Ä TµW›ú•~À#" #mj“)¶¬=++{p‘ùÙ¨e)2Wmù,$Q­Ã~Ïn4jÛ¶g!÷.¨#‡)‹p‰26«>Í–M·.ƒTŽ8ö©ºp8›;‰r-¤°ÕJÂÆ£¢Š‘v/áB¥1 p@ÖN±T\ #Ñ'Žê("’H ŽÐQïÔ…#ƒ:10•(à £¨Ï%¼D]øá??ñ¦›d‘Å8"-+ Ò4Ñ3_ç:åÓÏÁ†ð’\[‘8]ÿÑëÎà zÕ;AOûý½ƒÞÓþA÷ðxíÑê£Uã»ôvS_pB“M ’aÙq€AŠX"øNa¦bx’;hŸÊäoCÃ0þjB3C@ Rå"™0Ãz€cž&ü{æäjúô '&äö'¤åUªõZ½î5êÀd2Ñø=„µ,Ç<†bÛìž3èGöØj±Ð{9Ø; ýÞÉ«,Æ]©.‘îO!Åb~–Á2 !°'uåÊj_Êÿ„œ=†žç;Æ$"Ó-3–­ I've also tried to load the url contents with PHP's DomDocument class with the same result. What could be causing this? Thanks in advance!

    Read the article

1