changing soap body attribute in perl SOAP::Lite 0.7 - perl

Is it possible to set an attribute in the soap:Body tag using perl and SOAP::Lite 0.7.
In all the examples I have seen I can change the attributes inside the body tag using
SOAP::Data * calls and use the $soap->call($dataValue) for this purpose.
What I really need is the way to add an ID attribute to the soap:Body tag in SOAP::Lite perl. Any pointers in this direction would be appreciated. Thanks.

Ok I think after banging my head on wall for 2days I should giveup using soap lite at client side and use raw xml for this purpose or use one of the alternates. I needed this to add the digital signatures. Found some suggestions to switch to SOAP::Simple/XML::Compile::SOAP. Any pointers in the direction would still be helpful. thanks
Also found out the way to have fine grain control via extending SOAP::Serializer and overriding the envelop method.

Related

Claudia.js jasmine post/put body key

I'm using claudia-api-builder and attempting to write tests using jasmine-node. I'm using the proxyRouter on my API using this tutorial https://claudiajs.com/tutorials/testing-locally.html, and I can pass path parameters fine as demonstrated. However, I can't find what the key is for the body of the request.
For example it says
You can fill in the other properties (eg queryStringParameters)
according to what the test expects
But I can't find anywhere that lists the possible properties. The API Gateway Proxy Object link also doesn't seem to go to anything useful, as the sample doesn't seem to include a body.
Does anybody know what the key I should be using is? Thanks!
Worked it out - somewhat embarrassingly it's just body.

Equivalent for Dancer of Mojolicious Mojolicious::Plugin::PODRenderer?

I would like to generate documentation in a Dancer application in the same way that Mojolicious does with Mojolicious::Plugin::PODRenderer, I mean in the browser, under the /perldoc path.
Does somebody knows a module that can help? I found no ready-made plugin for Dancer. If it don't exist, any recommandation is welcome.
Porting Mojolicious' PODRenderer to Dancer should be fairly simple - it's an example plugin and the code is fairly short. I've done this for my own use in my CGI framework at work.
https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/PODRenderer.pm#L34
Essentially what the plugin does is define the route /perldoc/:module to call the _perldoc method; the _perldoc method uses Pod::Simple::Search to find a documentation file matching the module param in the #INC directories; If it doesn't, it redirects the search to MetaCPAN. If it does, it uses Pod::Simple::HTML to convert the documentation to HTML, which is then tidied up with Mojo::DOM and wrapped in a lovely template.
Finding the location of that template is left as an exercise for... oh, nevermind, here it is: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/templates/perldoc.html.ep

CodeIgniter send()) fail

I am learning how to use code igniter and following tutorials. As this is my first time to use MVC, I'm having some trouble implementing the send function. I am doing a tutorial on how send a newsletter sign up form.
For some reason when I hit submit with or without the info, its giving me a 404 page not found with the /send extension. Is there something I'm missing in my config file?
Here is the code
Thanks in advance.
Is not send that is failing but you missed something in your config.
http://codeigniter.com/user_guide/general/urls.html
You should set up your .htaccess according to the guide above.
Did you setup the CodeIgniter rewrite rules in your .htaccess?
Apart from the htaccess possible problem, there are a couple of things wrong in the file you posted:
1) the html <title>HEY<title> before the php class, but I hope that's a typo, right? you don't have html in your controller file, right?
2) You're getting the POST variable wrong; or better, you're confusing and mixing things.
Instead of
$this->input->$_POST('name'); //which is also sintactically wrong
should be:
$this->input->post('name').
The input class already does the retrieving of this superglobal. And unsets them in favour of its own.
3) To use an attachment, you need to call
$this->email->attach($filename);
You just declared a variable and nothing else.
4) What is $this->email->set_newline("\r\n"); ?
I don't see this function in the email class...You need to use a config file for this, or pass the value on library's inizialization:
$config['newline'] = "\r\n";
$this->email->initialize($config);

Parsing XML using libxml2 and Xpath in objective c

I want to parse an xml file using libxml2 and XPath
I have tried to look this up on the internet
but I can't find much about it.
Can anyone give me a sample code for parsing this xml:
<WebServiceResponse>
<status>OK</status>
<result>
<type>sample</type>
<name>Sample XML</name>
<location>
<lat>37.4217550</lat>
<lng>-122.0846330</lng>
</location>
</result>
<result>
<message>The secret message</message>
</result>
</WebServiceResponse>
just so I can work further
thanks in advance
this link may help you,
xml parsing iphone, objective C?
two automatic source creating: http://sudzc.com/
Download wsdl2objc and usage instructions here: http://code.google.com/p/wsdl2objc/wiki/UsageInstructions
Actually I am also looking for the code, please update once you find the answer.
You say you want to use libxml2 and XPath, but you don't say what you need XPath (presumably libxml2's implementation of the XPath 1.0 spec) to do. You ask for sample code to parse the XML, but you don't say what you want to do with the information in the XML, so it's hard answer your question.
If you really want to use libxml2, then you'll be writing most of your code in C because libxml2 is a C library. I recommend you use the libxml2 tutorial to get started. Based on that you should be able to try out some things. If you then have specific problems that you need to help with you can post more specific questions.
If you're not really committed to using libxml2 directly, and you prefer to write something more "native-like" in objective-C, then there are numerous frameworks for doing that including the built-in NSXMLParser class. There's no direct support for XPath or full-document XML processing built-in for iOS, but if what you want to do is parse the XML it should be relatively straightforward.
Good luck!

How do I use the Groups.pm in Request Tracker?

In lib\RT\CustomFieldValues\ there is the groups.pm file which is supposed to be an example of how to get data into a custom field, but how do I actually use that once I have written it? Does anyone have any documentation or a sample of this?
I have finally figured it out, to use the Groups.pm module you need to go to /opt/rt3/etc and edit the RT_SiteConfig.pm and add the line
Set(#CustomFieldValuesSources, "RT::CustomFieldValues::Groups");
Restart Apache and it will be available as a new field source.
I have written a blog post on doing this which also includes details on how to build your own module in case anyone is interested in doing this: AD Lookup Control in Request Tracker