- 浏览: 747606 次
- 性别:
- 来自: 上海
-
文章分类
- 全部博客 (419)
- 杂软粉墨 (2)
- 创意灵感 (3)
- 经验记录 (137)
- 开源轨迹 (2)
- sip-communicator (2)
- 闲侃杂谈 (8)
- 问题交流 (24)
- 概念模式 (32)
- 难点备案 (5)
- JwChat (1)
- 中国象棋 (1)
- 教育探索 (6)
- 英语研究 (58)
- 星际争霸 (1)
- 电信知识 (1)
- 软件架构 (3)
- 哲学探索 (26)
- 算法灵魂 (8)
- 近视探索 (6)
- 数学数学 (3)
- 牛角钻尖 (23)
- 至强文言 (3)
- 数据结构 (1)
- 宇宙物理 (2)
- 网络架构 (3)
- 游戏领域 (4)
- 图形处理 (2)
- 修炼之路 (8)
- 读书天地 (20)
- 编解乱码 (2)
- 概念探索 (8)
- 格物致知 (1)
- 其它语言 (1)
- 测试领域 (3)
- 文化风流 (1)
- JQuery (1)
- 網頁領域 (1)
- Unix/Linux (1)
- Inside JVM (1)
- 异常分析 (1)
最新评论
-
suyujie:
引用
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
iamzhoug37:
您能说一下"局部变量不受文本顺序限制" 是 ...
声明前为什么能赋值却不能输出,都是使用
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.InetAddress; import java.net.Socket; public class PostXml { public static void main(String[] args) { String message = "<?xml version=\"1.0\" encoding=\"utf-8\"?><TaskManagerMessage><MessageID>71694280-28e0-4314-8351-f1793be7eef5</MessageID><MessageType>RequestDeptListQuery</MessageType><IsResponse>false</IsResponse><MessageSendTime>0001-01-01T00:00:00</MessageSendTime><Params><DeptType>1</DeptType><CurrentPage>1</CurrentPage><PageRows>10</PageRows></Params></TaskManagerMessage>"; message = message.replace("<", "<").replace(">", ">"); try { String xmldata = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<env:Envelope " + "env:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" " + "xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" " + "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + "<env:Header/>" + "<env:Body>" + "<WebserviceCrud xmlns=\"http://tempuri.org/\">" + "<strxml>" + message + "</strxml>" + "</WebserviceCrud>" + "</env:Body>" + "</env:Envelope>"; // Create socket String hostname = "172.31.20.53"; int port = 80; InetAddress addr = InetAddress.getByName(hostname); Socket sock = new Socket(addr, port); // Send header String path = "/webservice/Service.asmx"; BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(sock .getOutputStream(), "UTF-8")); // You can use "UTF8" for compatibility with the Microsoft virtual // machine. wr.write("POST " + path + " HTTP/1.1\r\n"); wr.write("Host: " + hostname + "\r\n"); wr.write("Content-Length: " + xmldata.length() + "\r\n"); wr.write("Content-Type: text/xml; charset=\"utf-8\"\r\n"); wr.write("\r\n"); // Send data wr.write(xmldata); wr.flush(); // Response BufferedReader rd = new BufferedReader(new InputStreamReader(sock .getInputStream())); String line; while ((line = rd.readLine()) != null) System.out.println(line); } catch (Exception e) { e.printStackTrace(); } } }
and here, you may find there's a node which has env as its part, is it a set one? no, it's not a set one, it's a self-defined name, like this:
String xmldata = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<soap:Envelope " + "soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" " + "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " + "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + "<soap:Header/>" + "<soap:Body>" + "<WebserviceCrud xmlns=\"http://tempuri.org/\">" + "<strxml>" + message + "</strxml>" + "</WebserviceCrud>" + "</soap:Body>" + "</soap:Envelope>";
change it to "soap", we can make it go too.
here's the essential:
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
发表评论
-
关于方法访问控制符protected
2012-11-29 10:38 1265http://bbs.csdn.net/topics/3902 ... -
一个基本问题关于引用的
2012-05-15 10:20 1126问: int a = 1; Integer b = new ... -
我對面向對象和過程的理解。
2012-05-02 08:30 1065我的一些理解。 面向过程,是对客观现象的描述,感觉是有一个上 ... -
stack and heap
2012-01-13 23:17 1051我觉得是根据应用方式 和本身特性 才将内存分区的,目的是提 ... -
program experience conclusion
2011-07-11 15:35 10631. check parameters for validit ... -
PreparedStatement's possible designated parameter
2011-04-29 13:45 988though it's nearly impossible t ... -
clean Log4j
2011-04-12 11:19 1066import org.apache.log4j.BasicCo ... -
about abstract class
2011-04-02 10:34 868yes, we do know abstract class ... -
cvs operations on linux
2011-03-25 09:40 1013http://www.linuxhowtos.org/Syst ... -
regex to exchange two parts
2011-03-24 17:09 1090public class Test { public ... -
About the database locking
2011-03-09 11:02 963http://en.wikipedia.org/wiki/Lo ... -
About ShutDownDemo
2011-03-07 15:02 983public class ShutdownDemo { p ... -
How do you know if an explicit object casting is needed
2011-02-24 16:33 1188通俗来讲,不可能将一只是猫的动物强转为狗 再说Graphic ... -
有关MimeUtility
2011-02-24 13:11 3363import java.io.UnsupportedEncod ... -
C#连接sql server 2008的一件2事
2011-02-24 09:01 2154once upon a time, i came upon o ... -
Shadowing, Overriding, Hiding and Obscuring
2011-02-22 15:15 1165当子类属性与父类属性重叠时 这种叫法上是shadowi ... -
JAXP usage
2011-02-16 16:07 1099import java.io.ByteArrayInputSt ... -
运行一个类,如果classpath中路径带空格就加双引号
2011-02-11 11:25 2806注意是这样加: java -cp .;"d:\my ... -
关于ClassPath中的current directory
2011-01-28 16:40 1153Given: 1. package com.company. ... -
文件内容操作batch
2011-01-27 16:36 1203I've learnt it from csdn qybao( ...
相关推荐
xhr.send(soapMessage); ``` 在这个例子中,我们创建了一个新的XMLHttpRequest对象,设置请求方法为POST,目标URL为SOAP服务地址,并指定了Content-Type为XML。然后,我们构建了一个SOAP消息,并在准备好后发送请求...
public void SendNotification(string message) { // 实现发送通知的逻辑 } } ``` 2. 实现通知发送: - 在`SendNotification`方法中,可以编写代码来处理实际的通知发送,这可能涉及到数据库操作、邮件发送...
in production environments and one that is recommended to be used in ; development environments. ; php.ini-production contains settings which hold security, performance and ; best practices at its ...
4. **向…问好** (Send one's love to sb., Give one's regards to sb.): 这是表达对他人问候的方式,通常用于信件或对话中。 5. **期末考试** (End-of-year exams): 学期结束时进行的评估学生学习成果的重要测试。...
1. Introduction to Zend Framework 1.1. 概述 1.2. 安装 2. Zend_Acl 2.1. 简介 2.1.1. 关于资源(Resource) 2.1.2. 关于角色(Role) 2.1.3. 创建访问控制列表(ACL) 2.1.4. 注册角色(Role) 2.1.5. 定义访问...