2013-11-15 2 views
1

지금 Ksoap 2.5를 통해 웹 서비스를 호출하려고합니다. 내 질문에 어쨌든 비누 xml 시체를 사용자 정의 할 수 있다면 무엇입니까?Ksoap2 (비누)에서 비누 바디 수정하기

지금 ksoap 다음과 같은 코드가 생성됩니다. "당신이 제공하는 SOAP 메시지가 잘못"

<v:Envelope xmlns:v="http://schemas.xmlsoap.org/soap/envelope/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"> 
    <v:Header/> 
    <v:Body> 
    <n0:TVerifyCode xmlns:n0="urn:AccessDBIntf-IAccessDB" id="o0" c:root="1"> 
     <UserId i:type="d:string">bfy</UserId> 
     <PassWord i:type="d:string">351F42CE0189FAD45AF2EA252A1F149A</PassWord>  
    </n0:TVerifyCode> 
    </v:Body> 
</v:Envelope> 

그리고 웹 서비스 서버가 불평 나는 다음과 같은 방법으로 조각을 변경하는 경우

, 코드가 작동합니다

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> 
    <SOAP-ENV:Body xmlns:NS1="urn:AccessDBIntf-IAccessDB" xmlns:NS2="urn:CommonObj" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
    <NS1:Login> 
     <VerifyCode href="#1"/> 
    </NS1:Login> 
    <NS2:TVerifyCode id="1" xsi:type="NS2:TVerifyCode"> 
     <UserId xsi:type="xsd:string">bfy</UserId> 
     <PassWord xsi:type="xsd:string">F0639A434D0A852488F45A3071E009A6</PassWord>  
    </NS2:TVerifyCode> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

어떤 아이디어 봉투 몸을 사용자 정의? 미리 감사드립니다!

답변

0

자신 만의 비누 요청을 만들어이를 수행 할 수 있습니다.

https://github.com/Abhan/SoapWithoutKSoap

위의 라이브러리에,이 사람이 어떤 비누 라이브러리없이 비누 요청을 만든을 참조하십시오. 그 아주 간단합니다.

+0

감사합니다. 그러나 이것은 제가 원하는 결과가 아닙니다. – user2994941