Home > Software engineering >  Why was very simple function declarations, with wsdl2h. Exe generated after becoming very complicate
Why was very simple function declarations, with wsdl2h. Exe generated after becoming very complicate

Time:10-02

This step:
Write a header file server. H:
Int ns__add (int num1, int num2, int * sum);

Generated with soapcpp2. Exe files related, which contains a ns. WSDL

With wsdl2h - s - o service. H D: \ \ ns XXX WSDL (I don't know this right in gourd painting gourd ladle)
Generate the result of that service. H became so

 
Int __ns1__add (
Ns2__add _ns2__add * and///& lt; The Input parameter
_ns2__addResponse & amp; Ns2__addResponse///& lt; The Output parameter
);
The class _ns2__add
{public:
///Element "num1" of XSD type xs: int.
Int num1 1;///& lt; The Required element.
///Element "num2" of XSD type xs: int.
Int num2 1;///& lt; The Required element.
///A handle to the soap struct context that manages this instance when instantiated by A context or NULL otherwise (automatically set).
Struct soap soap *;
};
The class _ns2__addResponse
{public:
///Element "of" the sum of the XSD type xs: int.
Int * sum 0;///& lt; Optional element.
///A handle to the soap struct context that manages this instance when instantiated by A context or NULL otherwise (automatically set).
Struct soap soap *;
};


A function is why it is very simple, but is packaged as this? If I use this header file soapcpp2. Exe files generated and certainly before use for server h is not the same, most of the last call you don't succeed.
The way I generated header file is wrong?

CodePudding user response:

I have this problem, the estimate is the survival of the WSDL file cannot be used, do not know the landlord to solve

CodePudding user response:

Generate rules is like this, you don't need to entanglements these, do you want us to use other people's things, will follow the agreement of others

CodePudding user response:

Because of the need to serialization, etc., so will generate some data structure to be processed

CodePudding user response:

reference oyljerry reply: 3/f
because of the need to serialization, etc., so will generate some data structure to be processed


I change a bit. H file coding format, the//gsoap ns service encoding: Literal encoded instead, in this situation, the client to write, call, prompt the SOAP - ENV: [no subcode] Server, see BBS said port not corresponding, don't know what's problem

CodePudding user response:

You only. H file, do not implement the CPP file? Implementation of CPP function but also in the parameter list add a soap * t_soap parameter, this parameter is the incoming connection parameters, including ports,
You can refer to the http://blog.csdn.net/educast/article/details/12653069

CodePudding user response:

Actually this will not affect the Java client calls, no other, more tangled is why different encoding, with wsdl2h generated. H file is not the same?
Actually, I feel no wsdl2 generated. H file, directly with their definitions. H, directly generate c + + client code, complete c + + client,
And is released. H file localhoust to change the LAN IP
  • Related