Wrapper vs Bare (Non-wrapper)

本文探讨了JAX-WS中的Wrapper和Bare两种代码组织方式。这两种方式影响SOAP消息如何映射到Java方法,Wrapper通过根元素名称查找方法,而Bare则依据参数类型进行匹配。

Wrapper和Bare不是WSDL定义的某种标准,而是JAX-WS和JAX-RPC定义的两种代码组织方式。只有document/literal才有Wrapper和Bare的形式,RPC不存在这种分别。

document/literal/wrapper

document/literal/bare

RPC/literal - 这种方式是WS-I BP支持的,但是在实际使用中已经不推荐了。


同样一个WSDL定义文件可以同时生成Wrapper和Bare方式的两套代码。它们的差别只在代码的格式上。参见JAX-WS 2.0 specification 2.3.1.3 Example 或如下代码。对于Wrapper方式,JAX-WS通过SOAP消息中root element的名字来查找方法(它们的名字必须是一致的),而Bare方式则是通过方法参数的类型来匹配的。通过Bare方式匹配的方法的参数必须和SOAP消息里的XML binding的数据类型是一致的。所以Wrapper方式不支持在SEI (Service Endpoint Interface) 中有Overloaded的方法(同名不同参数),而Bare方式同样不支持SEI中有同参数不同名的方法。


<!-- WSDL extract -->
<types>

<xsd:element name="setLastTradePrice">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="tickerSymbol" type="xsd:string"/>

<xsd:element name="lastTradePrice" type="xsd:float"/>

</xsd:sequence>

</xsd:complexType>

 </xsd:element>

 <xsd:element name="setLastTradePriceResponse">

 <xsd:complexType>

 <xsd:sequence/>

 </xsd:complexType>

 </xsd:element>

 </types>


 <message name="setLastTradePrice">

 <part name="setLastTradePrice" element="tns:setLastTradePrice"/>

 </message>


 <message name="setLastTradePriceResponse">

 <part name="setLastTradePriceResponse" element="tns:setLastTradePriceResponse"/>

 </message>

 <portType name="StockQuoteUpdater">

 <operation name="setLastTradePrice">

 <input message="tns:setLastTradePrice"/>

 <output message="tns:setLastTradePriceResponse"/>

 </operation>

 </portType>


 // non-wrapper style mapping
 SetLastTradePriceResponse setLastTradePrice(
 SetLastTradePrice setLastTradePrice);


 // wrapper style mapping
 void setLastTradePrice(String tickerSymbol, float lastTradePrice);


http://myarch.com/wrappernon-wrapper-web-service-styles-things-you-need-to-know


──(root㉿kali)-[/home/hgy/sqlsucai] └─# cat /home/hgy/sqlsucai/hr.sql | sudo docker exec -i mysql5.7 mysql -uroot -p 123456 hr mysql Ver 14.14 Distrib 5.7.44, for Linux (x86_64) using EditLine wrapper Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Usage: mysql [OPTIONS] [database] -?, --help Display this help and exit. -I, --help Synonym for -? --auto-rehash Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash. (Defaults to on; use --skip-auto-rehash to disable.) -A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. --auto-vertical-output Automatically switch to vertical output mode if the result is wider than the terminal width. -B, --batch Don't use history file. Disable interactive behavior. (Enables --silent.) --bind-address=name IP address to bind to. --binary-as-hex Print binary data as hex --character-sets-dir=name Directory for character set files. --column-type-info Display column type information. -c, --comments Preserve comments. Send comments to the server. The default is --skip-comments (discard comments), enable with --comments. -C, --compress Use compression in server/client protocol. -#, --debug[=#] This is a non-debug version. Catch this and exit. --debug-check This is a non-debug version. Catch this and exit. -T, --debug-info This is a non-debug version. Catch this and exit. -D, --database=name Database to use. --default-character-set=name Set the default character set. --delimiter=name Delimiter to be used. --enable-cleartext-plugin Enable/disable the clear text authentication plugin. -e, --execute=name Execute command and quit. (Disables --force and history file.) -E, --vertical Print the output of a query (rows) vertically. -f, --force Continue even if we get an SQL error. --histignore=name A colon-separated list of patterns to keep statements from getting logged into syslog and mysql history. -G, --named-commands Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default. -i, --ignore-spaces Ignore space after function names. --init-command=name SQL Command to execute when connecting to MySQL server. Will automatically be re-executed when reconnecting. --local-infile Enable/disable LOAD DATA LOCAL INFILE. -b, --no-beep Turn off beep on error. -h, --host=name Connect to host. -H, --html Produce HTML output. -X, --xml Produce XML output. --line-numbers Write line numbers for errors. (Defaults to on; use --skip-line-numbers to disable.) -L, --skip-line-numbers Don't write line number for errors. -n, --unbuffered Flush buffer after each query. --column-names Write column names in results. (Defaults to on; use --skip-column-names to disable.) -N, --skip-column-names Don't write column names in results. --sigint-ignore Ignore SIGINT (CTRL-C). -o, --one-database Ignore statements except those that occur while the default database is the one named at the command line. --pager[=name] Pager to use to display results. If you don't supply an option, the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default. -p, --password[=name] Password to use when connecting to server. If password is not given it's asked from the tty. -P, --port=# Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306). --prompt=name Set the mysql prompt to this value. --protocol=name The protocol to use for connection (tcp, socket, pipe, memory). -q, --quick Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file. -r, --raw Write fields without conversion. Used with --batch. --reconnect Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default. (Defaults to on; use --skip-reconnect to disable.) -s, --silent Be more silent. Print results with a tab as separator, each row on new line. -S, --socket=name The socket file to use for connection. --ssl-mode=name SSL connection mode. --ssl Deprecated. Use --ssl-mode instead. (Defaults to on; use --skip-ssl to disable.) --ssl-verify-server-cert Deprecated. Use --ssl-mode=VERIFY_IDENTITY instead. --ssl-ca=name CA file in PEM format. --ssl-capath=name CA directory. --ssl-cert=name X509 cert in PEM format. --ssl-cipher=name SSL cipher to use. --ssl-key=name X509 key in PEM format. --ssl-crl=name Certificate revocation list. --ssl-crlpath=name Certificate revocation list path. --tls-version=name TLS version to use, permitted values are: TLSv1, TLSv1.1, TLSv1.2 --server-public-key-path=name File path to the server public RSA key in PEM format. --get-server-public-key Get server public key 指令格式错误码?
07-10
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) File D:\ANACONDA\Lib\site-packages\sympy\core\cache.py:72, in __cacheit.<locals>.func_wrapper.<locals>.wrapper(*args, **kwargs) 71 try: ---> 72 retval = cfunc(*args, **kwargs) 73 except TypeError as e: TypeError: unhashable type: 'numpy.ndarray' During handling of the above exception, another exception occurred: SympifyError Traceback (most recent call last) Cell In[15], line 59 57 X0 = np.array([[1],[1]]) 58 err = 1e-10 ---> 59 newton_iter(X0, err) Cell In[15], line 42, in newton_iter(X0, err) 39 while True: 40 # 得到两次迭代结果差值 41 X2 = X0 - X1 ---> 42 if sqrt(X2[0]**2 + X2[1]**2) <= err: 43 break 44 else: File D:\ANACONDA\Lib\site-packages\sympy\functions\elementary\miscellaneous.py:152, in sqrt(arg, evaluate) 68 """Returns the principal square root. 69 70 Parameters (...) 149 .. [2] https://en.wikipedia.org/wiki/Principal_value 150 """ 151 # arg = sympify(arg) is handled by Pow --> 152 return Pow(arg, S.Half, evaluate=evaluate) File D:\ANACONDA\Lib\site-packages\sympy\core\cache.py:76, in __cacheit.<locals>.func_wrapper.<locals>.wrapper(*args, **kwargs) 74 if not e.args or not e.args[0].startswith('unhashable type:'): 75 raise ---> 76 retval = func(*args, **kwargs) 77 return retval File D:\ANACONDA\Lib\site-packages\sympy\core\power.py:287, in Pow.__new__(cls, b, e, evaluate) 284 if evaluate is None: 285 evaluate = global_parameters.evaluate --> 287 b = _sympify(b) 288 e = _sympify(e) 290 # XXX: This can be removed when non-Expr args are disallowed rather 291 # than deprecated. File D:\ANACONDA\Lib\site-packages\sympy\core\sympify.py:528, in _sympify(a) 502 def _sympify(a): 503 """ 504 Short version of :fun
03-17
内容概要:本文介绍了基于贝叶斯优化的CNN-LSTM混合神经网络在时间序列预测中的应用,并提供了完整的Matlab代码实现。该模型结合了卷积神经网络(CNN)在特征提取方面的优势与长短期记忆网络(LSTM)在处理时序依赖问题上的强大能力,形成一种高效的混合预测架构。通过贝叶斯优化算法自动调参,提升了模型的预测精度与泛化能力,适用于风电、光伏、负荷、交通流等多种复杂非线性系统的预测任务。文中还展示了模型训练流程、参数优化机制及实际预测效果分析,突出其在科研与工程应用中的实用性。; 适合人群:具备一定机器学习基基于贝叶斯优化CNN-LSTM混合神经网络预测(Matlab代码实现)础和Matlab编程经验的高校研究生、科研人员及从事预测建模的工程技术人员,尤其适合关注深度学习与智能优化算法结合应用的研究者。; 使用场景及目标:①解决各类时间序列预测问题,如能源出力预测、电力负荷预测、环境数据预测等;②学习如何将CNN-LSTM模型与贝叶斯优化相结合,提升模型性能;③掌握Matlab环境下深度学习模型搭建与超参数自动优化的技术路线。; 阅读建议:建议读者结合提供的Matlab代码进行实践操作,重点关注贝叶斯优化模块与混合神经网络结构的设计逻辑,通过调整数据集和参数加深对模型工作机制的理解,同时可将其框架迁移至其他预测场景中验证效果。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值