Hello,
Does this set the client side port? i feel this is for setting the server 
end-point. Please correct me if i am wrong.

-Sanjay

--- In [email protected], "joe.fradley" <joe.frad...@...> wrote:
>
> --- In [email protected], "john.allan53" <john.allan53@> wrote:
> >
> > Hello,
> > Is there a way to specify the client port number in a gsoap
> > application or does it have to be ephemeral?
> >
> 
> Given you generated stubs with the c++ option "-i", then you can do
> the below to set the port as the 'end_point'.
> 
> int main(int argc, char * argv[])
> {
>    if(argc != 2)
>    {
>       printf("Error, no end point specified.\n");
>       printf("Usage: client end-point-url\n");
>       printf("example: client http://localhost:11976\n";);
>       exit(1);
>    }
> 
>    InspectionServerProxy s;
>    s.soap_endpoint = argv[1];
> 
>    printf("Server endpoint '%s'\n", s.soap_endpoint);
> 
>    double a = 30.0F;
>    double b = 50.0F;
>    double r = 0.0F;
>    if (s.add(a, b, r) == SOAP_OK)
>       std::cout << r << std::endl;
>    else
>       std::cout << s.soap_fault_string() << ": " <<
> s.soap_fault_detail() << std::endl;
>    return 0;
> }
>


Reply via email to