有人可以解释一下 Elsa Workflow 的 Fork 是如何工作的吗?
我已经设置了 HTTP 端点。之后,我发送 HTTP 请求并获得 JSON 格式的 HTTP 响应。我想对该响应设置条件(例如 name='John'),以便我可以仅显示数据库中的该行。
我应该使用什么 Elsa 活动?Fork活动是正确的选择还是其他?
我正在使用 Flask 和 Flask-RESTful 扩展开发一个 API。我正在创建端点和资源,但我对资源“url”及其“端点”之间的区别感到困惑。据我了解,URL 本身就是端点。我还阅读了StackOverflow 问题的答案,他们还建议 URL 是端点。
然而Flask-RESTful 文档提到该add_resource方法有一个 URL 参数,并且它还可以接收端点名称。他们甚至提供了这个例子:
api.add_resource(HelloWorld, '/', '/hello')
api.add_resource(Foo, '/foo', endpoint="foo")
api.add_resource(FooSpecial, '/special/foo', endpoint="foo")
Run Code Online (Sandbox Code Playgroud)
我明白他们在做什么,但我还是不明白端点名称的作用。
URL 和端点名称有什么区别?为什么我要设置端点名称?
我有一个 SvelteKit 组件,需要对应的+page.server.tscookie 验证表单操作。我的目标是拥有一个带有相应删除按钮的组件,该组件将从端点内的表单操作中向我的后端发送 API 请求+page.server.ts。
为了清楚起见,我的结构:
- src/
- components/
- Component/
- +page.svelte
- +page.server.ts
- routes/
- route/
- +page.svelte
Run Code Online (Sandbox Code Playgroud)
组件+page.svelte:
<div class="card">
<form method="POST">
<input type="hidden" value="{uuid}" name="uuid" />
<button class="btn-icon variant-filled-primary">
<span><Icon icon="material-symbols:delete-outline"></Icon></span>
</button>
</form>
</div>
Run Code Online (Sandbox Code Playgroud)
组件+page.server.ts:
import type { Actions } from './$types';
export const actions = {
default: async ({ cookies, request }) => {
// Doing some http-only Cookie authenticated fetching and data processing here
}
} satisfies …Run Code Online (Sandbox Code Playgroud) 添加服务引用时,它会使用默认构造函数创建"MyServiceClient"类.如果我使用新的MyServiceClient(),我会收到一个错误:无法找到默认端点...如果我使用新的MyServiceClient("endpointName"),它就可以工作.
我想在app/web.config中指定一个默认端点,当我使用默认构造函数时,它将被使用.我知道我可以将该默认名称放在*.settings中并在我的应用程序中使用它,但只是想知道是否有任何内置方法来执行它.
当我导航到WCF svc页面https://mywebstie.project.com/myproject/myuploadservice.svc时,我按预期命中了svc,但是它提供的svcutil URL使用了实际的服务器名称;例如,而不是mywebsite.project.com URL。
当我按所提供的指向WSDL文件的链接时,浏览器中仅呈现文本https://mywebstie.project.com/myproject/myuploadservice.svc/SQLMembershipProvider。浏览器中的URL实际上是使用服务器名称而不是mywebstie.project.com。
WSDL XML的内容未呈现。
可能是什么问题?我没有更改客户端或服务器的配置,但是我的服务无法正常工作。
收到对https://mywebstie.project.com/myproject/myuploadservice.svc/SqlMembershipProvider的HTTP响应时发生错误。这可能是由于服务端点绑定未使用HTTP协议。这也可能是由于服务器终止了HTTP请求上下文(可能是由于服务关闭了)。有关更多详细信息,请参见服务器日志。
这是我的服务器配置
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MembershipBehaviour">
<serviceMetadata httpsGetEnabled="true" />
<serviceCredentials>
<serviceCertificate findValue="44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44"
storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="SqlMembershipProvider" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="SqlMembershipProvider">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
<mexHttpsBinding>
<binding name="mex" />
</mexHttpsBinding>
</bindings>
<services>
<service behaviorConfiguration="MembershipBehaviour" name="Test.Web.Services.MyUploadService"> …Run Code Online (Sandbox Code Playgroud) 如何在Virtuoso中为我的本体定义新的端点?我能够通过RDF商店上传选项卡中的Virtuoso Conductor上传我的本体.现在我需要定义一组端点,以便能够通过HTTP在我的应用程序中使用它们.Virtuoso Conductor中是否有任何选项卡可以实现用户友好界面来创建端点,我该怎么做?我需要使用一些外部工具吗?
我是设置弹簧网络应用程序的初学者.我到目前为止,但现在我发现自己陷入困境.
我收到以下错误:
WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
Run Code Online (Sandbox Code Playgroud)
主要问题是我已经没有想法查找调试信息.我修复了我见过的很多错误,但现在我甚至在日志中找不到错误.所以我有点绝望了.
这是我的web.xml
<web-app>
<display-name>Weather report webservice</display-name>
<servlet>
<servlet-name>spring-ws</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-ws-servlet.xml</param-value>
</init-param>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/weatherws</url-pattern>
</servlet-mapping>
</web-app>
Run Code Online (Sandbox Code Playgroud)
这就是我的spring-ws-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="path.to.weather"/>
<sws:annotation-driven/>
</beans>
Run Code Online (Sandbox Code Playgroud)
这就是我的端点的样子:
@Endpoint
public class WeatherEndpoint {
private static final String NAMESPACE_URI = "http://mycompany.com/weather/schema";
private WeatherReportManager manager;
@Autowired
public WeatherEndpoint(WeatherReportManager manager) throws JDOMException {
this.manager = manager;
}
@PayloadRoot(namespace = NAMESPACE_URI, …Run Code Online (Sandbox Code Playgroud) 我想使用端点API将对象或列表数组发送到app引擎
@ApiMethod(name = "insertGroupMembers")
public List<GroupMembers> insertGroupMembers(Collection<GroupMembers> members) {
EntityManager mgr = getEntityManager();
List<GroupMembers> listMembers = new ArrayList<>();
try {
for (GroupMembers groupMember : members) {
mgr.persist(groupMember);
listMembers.add(groupMember);
}
} finally {
mgr.close();
return listMembers;
}
Run Code Online (Sandbox Code Playgroud)
但是它显示了生成api库时的错误如下: -
说明资源路径位置类型生成Cloud Endpoints类的API元数据时出现问题:com.google.api.server.spi.config.validation.CollectionResourceException:groupmembersendpoint.com.appbell.tagalone.GroupMembersEndpoint.insertGroupMembers参数(类型java .util.Collection):非法参数类型(集合类型'java.util.Collection'中的'class com.appbell.tagalone.GroupMembers').不允许使用数组或实体类型集合.TagAlone-AppEngine未知的Google App Engine云端点问题标记
是否Retrofit从端点的相对URL中删除尾部斜杠?我尝试在我的一个端点上添加尾部斜杠但是当我单步调试并查看Call对象时,如果我钻入delete.relativeUrl,它不会显示尾部斜杠.
使用IDS4和调试跟踪,日志只给我一点点继续.我发布时遇到上述错误(令牌端点的无效HTTP请求):
Request starting HTTP/1.1 POST http://localhost:5000/connect/token?grant_type=password&client_id=resClient&client_secret=TopSecret&username=admin&password=admin123
Run Code Online (Sandbox Code Playgroud)
在客户端(Web浏览器)我得到
{ "error": "invalid_request" }
Run Code Online (Sandbox Code Playgroud)
整个调试日志如下所示:
dbug: Microsoft.AspNetCore.Server.Kestrel[1]
Connection id "0HL2NGBR0Q1O4" started.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://localhost:5000/connect/token?grant_type=password&client_id=resClient&client_secret=TopSecret&username=admin&password=admin123 0
dbug: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware[9]
AuthenticationScheme: idsrv was not authenticated.
dbug: IdentityServer4.Hosting.EndpointRouter[0]
Request path /connect/token matched to endpoint type Token
dbug: IdentityServer4.Hosting.EndpointRouter[0]
Mapping found for endpoint: Token, creating handler: IdentityServer4.Endpoints.TokenEndpoint
info: IdentityServer4.Hosting.IdentityServerMiddleware[0]
Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token
trce: IdentityServer4.Endpoints.TokenEndpoint[0]
Processing token request.
warn: IdentityServer4.Endpoints.TokenEndpoint[0]
Invalid HTTP request for token endpoint
trce: IdentityServer4.Hosting.IdentityServerMiddleware[0]
Invoking result: IdentityServer4.Endpoints.Results.TokenErrorResult
info: …Run Code Online (Sandbox Code Playgroud) endpoint ×10
wcf ×2
android ×1
api-design ×1
c# ×1
flask ×1
forms ×1
httprequest ×1
httpresponse ×1
python ×1
retrofit ×1
retrofit2 ×1
spring ×1
spring-ws ×1
svelte ×1
sveltekit ×1
token ×1
virtuoso ×1
wcf-binding ×1
web-services ×1
workflow ×1
wsdl ×1