锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美女同网站,国产亚洲精品美女久久,日韩欧美亚洲日产国产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鏂規(guī)硶涓嬌鐢╣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 />

]]>
主站蜘蛛池模板:
策勒县|
锦州市|
长沙县|
英吉沙县|
永寿县|
彝良县|
台湾省|
绥化市|
青岛市|
临沂市|
壤塘县|
佛冈县|
韶关市|
台山市|
潮安县|
沾益县|
清新县|
江陵县|
灵璧县|
绥滨县|
五原县|
石河子市|
武威市|
平昌县|
阳信县|
长春市|
梁河县|
阳江市|
海淀区|
静宁县|
南召县|
迁西县|
广饶县|
北辰区|
济源市|
通江县|
德昌县|
高台县|
隆德县|
固原市|
旅游|