锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品aa,51一区二区三区,国产精品1区在线http://www.aygfsteel.com/xxgshxs/archive/2012/08/21/385925.html绱叞宸?/dc:creator>绱叞宸?/author>Tue, 21 Aug 2012 03:14:00 GMThttp://www.aygfsteel.com/xxgshxs/archive/2012/08/21/385925.htmlhttp://www.aygfsteel.com/xxgshxs/comments/385925.htmlhttp://www.aygfsteel.com/xxgshxs/archive/2012/08/21/385925.html#Feedback0http://www.aygfsteel.com/xxgshxs/comments/commentRss/385925.htmlhttp://www.aygfsteel.com/xxgshxs/services/trackbacks/385925.html闃呰鍏ㄦ枃
]]>- java Webservice:Dispatch鎿嶄綔SOAP澶存秷鎭?/title>http://www.aygfsteel.com/xxgshxs/archive/2012/08/14/385442.html绱叞宸?/dc:creator>绱叞宸?/author>Tue, 14 Aug 2012 01:07:00 GMThttp://www.aygfsteel.com/xxgshxs/archive/2012/08/14/385442.htmlhttp://www.aygfsteel.com/xxgshxs/comments/385442.htmlhttp://www.aygfsteel.com/xxgshxs/archive/2012/08/14/385442.html#Feedback1http://www.aygfsteel.com/xxgshxs/comments/commentRss/385442.htmlhttp://www.aygfsteel.com/xxgshxs/services/trackbacks/385442.html----------------------------------------------
----------------------------------------------
鏉ユ簮:鐖變笂123 鍘熸枃鍦板潃錛?a >http://www.ishang123.com/jishubowen/java/2012-08-14/137.html
package org.example.myservice;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import org.junit.Test;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class JunitTest
{
private String ns = "http://www.example.org/MyService/";
private String wsdlUrl = "http://10.10.9.208:8088/ms?wsdl";
@Test

public void testMessage()
{
//1錛屽垱寤烘秷鎭伐鍘?nbsp;

try
{
MessageFactory factory=MessageFactory.newInstance();
//2錛屾牴鎹秷鎭伐鍘傚垱寤篠OAPMessage
SOAPMessage messge=factory.createMessage();
//3,鍒涘緩SOAPPart
SOAPPart part=messge.getSOAPPart() ;
//4錛岃幏鍙栦俊灝?nbsp;
SOAPEnvelope envelop=part.getEnvelope() ;
//5錛岃幏鍙栨秷鎭富棰橀儴鍒?nbsp;
SOAPBody body=envelop.getBody();
//6錛屽垱寤轟俊鎭?nbsp;
QName qname=new QName(wsdlUrl,"add","ns");
SOAPElement ele=body.addBodyElement(qname);
ele.addChildElement("number1").setValue("1");
ele.addChildElement("number2").setValue("2");
messge.writeTo(System.out);

} catch (SOAPException e)
{
// TODO Auto-generated catch block
e.printStackTrace();

} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//嫻嬭瘯灝嗘秷鎭彂閫佸埌鏈嶅姟鍣ㄧ
@Test

public void testSendMessge()
{
// 1,鍒涘緩鏈嶅姟

try
{
URL url=new URL(wsdlUrl);
QName qname=new QName(ns,"MyServiceImplService");
Service service=Service.create(url,qname);
// 2錛屽垱寤篋ispicathc
Dispatch<SOAPMessage> dispatch=service.createDispatch(new QName(ns,"MyServiceImplPort"),
SOAPMessage.class, Service.Mode.MESSAGE);
// 3錛屽垱寤烘秷鎭?nbsp;
SOAPMessage message=MessageFactory.newInstance().createMessage();
SOAPBody body =message.getSOAPPart().getEnvelope().getBody();
SOAPElement ele=body.addChildElement(new QName(ns,"add","nn"));
ele.addChildElement("number1").setValue("12");
ele.addChildElement("number2").setValue("13");
SOAPMessage response=dispatch.invoke(message);
//response.writeTo(System.out);
NodeList nodeList=response.getSOAPBody().getElementsByTagName("result");
Node node=nodeList.item(0);
System.out.println(node.getTextContent());
//浣跨敤姝ょ鏂瑰紡涔熻兘澶熶嬌鐢ㄦ兂瑕佺殑鍊箋?nbsp;

} catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();

} catch (SOAPException e)
{
// TODO Auto-generated catch block
e.printStackTrace();

} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

]]>- MyEclipse7.5瀹夎鎻掍歡鐨勬柟娉?/title>http://www.aygfsteel.com/xxgshxs/archive/2012/07/25/383911.html绱叞宸?/dc:creator>绱叞宸?/author>Wed, 25 Jul 2012 01:23:00 GMThttp://www.aygfsteel.com/xxgshxs/archive/2012/07/25/383911.htmlhttp://www.aygfsteel.com/xxgshxs/comments/383911.htmlhttp://www.aygfsteel.com/xxgshxs/archive/2012/07/25/383911.html#Feedback0http://www.aygfsteel.com/xxgshxs/comments/commentRss/383911.htmlhttp://www.aygfsteel.com/xxgshxs/services/trackbacks/383911.html
EhCache 鍒嗗竷寮忕紦瀛?緙撳瓨闆嗙兢鍦╯ervlet涓殑init鏂規硶涓嬌鐢╣etIn甯濆浗CMS鐨別cmsinfo,phomenewspic鏍?/a>
package app;
import java.io.File;
import java.util.ArrayList;
import java.util.List;


/** *//**
* MyEclipse 7.5 (2009-11-16) 鎻掍歡閰嶇疆浠g爜鐢熸垚鍣?nbsp;
*/

public class PluginConfigCreator


{

public PluginConfigCreator()


{
}

public void print(String path)


{
List<String> list = getFileList(path);
if (list == null)


{
return;
}

int length = list.size();
for (int i = 0; i < length; i++)


{
String result = "";
String thePath = getFormatPath(getString(list.get(i)));
File file = new File(thePath);
if (file.isDirectory())


{
String fileName = file.getName();
if (fileName.indexOf("_") < 0)


{
print(thePath);
continue;
}
String[] filenames = fileName.split("_");
String filename1 = filenames[0];
String filename2 = filenames[1];
result = filename1 + "," + filename2 + ",file:/" + path + "//"
+ fileName + "//,4,false";
System.out.println(result);
} else if (file.isFile())


{
String fileName = file.getName();
if (fileName.indexOf("_") < 0)


{
continue;
}
int last = fileName.lastIndexOf("_");// 鏈鍚庝竴涓笅鍒掔嚎鐨勪綅緗?nbsp;
String filename1 = fileName.substring(0, last);
String filename2 = fileName.substring(last + 1, fileName
.length() - 4);
result = filename1 + "," + filename2 + ",file:/" + path + "//"
+ fileName + ",4,false";
System.out.println(result);
}

}
}

public List<String> getFileList(String path)


{
path = getFormatPath(path);
path = path + "/";
File filePath = new File(path);
if (!filePath.isDirectory())


{
return null;
}
String[] filelist = filePath.list();
List<String> filelistFilter = new ArrayList<String>();

for (int i = 0; i < filelist.length; i++)


{
String tempfilename = getFormatPath(path + filelist[i]);
filelistFilter.add(tempfilename);
}
return filelistFilter;
}

public String getString(Object object)


{
if (object == null)


{
return "";
}
return String.valueOf(object);
}

public String getFormatPath(String path)


{
path = path.replaceAll("////", "/");
path = path.replaceAll("//", "/");
return path;
}

public static void main(String[] args)


{

/**//*浣犵殑鎻掍歡鐨勫畨瑁呯洰褰?鍙傛暟String plugin 鍐呭鍗充負浣犳墍瑕佸畨瑁呮彃浠剁殑緇濆璺緞銆傚畨瑁呮椂鍙渶瑕佹崲鎴愯嚜宸辯殑鎻掍歡璺緞鍗沖彲*/
String plugin = "D://Program Files//Genuitec//Common//myplugin";
new PluginConfigCreator().print(plugin);
}
}
4.榪愯涓婅堪浠g爜錛屽皢鎺у埗鍙拌緭鍑虹殑鍐呭鍏ㄩ儴澶嶅埗鍒癲:/Program Files/Genuitec/MyEclipse 7.5/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info鏂囦歡涓?br />5.閲嶅惎myeclipse瀹屾垚瀹夎銆?br />

]]>
主站蜘蛛池模板:
凭祥市|
陕西省|
阳春市|
凯里市|
泰兴市|
新津县|
常熟市|
呼玛县|
北安市|
南木林县|
奉贤区|
玛纳斯县|
阿克陶县|
苏尼特左旗|
湄潭县|
洪洞县|
綦江县|
福贡县|
汝州市|
西畴县|
扶绥县|
汨罗市|
蒙城县|
鹤山市|
浮梁县|
安庆市|
恭城|
吴堡县|
莫力|
江津市|
安吉县|
白朗县|
定陶县|
丽水市|
时尚|
宁远县|
栾城县|
柘荣县|
海阳市|
卢龙县|
松原市|