- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Perl: how to passed the XML string into SOAP::...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 03:04 AM
тАО09-22-2008 03:04 AM
Perl: how to passed the XML string into SOAP::Data method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 03:47 AM
тАО09-22-2008 03:47 AM
Re: Perl: how to passed the XML string into SOAP::Data method
You might begin by reading the module's documentation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 04:53 AM
тАО09-22-2008 04:53 AM
Re: Perl: how to passed the XML string into SOAP::Data method
It really depends if and in what way you need to serialize your XML entity.
The general usage of class SOAP::Data can be viewed as usual by perldoc SOAP::Data
or here
http://search.cpan.org/~mkutter/SOAP-Lite-0.710.08/lib/OldDocs/SOAP/Lite.pm#SOAP::Data
The easiest I would think was to use a WSDL file for the SOAP service you need to communicate with.
From own bad experience when I tried to communicate with an Apache Axis SOAP server I do remember that WSDL support in the old SOAP::Lite was barely existing or working at all.
Basically the SOAP::Lite modules was more or less only useful if you implemented server and client with this module while interoperability with newer SOAP services was really nerve wrecking.
I heard at this year's German Perl Workshop that Soap::Lite now has a new maintainer, viz. Martin Kutter who took over from Pavel Kulchenko.
Martin promised that he wants to overhaul the whole SOAP::Lite and provide it with working WSDL capability which should make the whole stuff a hell of a lot easier for the average module user.
On CPAN I found this module by him.
Maybe it is already usable?
You could give it a try and report.
http://search.cpan.org/dist/SOAP-WSDL/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 05:09 AM
тАО09-22-2008 05:09 AM
Re: Perl: how to passed the XML string into SOAP::Data method
I am using SOAP::Lite module for perl client which connect the web services.
I am using SOAP::Data method as :
"SOAP::Data->name('string')->value($XML)"for a method
Here $xml is a XML string, when i passed this parameter i got 400 bad error.if i used XML::Simple and XML::Dumper module which convert the xml string into perl data ,and use this perl data into the value of SOAP::Data,but i am not able to execute my method
So, can any idea about how to passed the "xml" string in above quotted method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 05:59 AM
тАО09-22-2008 05:59 AM
Re: Perl: how to passed the XML string into SOAP::Data method
>"SOAP::Data->name('string')->value($XML)"for a method
> Here $xml is a XML string
No, I don't think you are supposed to pass verbatim XML like that. The SOAP serializer is converting into valid XML for you.
SOAP::Data has accessor and mutator methods (or getters and setters if you prefer) which you would pass values like with any other Perl function. You haven't read perdoc SOAP::Data, have you?
As a sample I attached a snippet from said Apache Axis SOAP client I once wrote which shows how it worked for me rigging up an appropriate SOAP header.
This really looks ugly but I was forced to build up the complete entity like that with iterative tcpdumps from a working .Net SOAP client.
Normally you wouldn't want to do this but use a WSDL file, as did the colleague who wrote a .Net client which unlike mine for him worked out of the box.
But this was owe to SOAP::Lite's deficiencies because it came out too early and was implemented according to early SOAP standards nobody else seems to use anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 06:09 AM
тАО09-22-2008 06:09 AM
Re: Perl: how to passed the XML string into SOAP::Data method
I have never made use of this, that's why I didn't knew.
But as it reads in the POD, you have to make sure that the XML you pass is valid since the serializer won't do any checking of it.
COMPOSING MESSAGES USING RAW XML
In some circumstances you may need to encode a message using raw
unserialized XML text. To instantiate a SOAP::Data object using raw
XML, do the following:
$xml_content = ""; 123
$elem = SOAP::Data->type('xml' => $xml_content);
SOAP::Lite's serializer simple takes whatever text is passed to it,
and inserts into the encoded SOAP::Data element verbatim. The text
input is NOT validated to ensure it is valid XML, nor is the resulting
SOAP::Data element validated to ensure that it will produce valid XML.
Therefore, it is incumbent upon the developer to ensure that any XML
data used in this fashion is valid and will result in a valid XML
document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 11:53 PM
тАО09-22-2008 11:53 PM
Re: Perl: how to passed the XML string into SOAP::Data method
$result = $soap->call(SOAP::Data->name($strMethod)->attr({xmlns =>$uri . "/"})=>(
SOAP::Data->name('strClientId')->value($strClientId),
SOAP::Data->name('strSubjectPath')->value($strSubjectPath),
SOAP::Data->name('strQATestName')->value($strQATestName),
SOAP::Data->name('strFolderName')->value($strFolderName),
SOAP::Data->name('strXML')->value($xml_content),
SOAP::Data->name('blForce')->value($blForce),
SOAP::Data->name('blCreateFolder')->value($blCreateFolder)
)
);
thanks in advance..
raj