Error when trying to read the SOAP Response

Hai,
iam trying to access the web service of DUBAI international Airport
GetFlightSchedulebyDateRange at http://dca.gov.ae/WebServices/Flights
This is my program
package MyClient3;
import java.io.FileOutputStream;
import java.net.URL;
import java.util.Iterator;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
public class Client3 {
public static void main(String arg[]){
try{
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage message = factory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
// header.detachNode();
SOAPFactory soapFactory = SOAPFactory.newInstance();
Name bodyName = soapFactory.createName("GetFlightSchedulebyDateRange",null,"http://dca.gov.ae/WebServices/Flights");
SOAPBodyElement bodyElement = body.addBodyElement(bodyName);
Name name = soapFactory.createName("Todate");
SOAPElement symbol = bodyElement.addChildElement(name);
//symbol.addTextNode("2007-05-25T00:00:00.0000000+04:00");
symbol.addTextNode("2007-05-27");
name = soapFactory.createName("Fromdate");
symbol = bodyElement.addChildElement(name);
//symbol.addTextNode("2007-05-25T00:00:00.0000000+04:00");
symbol.addTextNode("2007-05-27");
MimeHeaders hd = message.getMimeHeaders();
hd.addHeader("SOAPAction", "http://dca.gov.ae/WebServices/Flights/GetFlightSchedulebyDateRange");
SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnectionFactory.createConnection();
message.writeTo(System.out);
System.out.println();
System.out.println(soapPart.toString());
String endpoint = "http://dubaiairport.com/dcaflightinfo/fis/flights.asmx?WSDL";
URL url = new URL(endpoint);
SOAPMessage response = connection.call(message, url);
response.writeTo(System.out);
SOAPPart part = response.getSOAPPart();
SOAPEnvelope env = part.getEnvelope();
connection.close();
System.out.println("\n\nIterating through the response object to get the values:\n\n");
// SOAPBody se = response.getSOAPBody();
}catch(Exception e){System.out.println("+++++++++++++++++++++++++"+e);}
i am getting the error
ERROR: 'Character reference "&#x1B" is an invalid XML character.
in the statement
SOAPEnvelope env = part.getEnvelope();
can some help me to solve this problem, iam using JAX-WS 2.0, and netbeans

I got the solution, there was a Invalid char in SOAP response message, i stored the SOAP res msg to a file, parsed that file to remove the invalid char , ans used the soap msg from the file,
it worked perfectly fo me

Similar Messages

  • I'm getting a -2003F error when trying to run the internet recovery after installing a new hard disk in my macbook pro, any suggestions?

    After installing a new hard drive in my 2011 macbook pro, I'm getting a apple.com/support -2003F error when trying to run the internet recovery.  Any suggestions?

    Did you format the new HDD?  What is the status of the old HDD?
    Do you have an early or late 2011 MBP?
    Ciao.

  • I keep getting an error when trying to receive the new update iOS7 on iPhone5.  Any suggestions?

    I keep getting an error when trying to receive the new update iOS7 on iPhone5.  Any suggestions?

    Do the update using iTunes on your computer.
    Plug your iPhone into iTunes (current version), let it sync, then click "Check for Updates" on the iPhone's summary page in iTunes.

  • I am getting an error when trying to download  the new Game of Thrones shows. The error is err = -61 You do not have the privilege to make changes. (err = -61) you do not have the privilege  to make changes. I have not had this problem before

    I am getting an error when trying to download  the new Game of Thrones shows. The error is err = -61 You do not have the privilege to make changes. (err = -61) you do not have the privilege  to make changes. I have not had this problem before

    Solution:
    Open Disk Utility.
    Select your external hard disk and run a “verify” on it. After a few minutes (depending on the size of your drive), you should be good to go. You don’t need to run a “repair” on it... (at least I didn’t have to). See photo for reference.
    This should fix the permissions issue, because on my Mac running Mountain Lion I was unable to edit the permissions in the get info dialog window even after "unlocking" the drive.

  • "please use setup.exe for installati​on instead of blackberry desktop software.m​si" error when trying to install the software through 610_b038_m​ultilangua​ge.exe

    "please use setup.exe for installation instead of blackberry desktop software.msi" error when trying to install the software through 610_b038_multilanguage.exe
    I need to install this so that i can transfer my contacts and calendar to my laptop

    Hi and Welcome to the Community!
    Sorry to be dense, but what happens when you do exactly as the message instructs?
    Thanks!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT4796 I keep getting a Windows Mail error when trying to run the assistant on my pc, but I don't have any email programs open.

    I keep getting a Windows Mail error when trying to run the assistant on my pc, but I don't have any email programs open.

    You could of course use Safari your default browser as a quick method of accessing gmail until you figure out the Firefox problem. (More than one browser may be used on a Mac or other computer).
    Is this the only site you have problems with ? and does Safari work ok ?
    Often this problem requires the page to be reloaded
    * try pressing the shift key as you reload the page
    Another problem is sometimes the cookies for that site need clearing
    * see [[Delete cookies to remove the information websites have stored on your computer#w_delete-cookies-for-a-single-site]]_delete-cookies-for-a-single-site
    * see also [[Firefox and other browsers can't load websites]] or[[Firefox can't load websites but other browsers can]]

  • Has anybody gotten an error when trying to unzip the Encore Content zips file? How did you fix?

    Has anybody gotten an error when trying to unzip the Encore Content zips file? How did you fix?

    You may have a corrupt download... did you download again?

  • Error when trying to access the RBAC User editor and Message tracking

    Hi,
    I am getting an error when trying to access the RBAC User editor and Message tracking on the Web Mgmt interface. I verified that the admin account trying to access is in the Organization Management group and has the correct Role Assignment Policy applied.
    I searched through this thread below and saw that matching the msExchRoleLink and msExchUserLink attributes fixed the issue. 
    https://social.technet.microsoft.com/Forums/exchange/en-US/fc568cc6-8691-4127-b70b-bcc82f9b1f7f/first-2010-cas-server-no-administrator-rights-emc-permissions-gone?forum=exchange2010
    However I have another environment where this is not the case and works just fine; the msExchUserLink attribute has a value of CN=Organization Management,OU=Microsoft Exchange Security Groups,DC=Domain,DC=Local which is different as per the issue outlined in
    the above thread so I am not convinced that this will work and also don’t want to blindly edit something in adsiedit without being sure.
    I then checked the event logs on the server and saw the below error logged;
    Current user: 'Domain/Server Services Accounts/administrator'
    Request for URL 'https://server.domain.com/ecp/default.aspx?p=AdminDeliveryReports&exsvurl=1' failed with the following error:
    System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Exchange.Management.ControlPanel.UrlNotFoundOrNoAccessException: The page may not be available or you might not have permission to open the
    page. Please contact your administrator for the required credentials. For new credentials to take effect, you have to close this window and log on again.
       at Microsoft.Exchange.Management.ControlPanel._Default.CreateNavTree()
       at Microsoft.Exchange.Management.ControlPanel._Default.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       --- End of inner exception stack trace ---
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.default_aspx.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    Microsoft.Exchange.Management.ControlPanel.UrlNotFoundOrNoAccessException: The page may not be available or you might not have permission to open the page. Please contact your administrator for the required credentials. For new credentials to take effect, you
    have to close this window and log on again.
       at Microsoft.Exchange.Management.ControlPanel._Default.CreateNavTree()
       at Microsoft.Exchange.Management.ControlPanel._Default.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    I then had a look at the IIS permissions for ecp and owa. The account did not have permissions so I added them there but still got the same error. I’ve also tried all of the above with a newly-created account but still got the same issue.
    Any ideas as to what the above event log is specifically referring to?

    Hi,
    From your description, I would like to clarify the following thing:
    If you want to search message tracking logs, the account you use should be a member of the role groups below:
    Organization Management role group, Records Management role group, Recipient Management role group.
    Hope this can be helpful to you.
    Best regards,
    Amy Wang
    TechNet Community Support

  • I get an error when trying to open "The application Creative Cloud can't be opened. -1712

    I get an error when trying to open "The application Creative Cloud can't be opened. -1712

    The application Install.app can't be opened. -1712

  • Error when trying to refresh the current report-Invalid prompt def.WIS00005

    I am trying to create a Webi report using a Universe created with Universe Design Tool 4.0. I have created a new universe with a secured relational connection from a cube in our BBD system. The Universe can be created and exported in UDT (and when I test the connection, I get a message saying the server is responding). I can see values for the BEx query in BEx analyzer.
    When I open Webi and connect to a universe, I can see the universe, but when I put a dimension to our results tab and go to "run query", I first get the error "Error when trying to refresh the current report". If I close this error I get the error "Invalid Prompt Definiton - WIS00005". Has anybody else had this issue and if so, where can I begin to troubleshoot the error?

    Hi,
    Please note that if the object parses at Universe level it may still fail at runtime especially for the prompts.
    If you still experience the error after applying Patch 11 please analyze the characteristics of the prompt, get some trace logs with High level of detail, they surely  will help.
    Thanks!
    Best regards,
    Simone

  • Error when trying to start the ToolsAndFrameworks to access Endeca workbenc

    Hi All,
    I am getting the below error when trying to start the ToolsAndFrameworks.
    Starting Workbench (background process)
    The BASEDIR environment variable is not defined correctly
    This environment variable is needed to run this program
    Regards
    SK

    Hi SK,
    This occurs in those cases where the Endeca environment variables are not set properly. Make sure all the Endeca environment variables are set before starting the Tools services.
    Executing the 'mdex_setup_ini' and 'installar_sh.ini' will setup the Endeca environment variables. Below are the commands for the same.
    source /local/endeca/MDEX/6.3.0/mdex_setup_sh.ini
    source /local/endeca/PlatformServices/workspace/setup/installer_sh.ini
    HTH,
    Mahesh

  • Error when trying to refresh the current report

    I am having this error message "Error when trying to refresh the current report on my reports appear before they are executed. It has been a very random so I am unable to pinpoint what is causing it. I am currently working with BO 4.1 and it is connected to BW, whereby the authentication is SSO.
    Either way the reports are able to run with problems but I dislike having to insist with the refresh button or having to close and reopen the report for it to run as it should.
    I did some investigations but did not find anything conclusive because there is no problems with authorizations, there are no merged dimensions nor grouping variables used in the report and it is based on just one query.
    Does anyone know why this error message appears? What its cause is?

    Hi
    While creating the report if we select the authentication mode as :Use specified user name and password or Use Business Objects credential mapping, will get the same error.
    So if possible can you please test change Connection Type Authentication Mode to Single Sign on.
    Find the below link.
    http://scn.sap.com/community/semantic-layer/blog/2014/06/06/how-to-change-connection-type-authentication-mode-to-sso-1

  • Always getting a server error when trying to download the products

    I' always getting a server error when trying to download the products since yesterday, what can I do ?

    Try using a different browser

  • I get the following error when trying to use the itunes store "your apple id has been disabled"

    I get the following error when trying to use the itunes store "your apple id has been disabled".  My account was disabled when someone else had been using it without my knowledge.  I changed my apple id password and the apple id is still fine, but itunes has it disabled.  I verified that the computer is authorized for this apple id.  What to do now?

    Welcome to the Apple Community.
    Contact Apple through iTunes Store Support

  • New computer with lightroom 5.7 installed old computer has 3.6 installed.The new version has a conflict when trying to read the external harddrives.Old sees it as drive (I) but new sees it as drive(E).When I try to rename external drive it comes up as LaC

    New computer with lightroom 5.7 installed old computer has 3.6 installed.The new version has a conflict when trying to read the external harddrives.Old sees it as drive (I) but new sees it as drive(E).When I try to rename external drive it comes up as LaCie (E) (I) so I cannot get it to change the name for lightroom to read it with all the previous edits-please help all advice appreciated.

    lotta stuff going on.  I'm in the office now and don't expect a client for about 45 minutes.  Want to walk thru this via skype or ichat?  email me directly if you do.  [email protected]
    If not, post back and I'll try and walk thru these things. 
    Also, if you want to email me the project, I'll see if I can open it here. 

Maybe you are looking for

  • In Payback for Encore CC, how do I get to go to a previous chapter?

    Up until using Adobe Encore CS3, when authoring, i was always able to access the previous asnd forward and l chapters easily.  Since Adobe Encore CS4, while accessing playback, the program easily will jump forward to any chapter, but when I want to g

  • HT201269 Syncing to wrong device

    how do i get back to setup assistant

  • What happened to linking to other slide decks in Keynote 6.0

    It appears that another bit of simple technology was removed from Keynote 6.0 - linking to other slide decks! This is a key advantage that PowerPoint has had. I really was hoping the same functionality would have been incorportated into the new Keyno

  • File Print in MS Word closes document without printing

    I am using a C8180 printer.  When I try to print from a MS Word document using "File > Print", it immediately closes the document, and does not print.  Clicking the printer icon in the menu bar works OK.  I do not have this problem with any other sof

  • How to extend analog line using VoIP with SPA8800

    I would like to use a SPA8800 to make an analog line available to a VoIP phone (because at the location of the phone only LAN is available and no phone line). This is, when the line rings, the VoIP phone should ring. It would be nice to have if the V