1

Proxy Generated using the following command


svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://sewsr2.sewinfra.com:8002/webservices/SOAProvider/plsql/fnd_user_pkg/?wsdl

This is Code I created :


    BasicHttpBinding basicHttpBinding = new BasicHttpBinding();           
    basicHttpBinding.Security.Mode = BasicHttpSecurityMode.None;
    basicHttpBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
    EndpointAddress epa = new EndpointAddress("http://sewsr2.sewinfra.com:8002/webservices/SOAProvider/plsql/fnd_user_pkg/");
    FND_USER_PKG_PortTypeClient port = new FND_USER_PKG_PortTypeClient(basicHttpBinding,epa);
    port.ClientCredentials.UserName.UserName ="asadmin";
    port.ClientCredentials.UserName.Password = "welcome";
    SOAHeader header = new SOAHeader();
    InputParameters10 input = new InputParameters10();
    header.RespApplication = "FND";
    header.Responsibility = "FND_REP_APP";
    header.SecurityGroup = "STANDARD";
    header.NLSLanguage = "AMERICAN";
    header.Org_Id = "115";
    input.X_USER_NAME = "sysadmin";
    OutputParameters4 ouput = port.TESTUSERNAME(header, input);
    int value = ouput.TESTUSERNAME.Value;

I am getting Missing <wsse:Security> in SOAP Exception.

Please help me I am a new Bie in .net

This is my app.config file

<system.serviceModel>

    <bindings>

        <basicHttpBinding>

            <binding name="FND_USER_PKG_Binding" closeTimeout="00:01:00"

                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"

                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"

                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"

                useDefaultWebProxy="true">

                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />

                <security mode="None">

                    <transport clientCredentialType="None" proxyCredentialType="None"

                        realm="" />

                    <message clientCredentialType="UserName" algorithmSuite="Default" />

                </security>

            </binding>

        </basicHttpBinding>

    </bindings>

    <client>

        <endpoint address="http://sewsr2.sewinfra.com:8002/webservices/SOAProvider/plsql/fnd_user_pkg/"

            binding="basicHttpBinding" bindingConfiguration="FND_USER_PKG_Binding"

            contract="FND_USER_PKG_PortType" name="FND_USER_PKG_Port" />

    </client>

</system.serviceModel>

user1093428
  • 11
  • 1
  • 3
  • You have set the security mode to be "None". Line 2 above – Rajesh Dec 12 '11 at 10:50
  • its already none, I kept it as BasicHttpSecurityMode.None, So is any other way to give None for security mode. Don't mind if I am wrong I am new to dot net. – user1093428 Dec 12 '11 at 11:10
  • 1
    When the security mode is "None" then there is no security header sent as part of SOAP header which is why you are getting an exception. I guess if your web service does usernamepassword authentication it should be "TransportWithMessageCredentials" – Rajesh Dec 12 '11 at 12:05
  • Why are you using `basicHttpBinding`? Isn't there an overload of the constructor that only accepts the EndPointAddress and not the binding? – John Saunders Dec 12 '11 at 15:31
  • I believe these links will help you. http://stackoverflow.com/questions/5836685/correct-way-communicate-wsse-usernametoken-for-soap-webservice http://stackoverflow.com/questions/7247536/creating-headers-wsse-section-of-wcf-client-programatically-in-c-sharp – Tony Dec 13 '11 at 17:36
  • I want to know what should be the security mode and clientCredentialType should be and what binding should I use. And my WSDL is not https based URL. – user1093428 Dec 14 '11 at 13:07

0 Answers0