axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <sam...@wso2.com>
Subject Re: How to get ordered namespace sequence, about the function "axutil_hash_find_entry"
Date Tue, 10 Jul 2007 01:20:48 GMT
Looking at the exception, it looks like the server is complaining on the 
SOAPAction. Can you please try to set the SOAPAction with the service 
client API?

Samisa...

Kelvin Lin wrote:
> Hi Dinesh,
>  
> Thanks for your reply and sorry for reply later.
>  
> I have tried used guththila parser via this config file:
>  
> ENABLE_SSL = 1
> ENABLE_LIBCURL = 0
> ENABLE_GUTHTHILA = 1
> ## LIBXML2_BIN_DIR = E:\libxml2-2.6.27.win32
> ICONV_BIN_DIR = E:\iconv-1.9.2.win32
> ZLIB_BIN_DIR = E:\zlib123-dll
> APACHE_BIN_DIR = "C:\Program Files\Apache Software Foundation\Apache2.2"
> LIBXSLT_BIN_DIR = E:\libxslt-1.1.19.win32
> APACHE_VERSION_IS_2_0_59 = 0
> OPENSSL_BIN_DIR = E:\OpenSSL
> ## LIBCURL_BIN_DIR = E:\libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib-1.2.3
> RELEASE_VER = 1.0.0
>  
> Building is smooth and I used the following apis:
>  
>     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);
>  
> get the following soap message:
>  
> Sending OM : <SOAP-ENV:Envelope xmlns:SOAP-ENV = 
> 'http://schemas.xmlsoap.org/soa
> p/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><n
> s1:symbol>IBM</ns1:symbol></ns1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope>
>  
> There are 3 problems:
>  
> 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 
> <http://stockquote>" not xmlns:ns1 = 'http://stockquote'.
>  
> 2nd, it is still in disorder sequence. Because I want get the soap 
> message like the following order:
>  
> <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">
>  
> 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.
>  
> 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!
>  at 
> com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.getSoapAction(WebServicesServlet.java:1162)
>  at 
> com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:878)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at 
> com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at 
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
>  at 
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
>  at 
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
>  at 
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
>  at 
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
>  at 
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
>  at 
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
>  at 
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
>  at 
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
>  at 
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
>  at 
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
>  at 
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
>  at 
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
>  at 
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
>  at 
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
>  at 
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
>  at 
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
>  at 
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
>  at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
> .
>                                  WebServicesFault
>  faultCode: {http://websphere.ibm.com/webservices/}Client.NoSOAPAction
>  faultString: WSWS3147E: Error: no SOAPAction header!
>  faultActor: null
>  faultDetail:
>  
> but return value of function axis2_svc_client_send_receive(svc_client, 
> env, payload) is NULL, meaning no getting any response even error message.
>  
> #####################################################
>  
> Then I used attribute apis like this to create soap message:
>  
>  envelope_ele = axiom_element_create(env, NULL, "SOAP-ENV:Envelope", 
> NULL, &envelope_node);
>  axiom_attribute_t *a1;
>  a1 = axiom_attribute_create(env, "xmlns:soap-env", 
> "http://schemas.xmlsoap.org/soap/envelope/", NULL);
>  status = axiom_element_add_attribute(envelope_ele, env, a1, 
> envelope_node);
>  
>  axiom_attribute_t *a2;
>  a2 = axiom_attribute_create(env, "xmlns:soap-enc", 
> "http://schemas.xmlsoap.org/soap/encoding/", NULL);
>  status = axiom_element_add_attribute(envelope_ele, env, a2, 
> envelope_node);
>  
>  axiom_attribute_t *a3;
>  a3 = axiom_attribute_create(env, "xmlns:xsi", 
> "http://www.w3.org/1999/xmlschema-instance", NULL);
>  status = axiom_element_add_attribute(envelope_ele, env, a3, 
> envelope_node);
>  axiom_attribute_t *a4;
>  a4 = axiom_attribute_create(env, "xmlns:xsd", 
> "http://www.w3.org/1999/xmlschema", NULL);
>  status = axiom_element_add_attribute(envelope_ele, env, a4, 
> envelope_node);
>  axiom_attribute_t *a5;
>  a5 = axiom_attribute_create(env, "xmlns:ns1", "http://stockquote", NULL);
>  status = axiom_element_add_attribute(envelope_ele, env, a5, 
> envelope_node);
>  
> It even get guththila exception like:
>  
> Throws guththila_exception       
> ..\..\guththila\src\guththila_xml_writer.c
>  355
> Throws guththila_exception       
> ..\..\guththila\src\guththila_xml_writer.c
>  355
> Throws guththila_exception       
> ..\..\guththila\src\guththila_xml_writer.c
>  355
> Throws guththila_exception       
> ..\..\guththila\src\guththila_xml_writer.c
>  355
> Throws guththila_exception       
> ..\..\guththila\src\guththila_xml_writer.c
>  355
>  
> The sequence of ns is till in disorder like:
>  
> Sending OM : <SOAP-ENV:Envelope xmlns:xsi = 
> "http://www.w3.org/1999/xmlschema-in
> stance" xmlns:soap-enc = "http://schemas.xmlsoap.org/soap/encoding/" 
> xmlns:soap-
> env = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd = 
> "http://www.w3.org
> /1999/xmlschema" xmlns:ns1 = 
> "http://stockquote"><SOAP-ENV:Body><ns1:getQuote><n 
> <http://stockquote%22%3E%3CSOAP-ENV:Body%3E%3Cns1:getQuote%3E%3Cn>
> s1:symbol>IBM</ns1:symbol></ns1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope>
>  
> and return value of function axis2_svc_client_send_receive(svc_client, 
> env, payload) is still NULL while sever concole display the same error 
> message.
>  
> I used IBM websphere to construct my http server via this tutorial:
>  
> http://publib.boulder.ibm.com/infocenter/wsadhelp/v5r1m2/index.jsp?topic=/com.ibm.etools.webservice.was.creation.ui.doc/samples/sstockq.html
>  
> I am a chinese and not goot at English, so if any misunderstanding, 
> pls. feel free to tell me.
>  
> Thanks a lot.
>  
> Kelvin.Lin
>
> */Dinesh Premalal <xydinesh@gmail.com>/* wrote:
>
>     Hi Kelvin,
>
>     Kelvin Lin writes:
>     > So I have to follow the sequence of namespace exactly.
>     >
>     > If I would like to meet this target, it does whether mean I have
>     to modify
>     > underline XML parser layer, like libxml, not Axis2/C source code
>     > itself?
>     Yes it is parser abstraction layer, To be precise I would say it is a
>     part of Axis2/C code.[1]
>
>     If you don't have a libxml2 dependency please try to use Axis2/C with
>     guththila parser and see whether it fix your problem[2].
>
>     thanks,
>     Dinesh
>
>     1.http://svn.apache.org/repos/asf/webservices/axis2/trunk/c/axiom/src/parser/libxml2/
>     2.http://svn.apache.org/repos/asf/webservices/axis2/trunk/c/INSTALL
>     -- 
>     Dinesh Premalal
>     http://feeds.feedburner.com/Dinesh
>     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
>
>
> ------------------------------------------------------------------------
> We won't tell. Get more on shows you hate to love 
> <http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265>
> (and love to hate): Yahoo! TV's Guilty Pleasures list. 
> <http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265> 


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


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


Mime
View raw message