public static String ExecuteSoapRequest(String requestBody) {
try {
String url = PragMServe.readShared("url");
if (!url.endsWith("/"))
url += "/";
StringBuilder xml = new StringBuilder();
xml.append("<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\">");
xml.append(PragMServe.readShared("header"));
xml.append(requestBody);
xml.append("</s:Envelope>");
URL SoapURL = new URL(url + "XRMServices/2011/Organization.svc");
HttpURLConnection rc = (HttpURLConnection) SoapURL.openConnection();
rc.setRequestMethod("POST");
rc.setDoOutput(true);
rc.setDoInput(true);
rc.setRequestProperty("Content-Type",
"application/soap+xml; charset=UTF-8");
String reqStr = xml.toString();
int len = reqStr.length();
rc.setRequestProperty("Content-Length", Integer.toString(len));
rc.setConnectTimeout(5000);
rc.connect();
OutputStreamWriter out = new OutputStreamWriter(rc.getOutputStream());
out.write(reqStr, 0, len);
out.flush();
int statusCode = rc.getResponseCode();
String response;
if (statusCode >= 200 && statusCode < 400) {
response = convertStreamToString(rc.getInputStream());
} else {
response = convertStreamToString(rc.getErrorStream());
}
rc.disconnect();
return response;
} catch (Exception e) {
Log.e("TAG", e.getMessage(), e);
}
return null;
}
private static String convertStreamToString(java.io.InputStream is) {
java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
return s.hasNext() ? s.next() : "";
}
public interface ICRMSoapService {
@Headers({
"Content-Type: application/soap+xml; charset=utf-8",
})
@HTTP(method = "POST", hasBody = true)
Call<ResponseBody> postData(@Url String url, @Body String body);
}
public ICRMSoapService soapService;
public void initRetrofit() {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();
Strategy strategy = new AnnotationStrategy();
Serializer serializer = new Persister(strategy);
Retrofit retrofit = new Retrofit.Builder()
.client(client)
.addConverterFactory(SimpleXmlConverterFactory.create(serializer))
.baseUrl(PragMServe.readShared("url"))
.build();
soapService = retrofit.create(ICRMSoapService.class);
}
//RequestBody requestBody =RequestBody.create(MediaType.parse("text/plain"), xml.toString());
Call<ResponseBody> data = soapService.postData(url + "XRMServices/2011/Organization.svc", xml.toString());
retrofit2.Response body = data.execute();
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile ('com.squareup.retrofit2:converter-simplexml:2.2.0') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
Response{protocol=http/1.1, code=400, message=Bad Request, url=XXX}
04-27 11:29:04.870 8717-9245/com.pragm.pragmam_serve D/OkHttp: <string><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute</a:Action><Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><EncryptedData Id="Assertion0" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#"><EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><EncryptedKey><EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/><ds:KeyInfo Id="keyinfo"><wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">BAhRlojQczWllwxXN8VPpk4Lj1Q=</wsse:KeyIdentifier></wsse:SecurityTokenReference></ds:KeyInfo><CipherData><CipherValue>So1WH2fSmgUB9jwhdBVp0jAezdNlqhgw9NTS19BLXCevBG38oqyFBFMExc6qRxVJo0rLOXLHp7tg8SrYOm6KJf98CUp/Gajzu8nCL06hi+QPyrJ5eXrUgy4iZ9HYmfnHWZ6xey+29Duzef1FDVzrFtF/844ZGdyYyymGQK6I7ZKGJ3D6b2pd4qWRn3UbxiS6cyRiuZtecqzbfqQhIZyWYM1TYzDPSjoM8PFpCPVyIDEVCyRbC8K9lwZ4WHqF+kaZQgGLswOyw6ieoJ7ALlM8/UromAag6A+H7IdXHQ8q1zvw1XWE6BxSYJ7j4R851GFeiifl9Ebxgv1coOk7Bvpsuw==</CipherValue></CipherData></EncryptedKey></ds:KeyInfo><CipherData><CipherValue>5R8w7Fcx5l4kQIkIcuUbqLVxG0gY6DcSnhYGWNZ6Zus7A3GTq//UIA7OZp+G8XD+gOhlkQ9Yic2ELCoFY1Y2k9/mtCG0RVUglR8RM7nIiZOmvZFogV8a/NJLnW4blUNap4UYalxlnBFByMnHO3v1FGcPJ8pqZE6LSb1KyJxmFDcQZD4tndCh5YsbCDbAHiSDHv+qmeRfVKZbcRCTj9kycHP4q/O3P4w4Nw5KKr/TFVxFeTelW42CjXbbJxFa5FKgYwbbWLne7lR22Udc1mWpYPFxilufqQCTYy4u3dBcz8nCOxi35sj3b9184SWblfWlQX1+NW61V3uZKLpMPeqoYdyJyRuG3tx+FYFttux8bO6KpSThHLFJzvkRFMObdY4jJ9IRtIJSyb6SmDtkOgwXdCzjzaB6xC9IBwEWNcFM+H9ZuXgHpYXKy0wyn8/Q8tMn+rGVwSksmEya4QaLR/wy2942rtsalWl9Q8xY+I3dXUHm0Qrf/fjbJGHYZDd+dIh4RsQX/bK8E5eaN8Q8t/1howmyGq9Z5XZ3WMb2qtY4aceh1xwC+3L8I9TPQIsbt7nlQ+A6wwzYxvPmsIQhEbKn2qqh8+jJf4qA4f5F/g6hAz5gP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J4h7GOQGDVNujZKE5CVbLV3z2P4chnxu+muPIkh4OVBdIO+jHLPNVoqOsOn4vnlC4Zbmia27A6kAJsTESxvJsU1Yr3RidKt/tw1ONMXaK3h
04-27 11:29:04.873 8717-9245/com.pragm.pragmam_serve D/OkHttp: z4rTOuj6IK9p2OtX+p5YDjdTYEz9uOZmGDqouGvuKPeO27lKZ7LmSowMpf82jFoP+b79/xvlOp4zgoRi/uQrw31rso00/LeeXF6kCI0ROoqexmQpyen1Scc5b0CjAehIoM9mBghUs2nsKQYpBWp/F+drpxSNi3fZlTp7im7Sc/M8xh+RV7ceneBhU9T1HO9bkMDmOOeeGM8JPopvJEfGVf18G9lwQcEOO0x2/dJhAox2cC3UbnhPHVCUn6ockvjOUYVKuo08pKO6QXirWVrmWjHlo/5K2zzCzBRQtX10C4sxczzCbv7AxGGkk6HidTdJsTUVpg+L6wpkm6zMC/Ny6IjqNKm7l8kVyMWgQFY2nBa9jZkNUlu5NTz13H50phwUX8wwj9biqwd3ZVrKY36wi+B8J5ws5dufNj2QRAVJTPfi4oyopMN3tnHMtKJNuSZAW3h9ZnkZ5iJ5WRgcjLLunljEvzLDHPtw8kwghDA4AM7eY2/MseRMV9TvW+FYiz+hJG9xvQjhtUWr0x3lqiCemxnD++o5cdNH4Clfvg5ybz8649VtNxULahGv+TigHdhkEDjd9wObN4NHlMPx/Q28iQth+2y6HSFAXHhgLyfTBbccvOidyVlSNNuhNxRbwCQP4LeGkB6+tPf66rrTUE6Fvhxh9bmuoJhs+yNzxmxNR79p50i69i08Ie1giZzBtSpQQe1HNk8IaHZUUjwBjoB13MzyF60r0VFSu9UHWd4TIAqNV71Oimq6o+LhKwxg7R6UBssa/MTG6FMldfJFaxz303K+9lzeLiDZx/C9ND8mYwAbnwFTprhFZLDQVmoROoqeMdbNRO8rMUY+dA1A3P20tFaIYK+u3bEywIhFFKHDU0wBb8z2BMVB/vZWqZLHLdsCsPP0q21dfkQSpBw=</CipherValue></CipherData></EncryptedData></Security><a:MessageID>urn:uuid:e37eef33-64da-4b9a-b04e-e3adef2dbb82</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">https://pragmserve5.crm8.dynamics.com/XRMServices/2011/Organization.svc</a:To></s:Header> <s:Body> <Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <request i:type="b:WhoAmIRequest" xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:b="http://schemas.microsoft.com/crm/2011/Contracts"> <a:Parameters xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <a:RequestId i:nil="true" /> <a:RequestName>WhoAmI</a:RequestName> </request> </Execute> </s:Body></s:Envelope></string>
04-27 11:29:04.878 8717-9245/com.pragm.pragmam_serve D/OkHttp: --> END POST (10011-byte body)
Xml字符串没有以Xml格式打印。我正在创建动态soap信封,所以我可能无法为信封创建模型类,我提到了这一点,但他正在使用模态类创建soap信封,我想传递原始字符串xml,有什么方法可以传递原始xml字符串到改型体。
你的代码看起来很不错。但我想提的事情很少。首先,确保您试图访问的Web服务方法是“post”方法,而不是“get”或其他方法类型。其次,确保要发送到服务器的XML/JSON格式正确。第三,我可以看到下面给出的代码行中的一个问题是rc.setRequestProperty(“content-type”,“application/soap+xml;charset=UTF-8”);我想“xml”后面应该有逗号,而不是分号。
在检查了所有这些之后,如果您仍然面临这个问题,那么我将建议您使用“更新时的日志级别”来跟踪实际问题。请查看下面给出的链接以实现“更新时的日志级别”。
使用改进2进行日志记录
我试图对我写的rest api执行一个put请求,但它总是返回400-bug请求。 java.io.IO异常:服务器返回HTTP响应代码:400为URL:http://localhost:8000/api/v0/contacts/2sun.net.www.protocol.http.HttpURLConnection.getInputStream(未知来源) 我可以用firefox rest客户端
问题内容: 这工作正常: 这将返回400 Bad Request(只是使用.ajax来支持错误处理的上述jQuery的重新格式)。 问题答案: 我认为您只需要再添加2个选项(和):
我在Tomcat中部署了一个Java的Web应用程序。 如果我的URL是这样的,我会收到来自Tomcat 8的400个错误请求 编码为 但是如果我从 URL 中删除 a:b:ab,a:b:abc 和 renditionFilter=cmis:thumbnail,application/pdf,image/bmp,image/gif,image/jpeg,image/png,那么它就可以工作了,这个
我在本地服务器上找到了它失败的代码: 在我看来,它似乎不能获得或?
我试图使用Gmail API将用户设置应用到Gmail帐户,但它不断返回错误400错误请求。 我可以看到错误代码在Gmail API控制台,它来自我的服务号,所以代码不可能是如此错误,但它让我发疯,只是不能找出什么是错误的。 如果有人能给我指出正确的方向,我会非常感激。
通过邮递员API正在工作,但相同的API不与改造工作,我收到400个错误的改造要求 返回true或false的endpoint@POST(“/emrmegax/api/allscript/saveappointment”)调用saveappointment(@Header(“x-auth-token”)字符串header1,@Body字符串yy);