Postgresでこれに似たXMLを生成するにはどうすればよいですか?登録日、性別、および研究識別子は、データベース内のクエリから取得されます。Postgresから先進的なXMLを生成する方法
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://openclinica.org/ws/studySubject/v1" xmlns:bean="http://openclinica.org/ws/beans">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-27777511"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>userName</wsse:Username>
<wsse:Password>someHashedPassword/wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<v1:createRequest>
<v1:studySubject>
<!--Optional:-->
<bean:label>CBID01</bean:label>
<bean:enrollmentDate>2016-10-28</bean:enrollmentDate>
<bean:subject>
<!--Optional:-->
<bean:gender>f</bean:gender>
</bean:subject>
<bean:studyRef>
<bean:identifier>Clinical_AutoID</bean:identifier>
</bean:studyRef>
</v1:studySubject>
</v1:createRequest>
</soapenv:Body>
</soapenv:Envelope>
これを行うための事前構築された方法はないようですが、次のガイドが役立つかもしれません。 https://www.treshna.com/postgresql-and-soap-xpath/。あなたは特に、Soapエンベロープを生成する必要がありますか、あるいは同様の構造を持つXMLを生成する必要はありますか? – Alex
私はちょうど同様の構造を生成する必要があります –
あなたが作成しようとしている構造のモックアップを提供できますか?あなたが与えた例の問題は、石鹸の封筒がかなり特殊な構造であることです。パスワード、ユーザー名トークンなどが必要ですか?必要なものに近いサンプルを作成できる場合は、アドバイスが容易になります。 – Alex