Thanks,
 
Hi, thanks for your reply,
This is how I convert the XML from a String to an OMElement.
Do you see anything wrong with it ?
 
public OMElement XMLStringToOMElement(String xml) throws
XMLStreamException, F
actoryConfigurationError
    {
        StringReader sr = new StringReader(xml);
        
        XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamRe
ader(sr); 
        StAXOMBuilder builder =
            new StAXOMBuilder(OMAbstractFactory.getOMFactory(), parser);

        OMElement documentElement = builder.getDocumentElement();
        
        return documentElement;
    }

Regards.

________________________________

From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: 15 January 2007 14:57
To: [email protected]
Subject: Re: unexpected xmlns:tns in soap response xml.


Giuseppe, 

if I'm right the xmlns:tns element value comes from the factory object
used to create the SOAP elements, while you get those numbers before and
after the SOAP message because you have the chunked option enabled in
axis2.xml (please check the transport out section).


Hope this helps,
Michele


On 15 Jan 2007, at 13:54, Giuseppe Sarno wrote:


        Hi I used Tcpmon:
         
        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build:
CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
        Set-Cookie: JSESSIONID=562AF18DB095A4637FCB5E666BAD1FD6; Path=/
        Content-Type: text/xml;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Mon, 15 Jan 2007 13:49:00 GMT
         
         
         
        144
         
        <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> 
        "><soapenv:Header /><soapenv:Body><samlp:x
xmlns:tns="http://<reverse>.<package <http://<reverse>.<package> >"
xmlns:samlp="ww"
xmlns="ff">blah</samlp:x></soapenv:Body></soapenv:Envelope>
         
        0
        
         
        (I also get those numbers 144 at the beginning of the SOAP
message and 0 at the end, what are those ?)
         
         
        XML I want to be sent back :
         
        <samlp:x xmlns:samlp="ww" xmlns="ff">blah</samlp:x>
        
         
        Many thanks.
        
         
         

________________________________

        From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
        Sent: 15 January 2007 13:32
        To: [email protected]
        Subject: Re: unexpected xmlns:tns in soap response xml.
        
        
        Hi Giuseppe, 

        try to post the full SOAP message please.


        Thanks,
        Michele


        On 15 Jan 2007, at 10:44, Giuseppe Sarno wrote:


                Hi,
                can anyone tell me at least if this could be a bug ? or
intended behaviour ?
                 
                Thanks.

________________________________

                From: Sarno, Giuseppe (MOP:GM15) 
                Sent: 13 January 2007 23:58
                To: [email protected]
                Subject: unexpected xmlns:tns in soap response xml.
                
                
                Hi,
                I'm using AXIOM and I have a basic client/server similar
to the one in the sample dir (quickstartaxiom)
                 
                the main difference is that I exchange request and
response XML reading then from a String (which I than convert in
OMElement and vice versa).
                 
                I noticed that in the response (at the client side)
along with the expected namespaces declaration, I get a
xmlns:tns="http//<package>.<directory>" in the root element which I
didn't put in my response XML at the Server side..
                 
                Does anyone know why ? 
                How can I get rid of it (as I don't want my
request/response to be changed by AXIS)?
                 
                regards.
                Giuseppe.



Reply via email to