锘??xml version="1.0" encoding="utf-8" standalone="yes"?> <input type="text" id="mobile" name="mobile" placeholder="璇瘋緭鍏ユ?zhèn)ㄧ殑鎵嬫満鍙风? class="easyui-validatebox form-control" data-options="required:true,validType:'mobile'" /> validateType鑷繁鎵╁睍瑙勫垯
]]>
]]>
]]>
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.getInInterceptors().add(new LoggingInInterceptor());
factoryBean.getOutInterceptors().add(new LoggingOutInterceptor());
factoryBean.setServiceClass(AutoPackServiceIntf.class);
factoryBean.setAddress("http://10.241.0.105:17000/TEST");
AutoPackServiceIntf factory = (AutoPackServiceIntf) factoryBean.create();
Client client = ClientProxy.getClient(factory);
HTTPConduit conduit = (HTTPConduit) client.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(30000); //榪炴帴瓚呮椂鏃墮棿
policy.setReceiveTimeout(120000); //璇鋒眰瓚呮椂鏃墮棿.
conduit.setClient(policy);
System.out.println(factory.getFirstUnitCramp("1"));
}catch(WebServiceException ex){
long l2 = System.currentTimeMillis();
System.out.println((l2-l1)+"ms");
System.out.println("榪炴帴寮傚父");
}
ApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext();
classPath = classPathXmlApplicationContext.getResource("classpath:config.properties").getFile().getPath();
if(classPath.indexOf("WEB-INF")>0){
classPath = classPath.substring(0,classPath.indexOf("WEB-INF")+7)+"/classes/"+xmlFile;
}
amp.forEach((key,value)->{
System.out.println(key);
value.forEach((key2,value2)->{
System.out.println(key2);
});
});
鏈緇堣繑鍥炵殑緇撴灉
2
闅忔満鍏夌洏
3
璧勬枡琚嬮檮浠?/p>
4
璧勬枡鐩掗檮浠?/p>
5
鍖呰杈呮枡
8
鍓嶅伐搴忕墿鏂?/p>
Exception in thread "main" org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:352)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
at com.nabf.start.NABFClient.main(NABFClient.java:30)
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/soap/ registered.
at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:339)
... 6 more
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.nabf.start.NABFClient</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/cxf/bus-extensions.txt</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
鐢ㄤ簬鏇挎崲str涓瓄0},{1},{2}榪欐牱鐨勭粨鏋?/p>
String.format(str,str1,str2,str3)
鐢ㄤ簬鍖歸厤str涓?s鐨勭粨鏋?/p>
public static void splitScriptWithMethod(String script) {
// check if args
String subMethodReg = "";
if(script.indexOf("Read([") !=script.lastIndexOf("Read([")){
subMethodReg = "(.+)\\(\\[(.+)\\],\\[(.+\\(\\[.+\\]\\))\\],\\[(.+\\(\\[.+\\]\\))\\]";
}else{
subMethodReg = "(.+)\\(\\[(.+)\\],\\[(.+)\\],\\[(.+\\(\\[.+\\]\\))\\]";
}
Pattern p = Pattern.compile(subMethodReg);
Matcher matcher = p.matcher(readString);
while (matcher.find()) {
for (int i = 1; i <= matcher.groupCount(); i++) {
System.out.println("grp " + i + " :" + matcher.group(i));
}
}
}
grp 1 :Print
grp 2 :QDT
grp 3 :Read([SQLServer#10.176.1.178#Mas2006],[select top 1 print_model + '.jasper' as reportname from tbl_mas_print_stru where Machine_No='SS110521Z8'],['@@Lang'])
grp 4 :Read([SQLServer#10.176.1.178#Mas2006],[select Machine_No, Check_Code, Model_Packing, Start_Date, Material_Name, Material_No, IIPC_part_code, Material_Qty, Print_Order, Machine_Product_No, print_model, SoftWareName, SoftWare_No, SoftWareQty from dbo.tbl_mas_print_stru where Machine_No='SS110521Z8'],['@@Lang'])