나는이 자바 코드와 SOAP 호출을 만들려고 노력 해요 :비누 요청하여 자바 - 요청 호출 형식 문제
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("UserAuthentication", serverURI);
SOAPBody soapBody = envelope.getBody();
SOAPElement soapBodyElem = soapBody.addChildElement("UserAuthentication", "UserAuthentication");
SOAPElement soapBodyElem1 = soapBodyElem.addChildElement("user_name", "UserAuthentication");
soapBodyElem1.addTextNode("[email protected]");
SOAPElement soapBodyElem2 = soapBodyElem.addChildElement("password", "UserAuthentication");
soapBodyElem2.addTextNode("123");
soapMessage.saveChanges();
SOAP 호출의 요구 형식 (I 생성하기 위해 노력하고있어)입니다 :
를<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UserAuthentication xmlns="http://tempuri.org/">
<user_name>string</user_name>
<password>string</password>
</UserAuthentication>
</soap:Body>
</soap:Envelope>
하지만 내 코드에 의해 생성 된 실제 호출이 필요한 형식과 일치하지 않으며 수신 측에서 거부, 나는 알아 내기 위해 노력하고 왜 그것을 해결하는 방법 :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:UserAuthentication="http://XXX.XXX.XXX.XXX:XXXX/Logininfo.asmx?op=UserAuthentication">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<UserAuthentication:UserAuthentication>
<UserAuthentication:user_name>[email protected]</UserAuthentication:user_name>
<UserAuthentication:password>123</UserAuthentication:password>
</UserAuthentication:UserAuthentication>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
,536,
오류는 클라이언트 헤더 문제 –
을 위해 오는 좀 더 구체적인받을 수 있습니까? –
응답 : xml version = "1.0"encoding = "UTF-8"?> soap : 클라이언트 서버 는 HTTP 헤더의 SOAPAction의 값을 gnize RECO하지 않았다. faultString으로> 비누 : 봉투> –