function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SelvaSelva 

sfdc Control unable to update the universal characters!!!

Hi,
 
I've written a jpd file which reads a record from Oracle DB and update it in SFDC Contact object.
The record contains the universal characters! when i tried to call sfdc control's update method and it tried to parse the characters(other than English), it fired and thrown the following exception something like this:
 
External Service Response
Submitted at Fri Nov 14 21:54:11 IST 2008
External Service Failure: failed to convert DOM to SOAPEnvelope:java.io.IOException: error:weblogic.xml.stream.XMLStreamException: '<' expected [/?! -- [CDATA[ ] - with nested exception:
[Error at line:5 col:1021 '<' expected [/?! -- [CDATA[ ]]
 
Do i have to set the universal character code in SFDC or jpd code? Any thoughts?
 
Regards
 
SuperfellSuperfell
unicode is fully supported (unless you're on the na0 instance). there's very little to go on from the error message, can you capture your actual soap request and response.
SelvaSelva

Here is my actual SOAP request and response:-

Code:
Submitted at Sat Nov 22 10:43:52 IST 2008
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
<urn:sessionId>4e1200DR00000005KEE!AQkAQFSWhWVWh9usaKgycCO0Ps3S.Tbvr0PKcfbWlA_ona6ABo0dRpJauZBsDU3DLs98aP7BveiAf2a0qvHAeepfvjUwOr.p</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<SOAP-ENV:Body>
<urn1:update xmlns:urn="urn:sobject.enterprise.soap.sforce.com" xmlns:urn1="urn:enterprise.soap.sforce.com">
<urn1:sObjects xsi:type="urn:Contact">
<urn:Id>003R0000005jn5RIAQ</urn:Id>
<urn:AccountId>001R0000009uby6IAA</urn:AccountId>
<urn:Department>Directory of Employee Personal Information</urn:Department>
<urn:Email>1321@1212.com</urn:Email>
<urn:FirstName>FF3002</urn:FirstName>
<urn:LastName>LL3002</urn:LastName>
<urn:MobilePhone>+9797977997</urn:MobilePhone>
<urn:OwnerId>00530000000xZuBAAU</urn:OwnerId>
<urn:Phone>+2null</urn:Phone>
<urn:RecordTypeId>0124000000059h2AAA</urn:RecordTypeId>
<urn:Salutation xsi:nil="true"></urn:Salutation>
<urn:Title>test_job_tittle</urn:Title>
<urn:tfContactCategory__c>Sellside</urn:tfContactCategory__c>
<urn:tocContactStatus__c>Ex User</urn:tocContactStatus__c>
<urn:tocLanguage__c>Arabic (Eastern Mediterranean)</urn:tocLanguage__c>
<urn:tocLocalCity__c>さむら〼</urn:tocLocalCity__c>
<urn:tocLocalCountry__c>さむら〼</urn:tocLocalCountry__c>
<urn:tocLocalFirstName__c>さむら〼</urn:tocLocalFirstName__c>
<urn:tocLocalLastName__c>さむら〼</urn:tocLocalLastName__c>
<urn:tocLocalPostal__c>さむら〼</urn:tocLocalPostal__c>
<urn:tocLocalSalutation__c>さむら〼</urn:tocLocalSalutation__c>
<urn:tocLocalState__c>さむら〼</urn:tocLocalState__c>
<urn:tocLocalStreet__c>さむら〼</urn:tocLocalStreet__c>
<urn:tocSiebelId__c>1-1FOO2AU002</urn:tocSiebelId__c>
<urn:tocSourceSystem__c>SFDC</urn:tocSourceSystem__c>
<urn:tocTransactionId__c>1595935</urn:tocTransactionId__c>
<urn:tocFunction__c>Alternate Technical Contact</urn:tocFunction__c>
<urn:tocLegalConsent__c>Yest Specified</urn:tocLegalConsent__c>
<urn:tocFloor__c>North West Twin Tower twenty fifth floor</urn:tocFloor__c>
<urn:tocDirectMarketing__c>Yes</urn:tocDirectMarketing__c>
<urn:tocEndUserActivity__c>Cntrl Bank & Supranational S&T</urn:tocEndUserActivity__c>
<urn:tocAssetFocus__c>AM Balanced   Equity, FI & Cash</urn:tocAssetFocus__c>
</urn1:sObjects>
</urn1:update>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
 
External Service Response 
Submitted at Sat Nov 22 10:43:52 IST 2008
External Service Failure: failed to convert DOM to SOAPEnvelope:java.io.IOException: error:weblogic.xml.stream.XMLStreamException: Got character[0] expected a valid XML character - with nested exception: 
[Error at line:5 col:888 Got character[0] expected a valid XML character]
 
 


 

Any thoughts?
SuperfellSuperfell
None of the &s appear to be correctly encoded. Do you have a capture of the actual SOAP response from SFDC? do you have the HTTP header to go with your request? what character encoding is it claiming ?
SelvaSelva

Hi Simon,

I really don't know how to capture the request & response from SFDC! :-( I am running the JPD file instance on IE and get the SOAP req and response.I could see the exception on Weblogic console as well.when i call sfdcCtrl.update method , it thrown the below exception on weblogic.

Code:
<Nov 22, 2008 10:40:51 AM IST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:
\bea\weblogic81\server\lib\DemoTrust.jks.>
<Nov 22, 2008 10:40:51 AM IST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:
\bea\JROCKI~1\jre\lib\security\cacerts.>
java.io.CharConversionException: Unconvertible UTF-8 character beginning with 0x80
        at weblogic.xml.babel.reader.XmlReader$Utf8Reader.read([CII)I(XmlReader.java:732)
        at weblogic.xml.babel.reader.XmlReader.read([CII)I(XmlReader.java:492)
        at weblogic.xml.babel.scanner.ScannerState.read()V(ScannerState.java:396)
        at weblogic.xml.babel.scanner.ScannerState.checkedRead()V(ScannerState.java:606)
        at weblogic.xml.babel.scanner.CharData.read()Z(CharData.java:65)
        at weblogic.xml.babel.scanner.Scanner.startState()V(Scanner.java:288)
        at weblogic.xml.babel.scanner.Scanner.scan()Lweblogic.xml.babel.scanner.Token;(Scanner.java:176)
        at weblogic.xml.babel.baseparser.BaseParser.accept()V(BaseParser.java:511)
        at weblogic.xml.babel.baseparser.BaseParser.accept(I)V(BaseParser.java:488)
        at weblogic.xml.babel.baseparser.EndElement.parse(Lweblogic.xml.babel.baseparser.BaseParser;)V(EndElement.java:34)
        at weblogic.xml.babel.baseparser.BaseParser.parseElement()Lweblogic.xml.babel.baseparser.Element;(BaseParser.java:4
45)
        at weblogic.xml.babel.baseparser.BaseParser.parseSome()Lweblogic.xml.babel.baseparser.Element;(BaseParser.java:318)

        at weblogic.xml.babel.parsers.XMLInputStreamParser.internalParseSome()Lweblogic.xml.babel.baseparser.Element;(XMLIn
putStreamParser.java:124)
        at weblogic.xml.babel.parsers.XMLInputStreamParser.streamParseSome()Z(XMLInputStreamParser.java:139)
        at weblogic.xml.babel.stream.XMLInputStreamBase.peek()Lweblogic.xml.stream.XMLEvent;(XMLInputStreamBase.java:221)
        at weblogic.xml.stream.util.XMLInputStreamFilterBase.hasNext()Z(XMLInputStreamFilterBase.java:81)
        at weblogic.xml.xmlnode.XMLNode.readChildren(Lweblogic.xml.stream.XMLEvent;Lweblogic.xml.stream.XMLInputStream;)V(X
MLNode.java:972)
        at weblogic.xml.xmlnode.XMLNode.read(Lweblogic.xml.stream.XMLInputStream;)V(XMLNode.java:679)
        at weblogic.xml.xmlnode.XMLNode.readChildren(Lweblogic.xml.stream.XMLEvent;Lweblogic.xml.stream.XMLInputStream;)V(X
MLNode.java:981)
        at weblogic.xml.xmlnode.XMLNode.read(Lweblogic.xml.stream.XMLInputStream;)V(XMLNode.java:679)
        at weblogic.xml.xmlnode.XMLNode.readChildren(Lweblogic.xml.stream.XMLEvent;Lweblogic.xml.stream.XMLInputStream;)V(X
MLNode.java:981)
        at weblogic.xml.xmlnode.XMLNode.read(Lweblogic.xml.stream.XMLInputStream;)V(XMLNode.java:679)
        at weblogic.xml.xmlnode.XMLNode.readChildren(Lweblogic.xml.stream.XMLEvent;Lweblogic.xml.stream.XMLInputStream;)V(X
MLNode.java:981)
        at weblogic.xml.xmlnode.XMLNode.read(Lweblogic.xml.stream.XMLInputStream;)V(XMLNode.java:679)
        at weblogic.xml.xmlnode.XMLNode.readChildren(Lweblogic.xml.stream.XMLEvent;Lweblogic.xml.stream.XMLInputStream;)V(X
MLNode.java:981)
        at weblogic.xml.xmlnode.XMLNode.read(Lweblogic.xml.stream.XMLInputStream;)V(XMLNode.java:679)
        at weblogic.webservice.core.soap.SOAPEnvelopeImpl.processXMLInputStream(Lweblogic.xml.stream.XMLInputStream;)V(SOAP
EnvelopeImpl.java:199)
        at weblogic.webservice.core.soap.SOAPEnvelopeImpl.<init>(Ljava.io.InputStream;)V(SOAPEnvelopeImpl.java:138)
        at weblogic.webservice.core.soap.SOAPPartImpl.setContent(Ljavax.xml.transform.Source;)V(SOAPPartImpl.java:398)
        at com.bea.wlw.runtime.jws.call.SoapCall.setPayloadOnSOAPMessage()V(SoapCall.java:873)
        at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(Ljava.net.URL;Lcom.bea.wlw.runtime.core.dispatcher.Credentials;
)Lcom.bea.wlw.runtime.core.call.Response;(SoapHttpCall.java:108)
        at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(Lcom.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl;)Lcom.be
a.wlw.runtime.core.call.Response;(SoapHttpCall.java:80)
amount read:0inputBufferSize1280overflow256

regards


 

SuperfellSuperfell
Have never used WebLogic, so can't really help you unless you can show what's exactly going to/from over the wire. Its hard to get a feel from the stack trace below if its an error parsing the response, or if its trying to parse your request. certainly and unecoded & in the request like you showed is not valid XML and i would expect to see an XML parser error for that. Most character encoding issues in java are going to be from either wrong code reading data from a file, or that the HTTP request going out is in one encoding, but says its in a different encoding.

There are various SOAPDiagnostic tools that can help you capture the full HTTP request/response, try SOAPScope, tcpTrace, YATT, ethereal etc.
SelvaSelva

Hi Simon,

thanks for your hint. You are right. There was a problem in weblogic only not in SFDC.

I supposed to set the following value in the script which starts the weblogic server.

-Dweblogic.webservice.i18n.charset=utf-8

After i assigned the UTF-8 charset in the script and restarted the server, it does work! :-)

regards