我需要为初学者做一个关于Clojure语言的演讲.您对选择主题有何建议?我需要包括哪些要点?
注意:初学者,我的意思是他们在其他编程范例中有经验,但在函数式编程模型中没有.
我正在使用Jax-ws为Onvif IP摄像头实现客户端应用程序,我正在向摄像头发送请求以创建PullPointSubscription,看来摄像头理解请求并处理请求并发送正确的响应,但客户端jax-ws代码抛出一个例外
MustUnderstand headers:[{http://www.w3.org/2005/08/addressing}Action] are not understood
Run Code Online (Sandbox Code Playgroud)
我不明白究竟是什么问题?任何人都可以解释问题是什么以及如何解决?
例外细节
an 29, 2012 11:43:48 AM com.sun.xml.ws.protocol.soap.MUTube getMisUnderstoodHeaders
INFO: Element not understood={http://www.w3.org/2005/08/addressing}Action
javax.xml.ws.soap.SOAPFaultException: MustUnderstand headers:[{http://www.w3.org/2005/08/addressing}Action] are not understood
at com.sun.xml.ws.protocol.soap.MUTube.createMUSOAPFaultException(MUTube.java:148)
at com.sun.xml.ws.protocol.soap.ClientMUTube.processResponse(ClientMUTube.java:109)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:651)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.client.Stub.process(Stub.java:323)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
at $Proxy46.createPullPointSubscription(Unknown Source)
at Test.SubInEventLast(Test.java:173)
at Test.main(Test.java:139)
Run Code Online (Sandbox Code Playgroud)
请求肥皂消息是
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns6:CreatePullPointSubscription xmlns:ns2="http://www.w3.org/2005/08/addressing"
xmlns:ns3="http://docs.oasis-open.org/wsn/b-2"
xmlns:ns4="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
xmlns:ns6="http://www.onvif.org/ver10/events/wsdl"
xmlns:ns7="http://www.onvif.org/ver10/schema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:ns9="http://www.w3.org/2004/08/xop/include"
xmlns:ns10="http://docs.oasis-open.org/wsrf/r-2">
<ns6:Filter>
<ns3:TopicExpression xmlns="http://docs.oasis-open.org/wsn/b-2"
xmlns:tns1="http://www.onvif.org/ver10/topics"
Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">
tns1:Device
</ns3:TopicExpression>
</ns6:Filter> …Run Code Online (Sandbox Code Playgroud) 我正在探索将WSO2 API Manager用于我们的遗留API,该API目前基于SOAP.在IDeally,我想向我们的客户公开RESTful接口,并让API Manager将其转换为传递给我们遗留系统的SOAP请求.搜索WSO2站点,我发现使用XSLT转换有一些方法可以做到这一点,但仅限于使用WSo2 ESB产品时.
有没有办法在API Manager中处理这种转换?怎么样?如果没有,我可以以某种方式利用ESB产品并将其与API Manager产品结合使用吗?或者那有点矫枉过正?
谢谢!
我希望在通话过程中从拨号盘上按下号码
场景:
那么如何才能获得拨号?
以下行: (repeat 4 [2 3])
给我这个: ([2 3] [2 3] [2 3] [2 3])
如何从上面的向量列表创建一个向量或列表,以便我得到这个?: [2 3 2 3 2 3 2 3]
谢谢
这是文件,我在行import javax.websocket和中得到编译错误@serverEndpoint("/websocket").为什么不采用注释?
package pack.exp;
import java.io.IOException;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
@ServerEndpoint("/websocket")
public class Hello
{
{
private static Set<Session> clients =
Collections.synchronizedSet(new HashSet<Session>());
@OnMessage
public void onMessage(String message, Session session)
throws IOException {
synchronized(clients){
// Iterate over the connected sessions
// and broadcast the received message
for(Session client : clients){
if (!client.equals(session)){
client.getBasicRemote().sendText(message);
}
}
}
}
@OnOpen
public void onOpen (Session session) { …Run Code Online (Sandbox Code Playgroud) 这是用于改变图像的比特值的功能.是什么|=和 ^=意味着什么呢?
private int setBitValue(int n,int location,int bit) {
int toggle=(int)Math.pow(2,location),bv=getBitValue(n,location);
if(bv==bit)
return n;
if(bv==0 && bit==1)
n|=toggle; // what does it do?
else if(bv==1 && bit==0)
n^=toggle; // what does it do?
return n;
}
Run Code Online (Sandbox Code Playgroud) 我有一个二维JSON数组对象,如下所示
{"enrollment_response":{"condition":"Good","extra":"Nothig","userid":"526398"}}
Run Code Online (Sandbox Code Playgroud)
我想解析上面的Json数组对象来获取条件,额外的,userid.So我使用下面的代码
JSONParser parser = new JSONParser();
try {
Object obj = parser.parse(new FileReader("D:\\document(2).json"));
JSONObject jsonObject = (JSONObject) obj;
String name = (String) jsonObject.get("enrollment_response");
System.out.println("Condition:" + name);
String name1 = (String) jsonObject.get("extra");
System.out.println("extra: " + name1);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
它抛出一个错误
"Exception in thread "main" java.lang.ClassCastException:
org.json.simple.JSONObject cannot be cast to java.lang.String at
com.jsonparser.apps.JsonParsing1.main(JsonParsing1.java:22)"
Run Code Online (Sandbox Code Playgroud)
请任何人帮助解决这个问题.
我已使用以下链接将wso2身份服务器配置为wso2 api管理器的密钥管理器。1个
我已经通过wso2 api管理器发布者创建了api,并且已将auth类型指定为Application&Application user。
当我通过应用程序令牌调用api时很好。但是当我使用用户令牌时,这给了我这个错误。
<ams:fault xmlns:ams="http://wso2.org/apimanager/security"><ams:code>900908</ams:code>
<ams:message>Resource forbidden </ams:message>
<ams:description>Access failure for API: /t/dev-peakhealth.com/dev-api/1.0, version: 1.0</ams:description>
</ams:fault>
Run Code Online (Sandbox Code Playgroud)
API管理器日志:
TID: [3] [] [2016-06-13 19:18:07,074] @dev-peakhealth.com [3] [AM]DEBUG {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - Call to API gateway : API call failed reason=API_authentication_failure userName=test@dev-peakhealth.com transactionId=urn:uuid:63675ed0-1b95-4a06-9b2c-b3f7ad3daa18 with userAgent=curl/7.35.0 with accessToken=Bearer ca8569957cf1fb5d58f5b70d9649d982 for requestURI=/t/dev-peakhealth.com/dev-api/1.0/careplans at time=Mon Jun 13 19:18:07 IST 2016 from clientIP=192.168.4.31, elapsedTimeInMilliseconds=0 {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}
TID: [3] [] [2016-06-13 19:18:07,074] @dev-peakhealth.com [3] [AM] WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - API authentication failure due to Resource forbidden …Run Code Online (Sandbox Code Playgroud) wso2esb 中的代理服务和 API 服务有什么区别?
要公开我的服务,我可以提供代理 URL 和 API URL,那么在哪种情况下两者不同?在哪种情况下可以使用代理,在哪种情况下可以使用 API?
请帮助我理解..,