- 浏览: 752144 次
- 性别:
- 来自: 上海
-
文章分类
- 全部博客 (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 1278http://bbs.csdn.net/topics/3902 ... -
一个基本问题关于引用的
2012-05-15 10:20 1140问: int a = 1; Integer b = new ... -
我對面向對象和過程的理解。
2012-05-02 08:30 1078我的一些理解。 面向过程,是对客观现象的描述,感觉是有一个上 ... -
stack and heap
2012-01-13 23:17 1060我觉得是根据应用方式 和本身特性 才将内存分区的,目的是提 ... -
program experience conclusion
2011-07-11 15:35 10801. check parameters for validit ... -
PreparedStatement's possible designated parameter
2011-04-29 13:45 1003though it's nearly impossible t ... -
clean Log4j
2011-04-12 11:19 1079import org.apache.log4j.BasicCo ... -
about abstract class
2011-04-02 10:34 885yes, we do know abstract class ... -
cvs operations on linux
2011-03-25 09:40 1027http://www.linuxhowtos.org/Syst ... -
regex to exchange two parts
2011-03-24 17:09 1113public class Test { public ... -
About the database locking
2011-03-09 11:02 980http://en.wikipedia.org/wiki/Lo ... -
About ShutDownDemo
2011-03-07 15:02 1001public class ShutdownDemo { p ... -
How do you know if an explicit object casting is needed
2011-02-24 16:33 1199通俗来讲,不可能将一只是猫的动物强转为狗 再说Graphic ... -
有关MimeUtility
2011-02-24 13:11 3380import java.io.UnsupportedEncod ... -
C#连接sql server 2008的一件2事
2011-02-24 09:01 2166once upon a time, i came upon o ... -
Shadowing, Overriding, Hiding and Obscuring
2011-02-22 15:15 1180当子类属性与父类属性重叠时 这种叫法上是shadowi ... -
JAXP usage
2011-02-16 16:07 1111import java.io.ByteArrayInputSt ... -
运行一个类,如果classpath中路径带空格就加双引号
2011-02-11 11:25 2815注意是这样加: java -cp .;"d:\my ... -
关于ClassPath中的current directory
2011-01-28 16:40 1164Given: 1. package com.company. ... -
文件内容操作batch
2011-01-27 16:36 1219I've learnt it from csdn qybao( ...
相关推荐
### Java How to Program, Early Objects, 11th Edition #### 核心知识点概览 本书《Java How to Program, Early Objects, 11th Edition》由Deitel出版社出版,是一本面向初学者和有一定编程基础的学习者介绍Java...
《Java How to Program》是一本深入浅出介绍Java编程语言的经典教材,由Deitel & Associates, Inc.出版。该书采用独特的“实战代码”方法,提供了大量的实际运行代码示例,帮助读者更好地理解和掌握Java编程的基本...
本书以初学者为起点,循序渐进地介绍了面向对象的Java编程语言,系统地讨论了Java的基本概念和编程技术。全书共分为18章,首先从基本的Java理论开始,讲解了Java的基本数据类型和控制结构,Java中的方法、数组和字符...
### Java How to Program (Late Objects) - 关键知识点解析 #### 一、书籍概述 《Java How to Program》(第十版,对象延迟版本)是一本经典的计算机编程教材,旨在为初学者提供系统全面的Java语言学习指导。本书...
java
《Java How to Program 9th》是一本专为初学者和有一定基础的程序员设计的Java编程教程,旨在全面深入地介绍Java编程语言。这个版本是该书的第九版,更新了最新的Java SE 11内容,确保读者能够掌握当前最前沿的编程...
《Java How to Program》第九版不仅仅是一本教授Java编程技巧的书籍,它还将编程技能与解决社会问题相结合。通过这本书,读者可以学习如何使用Java来编写与上述社会问题相关的应用程序。这种结合使得学生不仅能够...
How to invoke Java web service in ASP
Think Java: How to Think Like a Computer Scientist by Allen B. Downey, Chris Mayfield 2016 | ISBN: 1491929561 Currently used at many colleges, universities, and high schools, this hands-on ...
教材是java how to program,这是第一二章的英文ppt课件
Java How to Program, Early Objects, 11th Edition Java How to Program, Early Objects, 11th Edition Java How to Program, Early Objects, 11th Edition Java How to Program, Early Objects, 11th Edition
这个是合集~一般是这里最全的了 另外加的 PDF是英文的 .为 GCC4.1的HOWTO <br>目录 <br>ADSM-Backup-html<br>Advocacy<br>Automount-html<br>Battery-Powered-html<br>BootPrompt-HOWTO<br>Bridge-......
It introduces how to setup for OpenMP in Visual Studio 2005 with Inter Fortran 10.1. With a simple 'Hello world ' example
《Java How to Program》是Paul Deitel和Harvey Deitel两位作者合著的一本经典Java编程教程,已更新至第九版。这本书旨在帮助初学者掌握Java编程语言,并为有经验的程序员提供深入学习的资源。在第九版中,作者们...