노드 js에서 SOAP 요청을 호출하기 위해 node-soap 라이브러리를 사용하고 있습니다. I은 인수를 작성한 이것node-soap을 사용하여 soap 요청에 중복 된 이름 공간이 생성되었습니다.
<soapenv:Envelope >
<soapenv:Header/>
<soapenv:Body>
<typ:uploadFileToUcm>
<typ:document>
<erp:Content></erp:Content>
<erp:FileName>?</erp:FileName>
<!--Optional:-->
<erp:ContentType>?</erp:ContentType>
<!--Optional:-->
<erp:DocumentTitle>?</erp:DocumentTitle>
<!--Optional:-->
<erp:DocumentAuthor>?</erp:DocumentAuthor>
<!--Optional:-->
<erp:DocumentSecurityGroup>?</erp:DocumentSecurityGroup>
<!--Optional:-->
<erp:DocumentAccount>?</erp:DocumentAccount>
<!--Optional:-->
<erp:DocumentName>?</erp:DocumentName>
<!--Optional:-->
<erp:DocumentId>?</erp:DocumentId>
</typ:document>
</typ:uploadFileToUcm>
</soapenv:Body>
</soapenv:Envelope>
:
var args = {
document : {
Content: byteArray, //create byte array to assign content
FileName: 'Abc12341',
ContentType: 'zip',
DocumentTitle: 'Abc12341',
DocumentAuthor: 'Abc12341',
DocumentSecurityGroup: 'abc',
DocumentAccount: 'c/c/c',
DocumentName: 'Abc12341'
//DocumentId : //no data available in java file
}
}
하고 전달하기 :
client.method(args, function (err, result) {
});
하지만 client.lastrequest
인쇄에 요청 페이로드 포맷은 다음있다
페이로드에 중복 된 네임 스페이스가 있습니다 :
<soap:Body>
<types:uploadFileToUcm
xmlns:types="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/"
xmlns="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/">
<types:document>
<ns0:Content xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">UEsDBBQAAAAIAAuEaEue7VBfgQAAAGoBAAAcAAAASW52VHJhbnNhY3Rpb25zSW50ZXJmYWNlLmNzdvPMK0vNK8kvqlTwL0pXCA021AEBIBlgYGBsYGQK5ASXJnnmlcGkMICljmsikDIyMDTXNzTUNzBWMDCwAiMdHd/M4uTUnJzEvNT80mKFoNTk1MyCEuzG6OhYgAhfN3cdI3NLc2MDQ0MdY1MDIwMzM0McNiMBYx0jhLZBB1z9XHi5AFBLAQIUABQAAAAIAAuEaEue7VBfgQAAAGoBAAAcAAAAAAAAAAEAIAAAAAAAAABJbnZUcmFuc2FjdGlvbnNJbnRlcmZhY2UuY3N2UEsFBgAAAAABAAEASgAAALsAAAAAAA==</ns0:Content>
<ns0:FileName
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">Abc12341</ns0:FileName>
<ns0:ContentType
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">zip</ns0:ContentType>
<ns0:DocumentTitle
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">Abc12341</ns0:DocumentTitle>
<ns0:DocumentAuthor
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">Abc12341</ns0:DocumentAuthor>
<ns0:DocumentSecurityGroup
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">FAFusionImportExport</ns0:DocumentSecurityGroup>
<ns0:DocumentAccount
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">scm/inventoryTransaction/import</ns0:DocumentAccount>
<ns0:DocumentName
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/"
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">Abc12341</ns0:DocumentName>
</types:document>
</types:uploadFileToUcm>
</soap:Body>
여기서 ns0은 모든 매개 변수에서 반복됩니다.
문제는 내가 args를 전달하는 방식 일 수 있습니다.
이 문제를 해결하는 방법은 무엇입니까?
이 질문에 대한 답변을 제공하지 않습니다. 충분한 [평판] (https://stackoverflow.com/help/whats-reputation)이 있으면 [모든 게시물에 주석 달기] (https://stackoverflow.com/help/privileges/comment) 할 수 있습니다. 대신, [질문자의 설명이 필요없는 답변을 제공하십시오] (https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can- i-do- 대신). - [리뷰에서] (리뷰/저품절 포스트/18505097) – ndmeiri
이것은 실제로 질문에 대답하지 않습니다. 다른 질문이있는 경우 [질문하기] (https://stackoverflow.com/questions/ask)를 클릭하여 질문 할 수 있습니다. [평판] (https://stackoverflow.com/help/privileges/set-bounties)을 충분히 확보하면 [현상금 추가] (https://stackoverflow.com/help/privileges/set-bounties)를 통해이 질문에 더 집중할 수 있습니다. 평판). - [검토 중] (리뷰/저품절 게시물/18505097) – Michal
죄송합니다. 위의 수정 사항을 충분히 답변 해 주시기 바랍니다. –