-2

We have specific requirements to connect our client code with Datapower Services, as a part of requirement they have provided WS-Policy file so we need help with below items?

Is there any way to automatically create WCF Configuration from WS-Policy file

How can we use X509 public key certificate to encrypt the usernametoken within SoapHeader?

Appreciate your help on this.

Petter Nordlander
  • 22,053
  • 5
  • 50
  • 84
Gaurav
  • 11
  • 1

1 Answers1

0

WS-Policy is a W3C standard. WS-Policy is not specific to DataPower, it's a W3C standard. When communication between different Software stacks, it's always a good idea to use the "standard" terminology. I.e. referring to a SOAP service rather than a WCF service or DataPower web service.

Anyway, svcutil seems to be able to generate WCF configuration/code from ws policy files as well as wsdl files.

Petter Nordlander
  • 22,053
  • 5
  • 50
  • 84
  • Thank you Petter for the response.We tried generating it through below config for svcutil but it is still not generating anything for policy, Can you suggest if we are missing anything.
    – Gaurav Feb 02 '15 at 18:20
  • We are still not able to generate proper configuration from policy file. Is it something supported by WSE or WCF? – Gaurav Feb 03 '15 at 19:51
  • From svcutil docs, it seems like it's supported: `metadataDocumentPath The path to a metadata document (wsdl or xsd) that contains the contract to import into code (.wsdl, .xsd, .wspolicy or .wsmex). Svcutil follows imports and includes when you specify a remote URL for metadata. However, if you want to process metadata files on the local file system, you must specify all files in this argument. In this way, you can use Svcutil in a build environment where you cannot have network dependencies. You can use wildcards (*.xsd, *.wsdl) for this argument.` I guess you should ask MFT. – Petter Nordlander Feb 04 '15 at 09:46