我正在尝试将新的数据源mysql jdbc驱动程序添加到我的wildfly服务器
我创建了文件夹wildfly.xxx/modules/system/layers/base/com/mysql/main我这里有jdbc jar文件和module.xml
<module xmlns="urn:jboss:module:1.3" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.34-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
Run Code Online (Sandbox Code Playgroud)
然后将dataresource代码添加到standalone-full.xml(在datareources标记下)
<datasource jndi-name="java:jboss/datasources/MySQLDS" pool-name="MySQLDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver>MySQLDriver</driver>
<security>
<user-name>root</user-name>
<password></password>
</security>
</datasource>
Run Code Online (Sandbox Code Playgroud)
但是,当我去野生动物控制面板http://localhost:9990/console/
dataresource没有出现,我错过了什么?
我也试图从界面手动添加它我得到了这个错误
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "mysql")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
"rolled-back" => true
}
Run Code Online (Sandbox Code Playgroud) 此代码适用于Windows窗体:
string URI = "http://localhost/1/index.php?dsa=232323";
string myParameters = "";
using (WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string HtmlResult = wc.UploadString(URI, myParameters);
}
Run Code Online (Sandbox Code Playgroud)
但我想从Windows Phone 8发送http GET请求.在wp 8中没有方法UploadString()等等......
我正在尝试向get返回XML的服务器发出请求:
let text = "";
this.http.get('http://example.com', {headers : headers})
.map((res:Response) => res.text()).subscribe(data => text = data);
Run Code Online (Sandbox Code Playgroud)
但是,text变量是空字符串,如何检索纯文本以转换为XML或如何直接获取XML?