Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

cannot infer transport from URL: msg#00141

apache.webservices.axis-c.user

Subject: cannot infer transport from URL

Hi All,

       When i try to execute my webservice client program, it is giving the following error in the axis2 generated log file

        ----------
         PBS LOG file
        ------------
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(324) This handler is                        trying to added to system pre defined phases , but those                        handlers are already added to global chain which run                        irrespective of the service
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(324) This handler is                        trying to added to system pre defined phases , but those                        handlers are already added to global chain which run                        irrespective of the service
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(324) This handler is                        trying to added to system pre defined phases , but those                        handlers are already added to global chain which run                        irrespective of the service
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_resolver.c(231) module name is:addressing
[Mon Sep 24 23:15:24 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
[Mon Sep 24 23:15:24 2007] [error] xmltest.c(308) Stub invoke FAILED: Error code: 4 :: cannot infer transport from URL

 ------------My code ----------------

void createActivity()
{
        const axutil_env_t *env=NULL;
        const axis2_char_t *address=NULL;
        axis2_endpoint_ref_t *endpoint_reference=NULL;
        axis2_options_t *options=NULL;
        const axis2_char_t *client_home=NULL;
        axis2_svc_client_t *svc_client = NULL;
        axis2_op_client_t *op_client = NULL;
        axis2_op_t *op=NULL;

        /* Setup the environment */
       
        env = axutil_env_create_all("PBSHPCP.log",AXIS2_LOG_LEVEL_TRACE);
       
        /* Set end point reference of HPCP webservice */

        address="http://altair-winccss0/HPCBasicProfile";
        printf("Using Endpoint : %s \n", address);
       
        /* Create EPR with given address */
       
        endpoint_reference = axis2_endpoint_ref_create(env,address);
       
        /* Setup options */
       
        options = axis2_options_create(env);
        axis2_options_set_to(options,env,endpoint_reference);
        axis2_options_set_action(options,env,"http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity");
       
        axutil_property_t *server_certificate=axutil_property_create(env);
        axutil_property_set_value(server_certificate,env,axutil_strdup(env,"/home/murali/murali.cer"));
        axis2_options_set_property(options,env,"SERVER_CERT",server_certificate);
       
        /* Reading the Client Home from environment */
        client_home=AXIS2_GETENV("AXIS2C_HOME");
        if (!client_home || !strcmp (client_home, ""))
        client_home = "../..";

        /* Creating Service Client */
       
        svc_client = axis2_svc_client_create(env, client_home);
        if (!svc_client)
        {
                printf("Error creating service client, Please check AXIS2C_HOME again\n");
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
                " %d :: %s", env->error->error_number,
                AXIS2_ERROR_GET_MESSAGE(env->error));
                return -1;
        }
        /*      printf("Creating Operation Client : \n");
        op=axis2_op_create(env);
        op_client=axis2_op_client_create(env,op,svc_client,options);
        printf("Creating an envelope \n");
        axis2_msg_ctx_t *request = axis2_op_client_prepare_soap_envelope(op_client,env,activitydocument);
        printf("Sending SOAP response\n");
        axis2_status_t *status=axis2_op_client_execute(op_client,env,NULL);
        axis2_msg_ctx_t *response=axis2_op_client_two_way_send(env,request);
       
        printf("Completed sending the soap request");
        axiom_soap_envelope_t *ret = axis2_msg_ctx_get_soap_envelope(response,env);
        printf("SOAP response received \n"); */

        axiom_node_t *header_node=getHeaderNode(env);
        axis2_status_t *status = axis2_svc_client_add_header(svc_client,env,header_node);
        if(status==AXIS2_FAILURE)
        {
                printf("Unable to add the header");
                return -1;
        }
        else
        {
                printf (" \n Sucessfully Added the Header \n");
        }
        axiom_node_t *to_node=ToElement(env);
        status=axis2_svc_client_add_header(svc_client,env,to_node);
        if(status==AXIS2_FAILURE)
        {
                printf("Unable to add To element to the Header");
                return -1;
        }
        else
        {
                printf (" \n TO Element added sucessfully to Header \n");
        }
        axiom_node_t *payload=convertPBSToJSDL(env);
        axiom_node_t *ret=axis2_svc_client_send_receive(svc_client,env,payload);
        if(ret)
        {
                axis2_char_t *om_str=NULL;
                om_str = axiom_node_to_string(ret,env);
                if(om_str)
                {
                         printf("\nReceived OM : %s\n", om_str);
                         printf("\necho client invoke SUCCESSFUL!\n");

                        AXIS2_FREE(env->allocator, om_str);
                }        ret = NULL;

       }
       else
       {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
                " %d :: %s", env->error->error_number,
                AXIS2_ERROR_GET_MESSAGE(env->error));
                printf("echo client invoke FAILED!\n");

        }      

        if (svc_client)
        {
                 axis2_svc_client_free(svc_client, env);
                 svc_client = NULL;
        }

         if (env)
        {
                axutil_env_free((axutil_env_t *) env);
                env = NULL;
        }

    return 0;

}


Please check my code and let me know, if there are any mistakes in the program.

Thanks & Regards,

Murali Krishna K

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation