cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in building xml string for SOAP lookup

Former Member
0 Kudos

Hi

I am encountering a very basic problem while trying to create this string variable in java - I get a syntax error - <b>"String literal is not properly closed by a double quote"</b>

pointing to my very first line

*******************************************************************************************

String soapXML = "<?xml version="\1.0\" encoding="\UTF-8\"?>

<ns0:LogToCentralMonitoring xmlns:ns0="\http://XXXXX.EI.CentralMonitoring\">

<ns0:MonitoringData>

<MON_EISLDCTLID>IN130.10</MON_EISLDCTLID>

<MON_ProgramID>IN130.10</MON_ProgramID>

<MON_ProcessID/>

<MON_ClientAlert>N</MON_ClientAlert>

<MON_MsgStartTimeStamp>03/30/2007 10:00:00</MON_MsgStartTimeStamp>

<MON_MsgEndTimeStamp>03/30/2007 10:00:00</MON_MsgEndTimeStamp>

<MON_MsgStatus>COMPLETED</MON_MsgStatus>

<MON_MsgStatusDescription/>

<MessageAttribute>

<Name/>

<Value/>

</MessageAttribute>

</ns0:MonitoringData>

</ns0:LogToCentralMonitoring>";

************************************************************************************

This is a call to a webservice method and got this xml string from the message mapping -test tab - source view - and wanted to use that to build the xml string

What am I missing syntactically here ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Here is the mistake:

String soapXML = "<?xml version=<b>\</b>"1.0\" encoding=<b>\</b>"UTF-8\"?>

<ns0:LogToCentralMonitoring xmlns:ns0=<b>\</b>"http://XXXXX.EI.CentralMonitoring\">

<ns0:MonitoringData>

<MON_EISLDCTLID>IN130.10</MON_EISLDCTLID>

<MON_ProgramID>IN130.10</MON_ProgramID>

<MON_ProcessID/>

<MON_ClientAlert>N</MON_ClientAlert>

<MON_MsgStartTimeStamp>03/30/2007 10:00:00</MON_MsgStartTimeStamp>

<MON_MsgEndTimeStamp>03/30/2007 10:00:00</MON_MsgEndTimeStamp>

<MON_MsgStatus>COMPLETED</MON_MsgStatus>

<MON_MsgStatusDescription/>

<MessageAttribute>

<Name/>

<Value/>

</MessageAttribute>

</ns0:MonitoringData>

</ns0:LogToCentralMonitoring>";

Regards,

Wojciech

Former Member
0 Kudos

Hi

Not sure where the mistake is - could you please highlight the problem area ?

Thanks.

Former Member
0 Kudos

Actually - the first line is :

String soapXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>

I am getting a syntax error in the above line - <b>String literal is not properly closed by a double quote</b>

Former Member
0 Kudos

how about second line, because there was also mistake. Use maybe some ide tool (.g. eclipse) than you will see what is wrong.

Regards,

Wojciech

Former Member
0 Kudos

Hi

I am using eclipse 3.2 - I am getting a syntax only in my first line - with the error message that the <b>String literal is not properly closed by the double quote.</b>

There seems to be no other errors.....as shown in Eclipse...

Former Member
0 Kudos

Hi,

Could you send me it to my email. You can see it in my profile. I'll check it and send you back correct version.

Regards,

Wojciech

Former Member
0 Kudos

Hi,

Something is strange, I did that in one line and everything was ok ;):

String soapXML = "

Regards,

Wojciech

Message was edited by:

Wojciech Gasiorowski

Former Member
0 Kudos

Thanks for your help - I will take this single string solution - !!! Full points awarded

Former Member
0 Kudos

Thanks.

Regards,

Wojciech

Answers (0)