我希望使用 XML :: Compile 调用以下 Java WS-Security 启用的Web服务,但我不确定它是否可以处理它。例如,我在其CPAN存储库中搜索了标签'EncryptedParts',但未发现任何内容。我看到它可以使用 XML :: Compile :: WSS :: Signature 来处理签名,但除此之外我不知道如何继续。
我正在寻找 XML :: Compile 甚至是Perl?
<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://bean.test.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="MainWSClassService" targetNamespace="http://bean.test.com/">
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="MainWSClassPort_Fault_Policy"/>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="MainWSClassPort_Input_Policy">
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"/>
<sp:Header Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
<sp:Header Name="fmw-context" Namespace="http://xmlns.oracle.com/fmw/context/1.0"/>
<sp:Header Name="SignatureConfirmation" Namespace="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"/>
<sp:Header Name="SignatureConfirmation" Namespace="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"/>
<sp:Header Name="SignatureConfirmation" Namespace="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"/>
<sp:Header Name="SignatureConfirmation" Namespace="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"/>
</sp:SignedParts>
<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
<sp:Header Name="fmw-context" Namespace="http://xmlns.oracle.com/fmw/context/1.0"/>
</sp:EncryptedParts>
</wsp:Policy>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="MainWSClassPort_Output_Policy">
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
</sp:SignedParts>
<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
</sp:EncryptedParts>
</wsp:Policy>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wss11_username_token_with_message_protection_service_policy">
<sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp:Policy>
<sp:RequireThumbprintReference/>
<sp:WssX509V3Token11/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic128/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax/>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp/>
<sp:OnlySignEntireHeadersAndBody/>
</wsp:Policy>
</sp:SymmetricBinding>
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssUsernameToken10/>
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SignedSupportingTokens>
<sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:RequireSignatureConfirmation/>
<sp:MustSupportRefEncryptedKey/>
</wsp:Policy>
</sp:Wss11>
</wsp:Policy>
<types>
<xsd:schema>
<xsd:import namespace="http://bean.test.com/" schemaLocation="https://test.com:443/testWSS_context-root/MainWSClassPort?xsd=1"/>
</xsd:schema>
</types>
<message name="cancelTransfer">
<part name="parameters" element="tns:cancelTransfer"/>
</message>
<message name="cancelTransferResponse">
<part name="parameters" element="tns:cancelTransferResponse"/>
</message>
<message name="cancelDischarge">
<part name="parameters" element="tns:cancelDischarge"/>
</message>
<message name="cancelDischargeResponse">
<part name="parameters" element="tns:cancelDischargeResponse"/>
</message>
<message name="cancelAdmission">
<part name="parameters" element="tns:cancelAdmission"/>
</message>
<message name="cancelAdmissionResponse">
<part name="parameters" element="tns:cancelAdmissionResponse"/>
</message>
<message name="saveDischarge">
<part name="parameters" element="tns:saveDischarge"/>
</message>
<message name="saveDischargeResponse">
<part name="parameters" element="tns:saveDischargeResponse"/>
</message>
<message name="saveTransfer">
<part name="parameters" element="tns:saveTransfer"/>
</message>
<message name="saveTransferResponse">
<part name="parameters" element="tns:saveTransferResponse"/>
</message>
<message name="saveAdmission">
<part name="parameters" element="tns:saveAdmission"/>
</message>
<message name="saveAdmissionResponse">
<part name="parameters" element="tns:saveAdmissionResponse"/>
</message>
<portType name="MainWSClass">
<operation name="cancelTransfer">
<input message="tns:cancelTransfer"/>
<output message="tns:cancelTransferResponse"/>
</operation>
<operation name="cancelDischarge">
<input message="tns:cancelDischarge"/>
<output message="tns:cancelDischargeResponse"/>
</operation>
<operation name="cancelAdmission">
<input message="tns:cancelAdmission"/>
<output message="tns:cancelAdmissionResponse"/>
</operation>
<operation name="saveDischarge">
<input message="tns:saveDischarge"/>
<output message="tns:saveDischargeResponse"/>
</operation>
<operation name="saveTransfer">
<input message="tns:saveTransfer"/>
<output message="tns:saveTransferResponse"/>
</operation>
<operation name="saveAdmission">
<input message="tns:saveAdmission"/>
<output message="tns:saveAdmissionResponse"/>
</operation>
</portType>
<binding name="MainWSClassPortBinding" type="tns:MainWSClass">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#wss11_username_token_with_message_protection_service_policy" wsdl:required="false"/>
<operation name="cancelTransfer">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
<operation name="cancelDischarge">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
<operation name="cancelAdmission">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
<operation name="saveDischarge">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
<operation name="saveTransfer">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
<operation name="saveAdmission">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Input_Policy" wsdl:required="false"/>
</input>
<output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#MainWSClassPort_Output_Policy" wsdl:required="false"/>
</output>
</operation>
</binding>
<service name="MainWSClassService">
<port name="MainWSClassPort" binding="tns:MainWSClassPortBinding">
<soap:address location="https://test.com:443/testWSS_context-root/MainWSClassPort"/>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">
https://test.com:443/testWSS_context-root/MainWSClassPort
</wsa:Address>
<wsid:Identity xmlns:wsid="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<dsig:X509Data>
<dsig:X509Certificate>
MIIC0jCCAjsCCQC3l6TlmarTfzANBgkqhkiG9w0BAQUFADCBqTELMA1IxDzANBgNVBAgTBkFUVElDQTEPMA0GA1UEBxMGQVRIRU5TMUgwRgYDVQQKEz9Tb2NpYWwgSW5zdXJhbmNlIEluc3RpdHV0ZS1VbmlmaWVkIEluc3VyYW5jZSBGdW5kIGZvciBFbXBsb3llZXMxHTAbBgNVBAsTFElLQS+RFzbqAYxkd7e6jaOUpOgdhiB2MlGivNIqG3rVdG0b8C0uV3qWePilnWZB+vnnakEJLQzt/w3JMsJpbU0q1yeUzHQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC1fHcjN9OrAaE6cCoaezje1nEhfkR1MiUa27tctpDwcLZL4Xg0yHqbXmaLl3jffcQHnSdJuRS7tLiKmeM/ZaEIHWDGhjAyf6pG+ruWydmgZLGAki+evqZDh10j2rY0x7A5A
</dsig:X509Certificate>
<dsig:X509IssuerSerial>
<dsig:X509IssuerName>
CN=TEST CA, OU=TEST-E IT Division, O=XXX, L=XXX, ST=XXX, C=XX
</dsig:X509IssuerName>
<dsig:X509SerialNumber>1336456967</dsig:X509SerialNumber>
</dsig:X509IssuerSerial>
<dsig:X509SubjectName>
CN=xxx.test.com, OU=TEST-E IT Division, O=XXX, L=XXX, ST=XXX, C=XX
</dsig:X509SubjectName>
</dsig:X509Data>
</dsig:KeyInfo>
</wsid:Identity>
</wsa:EndpointReference>
</port>
</service>
</definitions>