Hi,
I`m trying to use the dynamic client for Axis2 C and its failing to
create a Client with the axis2_svc_client_create_for_dynamic_invocation.
If I use the  xis2_svc_client_create to create a client it returns a
valid pointer so it doesn`t seem to be the client path. However I have
no idea how to get error messages back and can`t find any documentation
on how to do this. So does any one know how to retrieve error
messages????

I`ve been basing my code on the dynamic calculator sample.

I`m wondering wether Axis2 C dynamic client code is in a good state to
use or wether I should be using the Axis C dynamic client as its more
stable. Has any one had any experience of either??? 

Thanks

Darran
 
Heres the code from my class which creates the client:-

void AxisClient::initialise(const char* pszAxisXML)
{
           /* set up the envioronment with allocator and log*/
    m_pAllocator = axis2_allocator_init(NULL);
    m_pError = axis2_error_create(m_pAllocator);
    m_pLog = axis2_log_create(m_pAllocator, NULL, "addr_echo.log");
    m_pEnv = axis2_env_create_with_error_log(m_pAllocator,
m_pError,m_pLog);
    m_pEnv->log->level = AXIS2_LOG_LEVEL_DEBUG;
    axis2_error_init();
        
        if(!pszAxisXML)
        {
                m_pClient_home = AXIS2_GETENV("AXIS2C_HOME");
                if (!m_pClient_home || !strcmp (m_pClient_home,""))
                {
                        m_pClient_home = "../..";
                }
        }
        else
        {
                m_pClient_home = pszAxisXML;
        }
}

void AxisClient::execute(const char* service,
                                                const char* port,
                                                const char* operation,
                                                const char*
targetNamespace)
{
        //Create the service QName
        axis2_qname_t * pWsdl_svc_qname = 0;
        pWsdl_svc_qname = axis2_qname_create(m_pEnv,
service,targetNamespace, NULL);

        //Parse WSDL
        axis2_uri_t * pWsdl_uri = 0;
        pWsdl_uri = axis2_uri_parse_string(m_pEnv,m_pstrWsdlUri);

        //Create the client
        m_pSvc_client =
        axis2_svc_client_create_for_dynamic_invocation(
            m_pEnv, NULL, pWsdl_uri, pWsdl_svc_qname,service,
m_pClient_home);

        m_pSvc_client = axis2_svc_client_create(m_pEnv, client_home);

    if (!m_pSvc_client)
    {
        printf("Error creating service client, Please check AXIS2C_HOME
again\n");

        AXIS2_LOG_DEBUG(m_pEnv->log, AXIS2_LOG_SI, "Service client is
NULL");
    }
}
 
       This message may contain privileged and/or confidential information.  If 
you have received this e-mail in error or are not the intended recipient, you 
may not use, copy, disseminate or distribute it; do not open any attachments, 
delete it immediately from your system and notify the sender promptly by e-mail 
that you have done so.  Thank you.

Reply via email to