Welcome to thinktecture forums Sign in | Join | Faq

Discussion

Started by ChristianM at 12-17-2007 3:22 PM. Topic has 0 replies.

Print Search
Sort Posts:    
   12-17-2007, 3:22 PM
ChristianM is not online. Last active: 12/17/2007 1:12:22 PM ChristianM

Top 500 Posts
Joined on 12-17-2007
Posts 1
Policy inside WSDL cannot be handled

Hello,

I have following WSDL which inlcudes a WS-Policy which again contains WS-SecurityPolicy Information. The policy is referenced inside the binding of the WSDL.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:td="http://www.testus.net/topic/xsd"

xmlns:td-sys="http://www.testus.net/topic/xsd/sys/common"

xmlns:tns="http://testus.net/topic/wsdl"

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"

xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"

xmlns:types="http://testus.net/topic/wsdl/types/test"

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

targetNamespace="http://testus.net/topic/wsdl">

<wsp:Policy wsu:Id="sig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">

<wsp:ExactlyOne>

<wsp:All>

<sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">

<wsp:Policy>

<sp:InitiatorToken>

<wsp:Policy>

<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">

<wsp:Policy>

<sp:RequireIssuerSerialReference/>

<sp:WssX509V3Token10 />

</wsp:Policy>

</sp:X509Token>

</wsp:Policy>

</sp:InitiatorToken>

<sp:RecipientToken>

<wsp:Policy>

<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">

<wsp:Policy>

<sp:RequireIssuerSerialReference/>

<sp:WssX509V3Token10/>

</wsp:Policy>

</sp:X509Token>

</wsp:Policy>

</sp:RecipientToken>

<sp:AlgorithmSuite>

<wsp:Policy>

<sp:TripleDesRsa15/>

</wsp:Policy>

</sp:AlgorithmSuite>

<sp:Layout>

<wsp:Policy>

<sp:Strict/>

</wsp:Policy>

</sp:Layout>

<sp:IncludeTimestamp/>

<sp:OnlySignEntireHeadersAndBody/>

</wsp:Policy>

</sp:AsymmetricBinding>

<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">

<wsp:Policy>

<sp:MustSupportRefIssuerSerial/>

</wsp:Policy>

</sp:Wss10>

<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">

<sp:Body/>

</sp:SignedParts>

</wsp:All>

</wsp:ExactlyOne>

</wsp:Policy>

<import location="Test.xsd" namespace="http://testus.net/topic/wsdl/types/test" />

<message name="serviceFault">

<part element="types:serviceFault" name="serviceFault" />

</message>

<wsdl:message name="testReq">

<wsdl:part element="types:testinput" name="parameters"/>

</wsdl:message>

<wsdl:message name="testResp">

<wsdl:part element="types:testoutput" name="parameters"/>

</wsdl:message>

<message name="getTargetReq"/>

<message name="getTargetResp">

<part element="types:getTargetResponse" name="parameters"/>

</message>

<message name="getLoadReq"/>

<message name="getLoadResp">

<part element="types:getLoadResponse" name="parameters"/>

</message>

<wsdl:portType name="TestPortType">

<wsdl:operation name="echo">

<wsdl:input message="tns:testReq"/>

<wsdl:output message="tns:testResp"/>

<wsdl:fault name="fault" message="tns:serviceFault"/>

</wsdl:operation>

<wsdl:operation name="getTarget">

<wsdl:input message="tns:getTargetReq"/>

<wsdl:output message="tns:getTargetResp"/>

<wsdl:fault message="tns:serviceFault" name="fault"/>

</wsdl:operation>

<wsdl:operation name="getLoad">

<wsdl:input message="tns:getLoadReq"/>

<wsdl:output message="tns:getLoadResp"/>

<wsdl:fault message="tns:serviceFault" name="fault"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="TestSOAP" type="tns:TestPortType">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsp:PolicyReference URI="#sig" wsdl:required="true"/>

<wsdl:operation name="echo">

<soap:operation soapAction="testEcho"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

<fault name="fault">

<soap:fault name="fault" use="literal"/>

</fault>

</wsdl:operation>

<operation name="getTarget">

<soap:operation soapAction="getTarget" style="document"/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

<fault name="fault">

<soap:fault name="fault" use="literal"/>

</fault>

</operation>

<operation name="getLoad">

<soap:operation soapAction="getLoad" style="document"/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

<fault name="fault">

<soap:fault name="fault" use="literal"/>

</fault>

</operation>

</wsdl:binding>

<wsdl:service name="Test">

<wsdl:port binding="tns:TestSOAP" name="TestSOAP">

<soap:address location="http://localhost:8080/axis2/services/Test"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

Now I host the Web-Service as a Java-Service and I want to generate a client for the service with WSCF. WSCF generates two *.cs-files, an interface and a class.

Inside the generated class is a comment which says: "The required WSDL-element 'PolicyReference' could not be handled". How can I use WS-policy for security inside my WSDL so WSCF can work with it?

With kind regards

Christian Mielke

 


   Report 
thinktecture fo... » WSCF » Discussion » Policy inside WSDL cannot be handled

Powered by Community Server, by Telligent Systems