Skip to content

throw new PolicyViolationException("ERROR: No security header found in the message"); #458

@9611667063

Description

@9611667063

<!-- Types section -->
<types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               elementFormDefault="qualified"
               targetNamespace="http://localhost:8000/ibis/ws/1698157283592/Webservice111">
        <xs:element name="sayHello" type="xs:string"/>
        <xs:element name="sayHelloResponse" type="xs:string"/>
    </xs:schema>
</types>

<!-- Messages -->
<message name="Header">
    <part name="messageAddressing" element="wsc:MessageAddressing"/>
</message>
<message name="sayHelloRequest">
    <part name="parameters" element="wsc:sayHello"/>
</message>
<message name="sayHelloResponse">
    <part name="parameters" element="wsc:sayHelloResponse"/>
</message>

<!-- PortType -->
<portType name="WebservicePortType">
    <operation name="sayHello">
        <input message="wsc:sayHelloRequest"/>
        <output message="wsc:sayHelloResponse"/>
    </operation>
</portType>

<!-- Binding -->
<binding name="WebserviceBinding" type="wsc:WebservicePortType">
    <wsp:PolicyReference URI="#WebserviceBindingPolicy"/>
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
        <soap:operation soapAction="sayHello"/>
        <input>
            <soap:header message="wsc:Header" part="messageAddressing" use="literal"/>
            <wsp:PolicyReference URI="#SigningSecurityPolicy"/>
            <soap:body use="literal"/>
        </input>
        <output>
            <wsp:PolicyReference URI="#EmptySecurityPolicy"/>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>

<!-- Service -->
<service name="Webservice">
    <port name="WebservicePort" binding="wsc:WebserviceBinding">
        <soap:address location="http://localhost:8000/ibis/ws/Webservice"/>
    </port>
</service>

<!-- Policies -->
<wsp:Policy wsu:Id="WebserviceBindingPolicy">
    <wsp:ExactlyOne>
        <wsp:All>
            <wsam:Addressing wsp:Optional="false"/>
            <sp:AsymmetricBinding>
                <wsp:Policy>
                    <sp:InitiatorToken>
                        <wsp:Policy>
                            <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
                                <wsp:Policy>
                                    <sp:WssX509V3Token10/>
                                    <sp:RequireThumbprintReference/>
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:InitiatorToken>
                    <sp:RecipientToken>
                        <wsp:Policy>
                            <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                                <wsp:Policy>
                                    <sp:WssX509V3Token10/>
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:RecipientToken>
                      <sp:AlgorithmSuite signatureAlgorithm="SHA256withRSA">
                <wsp:Policy>
                    <sp:Basic256Sha256/>
                </wsp:Policy>
            </sp:AlgorithmSuite>
                    <sp:Layout>
                        <wsp:Policy>
                            <sp:Strict/>
                        </wsp:Policy>
                    </sp:Layout>
                    <sp:IncludeTimestamp/>
                    <sp:OnlySignEntireHeadersAndBody/>
                </wsp:Policy>
            </sp:AsymmetricBinding>
            <sp:Wss11>
                <wsp:Policy>
                    <sp:MustSupportRefIssuerSerial/>
                    <sp:MustSupportRefThumbprint/>
                    <sp:MustSupportRefEncryptedKey/>
                </wsp:Policy>
            </sp:Wss11>
            <sp:Trust13>
                <wsp:Policy>
                    <sp:MustSupportIssuedTokens/>
                    <sp:RequireClientEntropy/>
                    <sp:RequireServerEntropy/>
                </wsp:Policy>
            </sp:Trust13>
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>

<wsp:Policy wsu:Id="SigningSecurityPolicy">
    <sp:SignedParts>
        <sp:Body/>
    </sp:SignedParts>
</wsp:Policy>

<wsp:Policy wsu:Id="EmptySecurityPolicy">
    <sp:EncryptedParts>
        <sp:Body/>
    </sp:EncryptedParts>
</wsp:Policy>

this is my wsdl am getting ERROR: No security header found in the message
could please help solve this issue

org.glassfish.metro
webservices-rt
2.4.9

this jar am using
@Tomas-Kraus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions