Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The following script segment
--------------------------------------------------------------------------
use SOAP::Lite +trace => [qw(method fault headers result debug)]; $uri = "http://webservice.proc.req.lbg.com/"; $proxy = "http://10.161.3.159/LBGRequestProcessorWEB/LBGOIMRequestPr +ocessorService"; @params = (SOAP::Data->name("arg0" => \SOAP::Data->value (SOAP::Data->name(actionType => ""), SOAP::Data->name(additionalOperationType =>""), SOAP::Data->name(originatingSystem => ""), SOAP::Data->name(recipientId => ""), SOAP::Data->name(requestId => ""), SOAP::Data->name(requestType => ""), SOAP::Data->name(resourceType => "") ), ), ); $method = SOAP::Data->name('processRequest') ->attr({xmlns => $uri}) ; $soap = SOAP::Lite -> uri($uri) -> on_action( sub { '' } ) -> proxy($proxy) ; $result = $soap->call($method => @params);
--------------------------------------------------------------------------

gives me this output

------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<processRequest xmlns="http://webservice.proc.req.lbg.com/">
<arg0>
<actionType xsi:type="xsd:string"/>
<additionalOperationType xsi:type="xsd:string"/>
<originatingSystem xsi:type="xsd:string"/>
<recipientId xsi:type="xsd:string"/>
<requestId xsi:type="xsd:string"/>
<requestType xsi:type="xsd:string"/>
<resourceType xsi:type="xsd:string"/>
</arg0>
</processRequest>
</SOAP-ENV:Body></SOAP-ENV:Envelope>



After playing about in SoapUI with this I've worked out that I need the output to be as below, specifically, the extra xmlns:web line and the subsequent web: prefix of the <processRequest> tags all in bold

Any help much appreciated

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:web="http://webservice.proc.req.lbg.com/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<web:processRequest>
<arg0>
<actionType xsi:type="xsd:string"/>
<additionalOperationType xsi:type="xsd:string"/>
<originatingSystem xsi:type="xsd:string"/>
<recipientId xsi:type="xsd:string"/>
<requestId xsi:type="xsd:string"/>
<requestType xsi:type="xsd:string"/>
<resourceType xsi:type="xsd:string"/>
</arg0>
</web:processRequest>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

In reply to SOAP call tweaks required by Mike_v

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found