Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 9234 invoked from network); 10 Jul 2007 08:11:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2007 08:11:12 -0000 Received: (qmail 12183 invoked by uid 500); 10 Jul 2007 08:11:15 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 12029 invoked by uid 500); 10 Jul 2007 08:11:14 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 12018 invoked by uid 99); 10 Jul 2007 08:11:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2007 01:11:14 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.180.197.168] (HELO web45314.mail.sp1.yahoo.com) (68.180.197.168) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jul 2007 01:11:09 -0700 Received: (qmail 50200 invoked by uid 60001); 10 Jul 2007 08:10:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=vIya0UY7yDKjXt2jLfKNTquyyKcFLALtXU+OVQ/NYAUbsRGMV2pZgEhHeg1CFkqF4F30RO5InYYGrR3D/qcI8uaDuakblcVCfXwQ3ZpdVRpa2Kxm+AMLeFhJzqjbua8jGHsJx+Y1vvr66OpqLKyKhaZM4IsCE07u0EPgUIMhBns=; X-YMail-OSG: tLII4aEVM1nSUmxP.uSF9tum0eQXtgrz583_S9iUmnbdhPNC3dtKxl9a1g7mnRDAnFlWOQV90jHzzJmC8jLYp0Cp Received: from [220.248.0.189] by web45314.mail.sp1.yahoo.com via HTTP; Tue, 10 Jul 2007 01:10:48 PDT Date: Tue, 10 Jul 2007 01:10:48 -0700 (PDT) From: Kelvin Lin Subject: Re: How to get ordered namespace sequence, about the function "axutil_hash_find_entry" To: Apache AXIS C Developers List In-Reply-To: <873azxr5f6.fsf@etch.wso2.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1060252747-1184055048=:49318" Content-Transfer-Encoding: 8bit Message-ID: <859962.49318.qm@web45314.mail.sp1.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1060252747-1184055048=:49318 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Dinesh, Thank you for your reminder. I used tcpmon to moniter the soap message and found a weird result. Here is my whole code: axiom_node_t * build_om_payload_for_echo_svc2(const axutil_env_t *env) { axiom_node_t *echo_om_node = NULL; axiom_element_t* echo_om_ele = NULL; axiom_node_t* text_om_node = NULL; axiom_element_t * text_om_ele = NULL; axis2_char_t *om_str = NULL; /* the root layer */ axiom_node_t *envelope_node = NULL; axiom_element_t *envelope_ele = NULL; //axiom_namespace_t *ns1 = NULL; axis2_status_t status; /* the first layer */ axiom_node_t *body_node = NULL; axiom_element_t *body_ele = NULL; axiom_node_t *b0101_node = NULL; axiom_element_t *b0101_ele = NULL; axiom_node_t *b0201_node = NULL; axiom_element_t *b0201_ele = NULL; axiom_namespace_t *ns0 = NULL, *ns1 = NULL, *ns2 = NULL, *ns3 = NULL, *ns4 = NULL; ns0 = axiom_namespace_create(env, AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI, "SOAP-ENV"); ns1 = axiom_namespace_create(env, "http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC"); ns2 = axiom_namespace_create(env, "http://www.w3.org/1999/XMLSchema-instance", "xsi"); ns3 = axiom_namespace_create(env, "http://www.w3.org/1999/XMLSchema", "xsd"); ns4 = axiom_namespace_create(env, "http://stockquote", "ns1"); /* set root layer */ envelope_ele = axiom_element_create(env, NULL, "Envelope", ns0, &envelope_node); status = axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns1); printf("\n#############################%d#########################\n", status); axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns2); axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns3); axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns4); /* set first layer */ body_ele = axiom_element_create(env, envelope_node, "SOAP-ENV:Body", NULL, &body_node); b0101_ele = axiom_element_create(env, body_node, "ns1:getQuote", NULL, &b0101_node); b0201_ele = axiom_element_create(env, b0101_node, "ns1:symbol", NULL, &b0201_node); status = axiom_element_set_text(b0201_ele, env, "ABC", b0201_node); printf("\n#############################%d#########################\n", status); om_str = axiom_node_to_string(envelope_node, env); if (om_str) { printf("\nSending OM : %s\n", om_str); AXIS2_FREE(env->allocator, om_str); om_str = NULL; } return envelope_node; } I used printf to display om_str is: Sending OM : ABC But I used tcpmon to monitor is: ABC I want the exactly soap message is: IBM Why could be this? I have no any idea. How should I do, then I can get the soap message I want. Best regards. Kelvin.Lin Dinesh Premalal wrote: Kelvin, Please find my comments inline. Kelvin Lin writes: > > 1st, I don't know whether single squote "\'" will affect the soap message or > not. Because in the correct format, soap message uses double squote "\"". It > means xmlns:ns1 = "http://stockquote" not xmlns:ns1 = > 'http://stockquote'. I think single quote should not affect the soap message because it does not affect for welformness of the xml document. [1] > > 2nd, it is still in disorder sequence. Because I want get the soap message like > the following order: > > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http:// > www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema > " xmlns:ns1="http://stockquote"> > > It means ns xmlns:SOAP-ENV is in the first place, xmlns:SOAP-ENC in the second > place and xmlns:xsi in the third place. Please let me see what happen there, will get back to you soon. > > 3rd, in the server concole, there are some error infos for wrong soap message: > > [7/9/07 13:58:36:953 CST] 50d0aea1 WebServicesSe E > com.ibm.ws.webservices.engine.transport.http.WebServicesServlet WSWS3112E: > Error: Generating WebServicesFault due to missing SOAPAction. > [7/9/07 13:58:36:953 CST] 50d0aea1 WebServicesSe E > com.ibm.ws.webservices.engine.transport.http.WebServicesServlet TRAS0014I: The > following exception was logged WebServicesFault > faultCode: {http://websphere.ibm.com/webservices/}Client.NoSOAPAction > faultString: WSWS3147E: Error: no SOAPAction header! > faultActor: null > faultDetail: > WSWS3147E: Error: no SOAPAction header! Could you please show us transferred SOAP message, you can catch it using TCPMon tool. Seems some problem with SOAP message. > but return value of function axis2_svc_client_send_receive(svc_client, env, > payload) is NULL, meaning no getting any response even error > message. What does the log says? > > ##################################################### > > Then I used attribute apis like this to create soap message: I think this method is not correct, I'm afraid, axiom attributes does not intended to create namespaces. At the xml document object model level there are more details to handle in namespaces than in attributes. thanks, Dinesh 1.http://www.w3.org/TR/REC-xml-names/#sec-intro -- Dinesh Premalal http://xydinesh.wordpress.com/ GPG ID : A255955C GPG Key Finger Print : C481 E5D4 C27E DC34 9257 0229 4F44 266E A255 955C --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org --------------------------------- Need a vacation? Get great deals to amazing places on Yahoo! Travel. --0-1060252747-1184055048=:49318 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi Dinesh,
 
Thank you for your reminder.
 
I used tcpmon to moniter the soap message and found a weird result.
 
Here is my whole code:
 
axiom_node_t *
build_om_payload_for_echo_svc2(const axutil_env_t *env)
{
    axiom_node_t *echo_om_node = NULL;
    axiom_element_t* echo_om_ele = NULL;
    axiom_node_t* text_om_node = NULL;
    axiom_element_t * text_om_ele = NULL;
   
    axis2_char_t *om_str = NULL;
 /* the root layer */
 axiom_node_t *envelope_node = NULL;
 axiom_element_t *envelope_ele = NULL;
 //axiom_namespace_t *ns1 = NULL;
 axis2_status_t status;
 /* the first layer */
 axiom_node_t *body_node = NULL;
 axiom_element_t *body_ele = NULL;
 axiom_node_t *b0101_node = NULL;
 axiom_element_t *b0101_ele = NULL;
 axiom_node_t *b0201_node = NULL;
 axiom_element_t *b0201_ele = NULL;
 axiom_namespace_t *ns0 = NULL, *ns1 = NULL, *ns2 = NULL, *ns3 = NULL, *ns4 = NULL;
    ns0 = axiom_namespace_create(env, AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI, "SOAP-ENV");
    ns1 = axiom_namespace_create(env, "http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
    ns2 = axiom_namespace_create(env, "http://www.w3.org/1999/XMLSchema-instance", "xsi");
    ns3 = axiom_namespace_create(env, "http://www.w3.org/1999/XMLSchema", "xsd");
 ns4 = axiom_namespace_create(env, "http://stockquote", "ns1");
 
 /* set root layer */
 envelope_ele = axiom_element_create(env, NULL, "Envelope", ns0, &envelope_node);
 status = axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns1);
 printf("\n#############################%d#########################\n", status);
    axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns2);
 axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns3);
    axiom_element_declare_namespace(envelope_ele, env, envelope_node, ns4);

 /* set first layer */
 body_ele = axiom_element_create(env, envelope_node, "SOAP-ENV:Body", NULL, &body_node);
 
 b0101_ele = axiom_element_create(env, body_node, "ns1:getQuote", NULL, &b0101_node);
 b0201_ele = axiom_element_create(env, b0101_node, "ns1:symbol", NULL, &b0201_node); 
 status = axiom_element_set_text(b0201_ele, env, "ABC", b0201_node);
 printf("\n#############################%d#########################\n", status);
 

 om_str = axiom_node_to_string(envelope_node, env);
    if (om_str)
    {
        printf("\nSending OM : %s\n", om_str);
        AXIS2_FREE(env->allocator, om_str);
        om_str =  NULL;
    }
    return envelope_node;
}
 
I used printf to display om_str is:
 
Sending OM : <SOAP-ENV:Envelope xmlns:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1 = 'http://stockquote' xmlns:xsi = 'http://www.w3.org/1999/XMLSchema-instance' xmlns:SOAP-ENC = 'http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd = 'http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns1:getQuote><ns1:symbol>ABC</ns1:symbol></ns1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
But I used tcpmon to monitor is:
 
<soapenv:Envelope xmlns:soapenv = 'http://www.w3.org/2003/05/soap-envelope'><soapenv:Header></soapenv:Header><soapenv:Body xmlns:soapenv = 'http://www.w3.org/2003/05/soap-envelope'><SOAP-ENV:Envelope xmlns:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1 = 'http://stockquote' xmlns:xsi = 'http://www.w3.org/1999/XMLSchema-instance' xmlns:SOAP-ENC = 'http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd = 'http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns1:getQuote><ns1:symbol>ABC</ns1:symbol></ns1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope></soapenv:Body></soapenv:Envelope>
 
I want the exactly soap message is:
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:ns1="http://stockquote">
<SOAP-ENV:Body>
<ns1:getQuote>
<ns1:symbol>IBM</ns1:symbol> 
</ns1:getQuote>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Why could be this? I have no any idea. How should I do, then I can get the soap message I want.
 
Best regards.
 
Kelvin.Lin

Dinesh Premalal <xydinesh@gmail.com> wrote:
Kelvin,
Please find my comments inline.
Kelvin Lin writes:
>
> 1st, I don't know whether single squote "\'" will affect the soap message or
> not. Because in the correct format, soap message uses double squote "\"". It
> means xmlns:ns1 = "http://stockquote" not xmlns:ns1 =
> 'http://stockquote'.
I think single quote should not affect the soap message because it
does not affect for welformness of the xml document. [1]
>
> 2nd, it is still in disorder sequence. Because I want get the soap message like
> the following order:
>
> > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://
> www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema
> " xmlns:ns1="http://stockquote">
>
> It means ns xmlns:SOAP-ENV is in the first place, xmlns:SOAP-ENC in the second
> place and xmlns:xsi in the third place.
Please let me see what happen there, will get back to you soon.

>
> 3rd, in the server concole, there are some error infos for wrong soap message:
>
> [7/9/07 13:58:36:953 CST] 50d0aea1 WebServicesSe E
> com.ibm.ws.webservices.engine.transport.http.WebServicesServlet WSWS3112E:
> Error: Generating WebServicesFault due to missing SOAPAction.
> [7/9/07 13:58:36:953 CST] 50d0aea1 WebServicesSe E
> com.ibm.ws.webservices.engine.transport.http.WebServicesServlet TRAS0014I: The
> following exception was logged WebServicesFault
> faultCode: {http://websphere.ibm.com/webservices/}Client.NoSOAPAction
> faultString: WSWS3147E: Error: no SOAPAction header!
> faultActor: null
> faultDetail:
> WSWS3147E: Error: no SOAPAction header!
Could you please show us transferred SOAP message, you can catch it
using TCPMon tool. Seems some problem with SOAP message.
> but return value of function axis2_svc_client_send_receive(svc_client, env,
> payload) is NULL, meaning no getting any response even error
> message.
What does the log says?
>
> #####################################################
>
> Then I used attribute apis like this to create soap message:

I think this method is not correct, I'm afraid, axiom attributes does
not intended to create namespaces. At the xml document object model
level there are more details to handle in namespaces than in
attributes.

thanks,
Dinesh

1.http://www.w3.org/TR/REC-xml-names/#sec-intro
--
Dinesh Premalal
http://xydinesh.wordpress.com/
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257 0229 4F44 266E A255 955C

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org



Need a vacation? Get great deals to amazing places on Yahoo! Travel. --0-1060252747-1184055048=:49318--