473,396 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Unable to redirect SOAP XML response into another file.

Hi All,

My aim is to redirect the XML Response into another file.

But i am not able to redirect the XML response into response.xml file.

I have written below script.
Expand|Select|Wrap|Line Numbers
  1. use Data::Dumper;
  2. $Data::Dumper::Terse  = 1;
  3. $Data::Dumper::Indent = 1;
  4. use SOAP::Lite +trace => 'debug';
  5.  
  6. @ARGV = qw[
  7.                 http://ind12:12359/updaeAccount?wsdl
  8.                 http://www.vbb.mcr.com/dp/ws/service
  9.           ];
  10.  
  11. my ( $proxy, $uri ) = ( shift, shift );
  12.  
  13. my $soap = SOAP::Lite->proxy($proxy)->on_fault( sub { } );
  14. $soap->readable(1);    #lifesaver
  15.  
  16. my $raw_xml = q~
  17.         <accountId>11</accountId>
  18. ~;
  19.  
  20. open(SOAPRES,">response.xml");
  21. my $res = $soap->UpdateAccount( SOAP::Data->type( 'xml' => $raw_xml ) );
  22. my $xml = $res->paramsallt;
  23. print SOAPRES $xml;
  24.  
  25. die join "\n", "--- SOAP FAULT ---", $res->faultcode, $res->faultstring, ''
  26.   if defined($res) && $res->fault;
  27.  
  28. die join "\n", "--- TRANSPORT ERROR ---", $soap->transport->status, ''
  29.   if !$soap->transport->is_success;
  30.  
  31. print STDERR join "\n", "--- SOAP RESULT ---", Dumper($res->paramsall), ''
  32.  

The SOAP response:
Expand|Select|Wrap|Line Numbers
  1.  <?xml version="1.0" encoding="UTF-8"?>
  2. <soap:Envelope
  3.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  5.   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6.   xmlns:tns="http://www.vbb.mcr.com/dp/ws/service"
  7.   soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  8.   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  9.  <soap:Body>
  10.   <UpdateAccount>
  11.       <accountId>1111</accountId>
  12.   </UpdateAccount>
  13.   </soap:Body>
  14.  </soap:Envelope>
  15.   SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
  16.   Connection: close
  17.   Server: Jetty(7.x.y-SNAPSHOT)
  18.   Content-Type: text/xml;charset=UTF-8
  19.   Client-Date: Thu, 09 Feb 2012 06:04:00 GMT
  20.   Client-Peer: 165.133.42.56:12359
  21.   Client-Response-Num: 1
  22.  
  23.   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:UpdateAccountResponse xmlns:ns2="http://vbb.mcr.com/dp/ws/service/customercare"><lifeEntry><lifeValidFrom>2011-02-13T01:50:43.188+01:00</lifeValidFrom><lifeValidTo>2011-02-13T01:50:43.188+01:00</lifeValidTo><lifeState>ACTIVE</lifeState><lifeSubState>STD</lifeSubState><lifeReasonCode>STD</lifeReasonCode><processed>true</processed></lifeEntry></ns2:UpdateAccountResponse></soap:Body></soap:Envelope>
Plese anybody resolve the issue.

Thanks,
DK
Feb 9 '12 #1
0 1456

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tim Mulholland | last post by:
I am trying to create an ASPX page that, based on QueryString inputs, returns another file, in this case a WMA file. I do not want to do this by redirect, because these files are not available...
2
by: hansiman | last post by:
Why can't I use Response.Redirect in a class.vb file? /M
4
by: Jit Prasad | last post by:
I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front end writen in VB.NET. The proxy class submits a soap request and gets a soap response. When I migrated the front-end...
4
by: Christian Wilhelm | last post by:
Hi! I have a Problem understanding the deserialisation of SOAP-Responses. The "normal" way, calling a XML WebService is to use WSDL 1) Send Request 2) Get SOAP-Response 3) With Informations...
2
by: Bob | last post by:
The .NET web service proxy class is great for transparent app process via SOAP calls. I have a need to log the raw SOAP response messages. Is there an easy way to do this? I saw there is already...
5
by: Robbert van Geldrop | last post by:
Hello, I have a problem consuming a WebService which appears to be dependent of the type of network I am on: The following SOAP response is not processed when I am connected over the internet...
3
by: André | last post by:
Hi, I want to include a graphic made in file2 into file. File must first send a value to file2 (with Response.Redirect) which will be used for the graphic. My problem is that only the graphic is...
2
by: andytaw | last post by:
Is there a way to achieve to following: 1) ASP page is loaded to client. 2) User submits form, requesting a file download 3) File is generated and written to response 4) User receives file, saves...
1
by: Bert Leu | last post by:
Hi I've got two questions to Soap unter VB.Net 1) if one creates a WebService with a method i.g. "MethodX" (with VB.Net), the Soap-Response looks like: <soap:Envelope...>...
0
by: Leafy | last post by:
Looks like it had to do with my breakpoints. It must have slowed my transaction time causing a timeout. It just appeared that SOAPUI wasn't returning a response. Thanks! Leafy --------- ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.