axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacc...@petrobras.com.br
Subject Re: Can an element name begin with numbers?
Date Tue, 22 Jul 2003 12:12:15 GMT

No, it must not. See the XML spec, in production rule for NAME. First
character must be "alphabetic", although you can use any script supported
by Unicode. But you cannot use numbers from any script.
Just put some prefix befor the element name, say "n".
It doesn't matter which namespace you use. QNAME (qyualified names) use the
NAME production, so don't even try.
=============================================
Marcelo Jaccoud Amaral
Petrobras - TI - Neg├│cios Eletr├┤nicos
mailto:jaccoud [at] petrobras.com.br
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=============================================
There are only 10 kinds of people in the world: those who understand binary
and those who don't.



                                                                                         
                      
                      Colin Ma                                                           
                      
                      <colin.ma@medimpa        Para:     "'axis-user@ws.apache.org'" <axis-user@ws.apache.org>
 
                      ct.com>                  cc:       (cco: Marcelo Jaccoud Amaral/RJ/Petrobras)
            
                                               Assunto:  Can an element name begin with numbers?
               
                      2003-07-21 20:57                                                   
                      
                      Favor responder a                                                  
                      
                      axis-user                                                          
                      
                                                                                         
                      
                                                                                         
                      




Hi there,

I am a newbie to AXIS and SOAP.  I just ran into a rather simple problem
and
I hope some of you there have the answers. I appreciate it if you can shed
light on the problem.

Here is the problem: I have a SOAP message which uses element names
begining
with numbers. I believe it causes the parsing to fail. Below are the SOAP
message and the error message.

Can someone tell me know to work around it, supposed that the element name
has to begin with numbers? (By the way XML-RPC accepts it without
problems).

Many thanks.

Colin Ma
MedImpact


Following is the message:
HTTP/1.0 200 OK Server: Resin/2.1.9 Content-Type: text/xml; charset=UTF-8
Date: Mon, 21 Jul 2003 23:19:19 GMT  <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="salesforce" xmlns:types="salesforce/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
   <soap:Header/>
   <soap:Body>
      <return>
         <value xsi:type="tns:array">
            <valueMap xsi:type="tns:map">
               <type xsi:type="xsd:string">Test</type>
               <contactID xsi:type="xsd:string">00330000000v58X</contactID>
               <caseNumber xsi:type="xsd:string">00004277</caseNumber>
               <00N30000000bnSZ
xsi:type="xsd:string">Marketing</00N30000000bnSZ>
               <ownerID xsi:type="xsd:string">00530000000bpXP</ownerID>
               <id xsi:type="xsd:string">5003000000093Fr</id>
            </valueMap>
         </value>
      </return>
   </soap:Body></soap:Envelope>

Here is the error message I got with AXIS 1.1.
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXParseException: The content of elements must
consist of well-formed character data or marku
p.
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:
org.xml.sax.SAXParseException: The content of elements must consist of
well-formed character data or markup.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon

textImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at
salesforce.SalesforceConnectorBindingStub.query(SalesforceConnectorBindingSt

ub.java:439)
        at salesforce.TestCase.myTest(TestCase.java:99)
        at salesforce.TestCase.main(TestCase.java:118)






Mime
View raw message