简单的httpconnection创建流程 webservice http+saop

package com.swift.quartz;
import weaver.interfaces.schedule.BaseCronJob;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class ProductsJob extends BaseCronJob {
//
//    public static void main(String[] args) {
//        ProductsJob p=new ProductsJob();
//        p.execute();
//    }

@Override
public void execute()
{
try {
URL url=new URL("http://127.0.0.1:888/services/WorkflowService");
//创建一个HttpURLConnection对象
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
//设置content-type
//服务端是soap1.2的协议
connection.setRequestProperty("Content-Type", " application/soap+xml; charset=utf-8;");
//设置使用connection对象进行输入输出
connection.setDoInput(true);
connection.setDoOutput(true);
OutputStreamWriter writer=new OutputStreamWriter(connection.getOutputStream(),"utf-8");
String data=getRequestBody();//soap请求内容

writer.write(data,0,data.length());
writer.close();
}catch (Exception e) {
e.printStackTrace();
}
}
private String getRequestBody()
{
String s=null;
s="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
"  <soapenv:Body>\n" +
"    <doCreateWorkflowRequest xmlns=\"webservices.services.weaver.com.cn\">\n" +
"      <in0>\n" +
"        <ns1:creatorId xmlns:ns1=\"http://webservices.workflow.weaver\">10</ns1:creatorId>\n" +
"        <ns2:requestLevel xmlns:ns2=\"http://webservices.workflow.weaver\">0</ns2:requestLevel>\n" +
"        <ns3:requestName xmlns:ns3=\"http://webservices.workflow.weaver\">质检不良率日报表通知单</ns3:requestName>\n" +
"        <ns4:workflowBaseInfo xmlns:ns4=\"http://webservices.workflow.weaver\">\n" +
"          <ns4:workflowId>4</ns4:workflowId>\n" +
"        </ns4:workflowBaseInfo>\n" +
"        <ns5:workflowDetailTableInfos xmlns:ns5=\"http://webservices.workflow.weaver\">\n" +
"          <ns5:WorkflowDetailTableInfo>\n" +
"            <ns5:workflowRequestTableRecords>\n" +
"              <ns5:WorkflowRequestTableRecord>\n" +
"                <ns5:workflowRequestTableFields>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zb</ns5:fieldName>\n" +
"                    <ns5:fieldValue>1</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsblxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>2</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsddxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>3</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>4</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlblzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>5</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlddzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>6</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>7</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbljs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>8</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsddjs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>9</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>10</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                </ns5:workflowRequestTableFields>\n" +
"              </ns5:WorkflowRequestTableRecord>\n" +
"              <ns5:WorkflowRequestTableRecord>\n" +
"                <ns5:workflowRequestTableFields>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zb</ns5:fieldName>\n" +
"                    <ns5:fieldValue>1</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsblxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>2</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsddxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>3</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>4</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlblzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>5</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlddzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>6</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>7</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbljs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>8</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsddjs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>9</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>10</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                </ns5:workflowRequestTableFields>\n" +
"              </ns5:WorkflowRequestTableRecord>\n" +
"              <ns5:WorkflowRequestTableRecord>\n" +
"                <ns5:workflowRequestTableFields>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zb</ns5:fieldName>\n" +
"                    <ns5:fieldValue>1</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsblxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>2</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsddxs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>3</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>xsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>4</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlblzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>5</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlddzl</ns5:fieldName>\n" +
"                    <ns5:fieldValue>6</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>zlbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>7</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbljs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>8</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsddjs</ns5:fieldName>\n" +
"                    <ns5:fieldValue>9</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                  <ns5:WorkflowRequestTableField>\n" +
"                    <ns5:edit>true</ns5:edit>\n" +
"                    <ns5:fieldName>jsbll</ns5:fieldName>\n" +
"                    <ns5:fieldValue>10</ns5:fieldValue>\n" +
"                    <ns5:view>true</ns5:view>\n" +
"                  </ns5:WorkflowRequestTableField>\n" +
"                </ns5:workflowRequestTableFields>\n" +
"              </ns5:WorkflowRequestTableRecord>\n" +
"            </ns5:workflowRequestTableRecords>\n" +
"          </ns5:WorkflowDetailTableInfo>\n" +
"        </ns5:workflowDetailTableInfos>\n" +
"        <ns6:workflowMainTableInfo xmlns:ns6=\"http://webservices.workflow.weaver\">\n" +
"          <ns6:requestRecords>\n" +
"            <ns6:WorkflowRequestTableRecord>\n" +
"              <ns6:workflowRequestTableFields>\n" +
"                <ns6:WorkflowRequestTableField>\n" +
"                  <ns6:edit>true</ns6:edit>\n" +
"                  <ns6:fieldName>jgck</ns6:fieldName>\n" +
"                  <ns6:fieldValue>大岭山厂区</ns6:fieldValue>\n" +
"                  <ns6:view>true</ns6:view>\n" +
"                </ns6:WorkflowRequestTableField>\n" +
"                <ns6:WorkflowRequestTableField>\n" +
"                  <ns6:edit>true</ns6:edit>\n" +
"                  <ns6:fieldName>zjrq</ns6:fieldName>\n" +
"                  <ns6:fieldValue>2022-02-08</ns6:fieldValue>\n" +
"                  <ns6:view>true</ns6:view>\n" +
"                </ns6:WorkflowRequestTableField>\n" +
"              </ns6:workflowRequestTableFields>\n" +
"            </ns6:WorkflowRequestTableRecord>\n" +
"          </ns6:requestRecords>\n" +
"        </ns6:workflowMainTableInfo>\n" +
"      </in0>\n" +
"      <in1>10</in1>\n" +
"    </doCreateWorkflowRequest>\n" +
"  </soapenv:Body>\n" +
"</soapenv:Envelope>";
return s;
}
}

 

推荐这些文章:

泛微OA Webservice SOAP协议_StringBuilder拼接请求协议案例

<?xml version="1.0" encoding="utf-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<doCreateWorkflowRequest xmlns="webservi...

动态代理报错:No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

缺少依赖
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.8</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>...

uni-app 布局固定头部,内容滚动

<template>
<view class="container">
<!-- toubu -->
<view class="header">
<text>头部</text>
</view>
<!-- 主要内容 -->
<view class="body">
<view>
<text>abc</text>
...

很简单的一个判断,都来看下!

问题
<P>怎样根据主键判断表中是否已经存在</P>
<P>比如表中字段为 id 和name </P>
<P>怎么用liq to sql来判断一个name是否已经在表中存在?</P>
<P>没有分了不好意思!下次有分一定补!谢谢!</P>

最佳回答
用SingleOrDefault

...

同志们,请教个简单的问题

问题
有个网站的内页导航
<div class="menu">   <ul>     <li><a>111111</a></li>         <li><a>222222</a></li>         <li><a>333333</a></li>         <li><a>4444...

使用Swagger 3.0.0启动报错及解决方式

在使用Swagger2引入以下依赖后报错
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId&g...

简单的HTML界面

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>婚恋网</title>
</head>

<body>...

搜索模块和简单验证

搜索模块和简单验证
比较简单,直接上代码自己体会
简单说明: 真正做项目的时候验证都会在js里面做
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>搜索框模块和简单验证</title>
</head>
<body>
<form action="myfirstweb.html">
<p>搜索框:
<input type="search" n...

MavenWeb 项目创建

 
1.目录结构

 
 
 

 
 
 pom.xml 文件

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache....

【C#】Lazy<T> 类

官方说明:  https://docs.microsoft.com/zh-cn/dotnet/api/system.lazy-1?view=net-5.0
实例:https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs

...

文章标题:简单的httpconnection创建流程 webservice http+saop
文章链接:https://www.dianjilingqu.com/51187.html
本文章来源于网络,版权归原作者所有,如果本站文章侵犯了您的权益,请联系我们删除,联系邮箱:saisai#email.cn,感谢支持理解。
THE END
< <上一篇
下一篇>>