WCF - Custom WSDL (Authentication)

I`m looking for a way to generate a WSDL based on the permissions the user has.
We using DigistAuthentication for authorization.
What we have so far..
When the user logon with his credentials I can produce the WSDL for this user because I have the UserIdentity and I can use IWsdlExportExtension with ExportContract to create the WSDL for this user.
Whats the problem..
After a user did logon to the webservice, the service description is created for the first user which logged on. I would like to be able to generate the WSDL (ServiceDescription) for each user.

Since the authentication is not occurring where the service is hosted, the solution will be to hand-craft a WSDL file, and then tell WCF to reference it using
externalmetadatalocation.

Similar Messages

  • WCF Custom adpter configuration to CRM

    Hi,
    I am using WCF-Custom send port to communicate to CRM WCFService. I am getting the below error. I am not able to edit any properties. 
    Error Description: System.Configuration.ConfigurationErrorsException: The binding at system.serviceModel/bindings/ws2007HttpBinding does not have a configured binding named 'UserNameWSTrustBinding_IWSTrust13Async1'. This is an invalid value for bindingConfiguration.
       at System.ServiceModel.Configuration.BindingsSection.ValidateBindingReference(String binding, String bindingConfiguration, ContextInformation evaluationContext, ConfigurationElement configurationElement)
       at System.ServiceModel.Configuration.IssuedTokenParametersEndpointAddressElement.Validate()
       at System.ServiceModel.Configuration.IssuedTokenParametersElement.ApplyConfiguration(IssuedSecurityTokenParameters parameters)
       at System.ServiceModel.Configuration.IssuedTokenParametersElement.Create(Boolean createTemplateOnly, SecurityKeyType templateKeyType)
       at System.ServiceModel.Configuration.SecurityElementBase.CreateBindingElement(Boolean createTemplateOnly)
       at System.ServiceModel.Configuration.SecurityElement.CreateBindingElement(Boolean createTemplateOnly)
       at System.ServiceModel.Configuration.SecurityElementBase.CreateBindingElement()
       at System.ServiceModel.Configuration.CustomBindingElement.OnApplyConfiguration(Binding binding)
       at System.ServiceModel.Configuration.CustomBindingElement.ApplyConfiguration(Binding binding)
       at Microsoft.BizTalk.Adapter.Wcf.Converters.BindingFactory.CreateBinding(String wcfExtensions, String bindingName, String bindingConfiguration, String bindings)
       at Microsoft.BizTalk.Adapter.Wcf.Config.CustomTLConfig.CreateBinding(THConfig thConfig)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)

    Laxme,
    As suggested by M.R.AshwinPrabhu,.
    in his post below.
    http://social.msdn.microsoft.com/Forums/en-US/c94dd38a-7322-4286-8dc6-e1e57c0c22c4/getting-error-while-try-to-create-an-record-in-crm-2011-from-biztalk-2010?forum=biztalkgeneral
    Try following steps:
    First make sure basic are correct:
    Ensure the security configuration in your WCF send port are correct.
    Make sure your binding matches with the client's binding.
    Follow these solutions:
    In many user's cases this issue is also due to clock's synchronization. Try as mentioned in the below mentioned link in reference section.
    If the above doesn't work try this
    Reference:
    http://weblogs.asp.net/pabloperalta/archive/2012/05/14/quot-an-error-occurred-when-verifying-security-for-the-message-quot-when-executing-savechanges.aspx
    WCF
    Message Authentication Failure
    http://parwej.wordpress.com/2009/09/04/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party/
    Adding
    to it, i would also suggest to check the certificate, it should be there in "trusted root provider" folder.
    Rachit
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful
    by clicking the upward arrow mark next to my reply.

  • WCF Custom - Solicit response port - System.ArgumentException: The provided URI scheme 'https' is invalid; expected 'http',

    Hi,
    BizTalk WCF Custom Adapter - is send in a solicit response port. It works with a http address.
    However, I need to point it to a Https location.
    I imported the bindings, and changed the address to https. I was able to re-import the bindings. The send port gets started. But, when we try send a message via the send port, it throws an error:
    Error Description: System.ArgumentException: The provided URI scheme 'https' is invalid; expected 'http'.
    Parameter name: via
    Any help is appreciated.
    Regards,
    Sharmishtha

    The error logs do not give any other information.
    Also, security is TransportCredentialOnly, with Basic - Client Credential Type.
    Regards,
    Sharmishtha
    Hi Sharmishtha,
    TransportCredentialOnly mode
    does not provide message integrity and confidentiality. It provides HTTP-based client authentication. You need to use either of the below security mode :
    Transport
    TransportWithMessageCredential
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Nonce property in WCF custom adapter

    Hello All,
    How to configure Nonce property in WCF Custom Adapter in Biztalk.
    I have created custom assembly as mentioned in other blogs(http://weblog.west-wind.com/posts/2012/Nov/24/WCF-WSSecurity-and-WSE-Nonce-Authentication), where we can create UsernameToken to specfy it, but how to use it?
    I have added it into GAC, but biztalk is not referring it.
    Pooja Jagtap Software Engineer KPIT Cummins

    Hi,
    You should look into the following articles first:
    http://msdn.microsoft.com/en-us/library/ms731075.aspx
    http://msdn.microsoft.com/en-us/library/dd203050(v=bts.10).aspx#BKMK_ConsumeWCFSvc
    You don't even necessarily need to code a new binding. Using the WCF-Custom adapter, you can choose your binding as customBinding (in the bindings tab of the port configuration), and then specify which binding elements should constitute your binding.
    Of course, another workaround is to call a WSE 3.0 service using a developed external assembly in an orchestration.
    Hope the information helps.
    Best regards,
    WenJun

  • How do I support multiple custom WSDL files in one application?

    I am developing an application that will integrate with SOD. This application will be run at multiple customers - each of which could have their own set of custom fields defined for the various objects that we're interested in. Is there a web service that allows you to access custom objects and fields in a generic fashion or am I going to have to obtain each customer's custom WSDL file and write some sort of adapter for each that plugs into our main integration logic?
    Based on everything I've tried and read, it seems like the latter is true.
    Edited by: user3029444 on Mar 27, 2009 5:11 AM

    Hi !
    As I am developing many customer applications with OCOD interface, I confirm that the only way I see is to have an adapter. For example, having a folder WSDL containing one sub folder for each customer. And these sub folders will contain the customer specific wsdl.
    Then you'll have to run your application in a customer context, I mean knowing who is running the application and then set your wsdl path regarding this identification.
    Hoep this will help, feel free to ask more !
    Max

  • Custom DB authentication to an application from Oracle Portal not working.

    Hi All,
    We have a Portal customized and integrated to LDAP for SSO.
    From the portal, we have a link that takes to another custom application that requires another level of authentication. We have implemented this authentication as custom Database based authentication.
    When user login to the portal and access this link, he will be directed for authentication again. This custom application has been installed on a different OC4J instance while Oracle Portal is running in a different OC4J instance.
    Issue is though user details are being propagated to the custom application page, we are receiving an error saying authentication failed.
    In the OC4J instance specific for this custom application, we have configured jazn.xml to use custom authentication.
    Below is the code:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <!DOCTYPE jazn PUBLIC "JAZN Config" "http://xmlns.oracle.com/ias/dtds/jazn-9_04.dtd">
    <jazn provider="XML" location="./jazn-data.xml" default-realm="jazn.com">
    <property name="role.mapping.dynamic" value="true"/>
    <property name="custom.loginmodule.provider" value="true"/>
    </jazn>
    and in jazn-data.xml, we gave the role mapping.
    But the problem is when the link to the custom application is accessed, it seems like the custom autentication mechanism is not working.
    Can anyone throw light on this?
    Do we need to give the same configuration in the j2ee/home/config directory files also?
    Can we use both LDAP and custom DB authentication with in the same OAS setup. Remember as of now, Portal and custom application are running in different OC4J instances but within the same OAS.
    Any help in this regard will be highely appreciated.
    Thanks,
    Sasi Bhushan

    Hi All,
    We have a Portal customized and integrated to LDAP for SSO.
    From the portal, we have a link that takes to another custom application that requires another level of authentication. We have implemented this authentication as custom Database based authentication.
    When user login to the portal and access this link, he will be directed for authentication again. This custom application has been installed on a different OC4J instance while Oracle Portal is running in a different OC4J instance.
    Issue is though user details are being propagated to the custom application page, we are receiving an error saying authentication failed.
    In the OC4J instance specific for this custom application, we have configured jazn.xml to use custom authentication.
    Below is the code:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <!DOCTYPE jazn PUBLIC "JAZN Config" "http://xmlns.oracle.com/ias/dtds/jazn-9_04.dtd">
    <jazn provider="XML" location="./jazn-data.xml" default-realm="jazn.com">
    <property name="role.mapping.dynamic" value="true"/>
    <property name="custom.loginmodule.provider" value="true"/>
    </jazn>
    and in jazn-data.xml, we gave the role mapping.
    But the problem is when the link to the custom application is accessed, it seems like the custom autentication mechanism is not working.
    Can anyone throw light on this?
    Do we need to give the same configuration in the j2ee/home/config directory files also?
    Can we use both LDAP and custom DB authentication with in the same OAS setup. Remember as of now, Portal and custom application are running in different OC4J instances but within the same OAS.
    Any help in this regard will be highely appreciated.
    Thanks,
    Sasi Bhushan

  • Error in WCF custom behaviour

    Hi All,
    Its been quite some time i am struggling with this issue.
    we have a wcf custom behavior which validates the schema. on top of that i have implemented logic to remove any attachment node (in received xml file we have a record called attachments which intern contains element which holds attachment data) if size is
    greater than 2.5MB then re construct the element with value saying "your attachment has been removed".
    code every thing is working fine with single message but when do a load test (with thread = 5 and number of test =10 in SOAP UI ) then getting a below warnings. (with single thread is working fine)
    The adapter "WCF-CustomIsolated" raised an error message. Details "System.Xml.XmlException: The input source is not correctly formatted. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String
    arg1, String arg2, String arg3) at System.Xml.XmlBufferReader.ReadValue(XmlBinaryNodeType nodeType, ValueHandle value)
    The adapter "WCF-CustomIsolated" raised an error message. Details "System.Xml.XmlException: The prefix 'k' is not defined.at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2,
    String arg3)
    below is the code used to read the attachment size 
    using (AttachmentReader = message4.GetReaderAtBodyContents().ReadSubtree())
                                while (AttachmentReader.Read())
                                    if (AttachmentReader.IsStartElement())
                                        strNs = AttachmentReader.NamespaceURI;// read the namespace of message for schema validation
                                    while (AttachmentReader.ReadToFollowing(AtmtNode)) //read attachment node
                                        countAttachment = countAttachment + 1; //count the number of attachments in a message
                                        AtmtSize = AtmtSize + AttachmentReader.ReadElementContentAsString().Length;// check the size of attachment content node
                                AttachmentReader.Close();
    //check of the size greater than 2.5MB
    IsSizeMax = (AtmtSize > System.Convert.ToInt32(validateAtmtSize)) ? true : false;
    //if size is greater than 2.5MB then remove the attachment node and reconstruct the same
    if (count == attachmentCount) // Finally write the attachment node with configured message (converted to base64) this will read all the attachment nodes and writes only one record inspite of multiple attachments
                                                if (HasAtbt) // if "attachments" record has any attributes then create attachments record with
    along attributes
                                                    wr.WriteStartElement(AtmtRecord, Ns);//This will create "attachments" record with
    attribute
                                                    wr.WriteElementString(AtmtName, "RemovedAttachment.txt");//"attachment_content_name"
                                                    wr.WriteElementString(AtmtType, "text/plain");//"attachment_content_type"
                                                    wr.WriteElementString(AtmtNode, Msg);//attachme content node
                                                    wr.WriteEndElement();wr.Flush();
                            wr.Close();
                            bodyReader.Close();
                            strMsg = SB.ToString();
                            int fIdx = strMsg.IndexOf("</" + RefId + ">");
                            int lastIdx = strMsg.IndexOf("<" + RefId);
    parashuram

    Hi,
    Please refer to the Q and A
    http://code.msdn.microsoft.com/windowsapps/How-to-integrate-BizTalk-07fada58/view/Discussions

  • WCF-Custom performance problem with large response messages

    We're trying to debug a performance issue in Biztalk 2013 when using a WCF-Custom adapter to call en external WCF-enpoint.
    From a Biztalk orchestration we're calling en external WCF-service to retrieve an xml message sometimes containing a lot of Base64 encoded data. The response message can be up to 10Mb in size. The send port is very slow in retrieving the response
    and a 10Mb message can take up to 3min to retrieve. For comparison we've made a console program with the same service reference and binding as the Biztalk adapter uses and we can retrieve the same message in about 3 seconds.
    The WCF is using binary encoding over http and we've set the maxMessageSize, maxBufferSize and maxBufferPoolSize to Int32-MaxValue. We realise that using Biztalk there will be overhead because the message is put into the message box but we're unsure how
    to improve the performance of the send port.
    Any suggestions?

    Hello,
    There are certain Optimization you can do with your BizTalk.
    1)The first thing that I would do is to check the BizTalk SQL server jobs are running correctly
     (SQL Sever Mgmt Studio –> SQL Server Agent –> Jobs). Lookout for the jobs with the word “CleanUp” in them.
    2)Another check that you could do is to verify the entries in the Spool table
     (Database[@Name='BizTalkMsgBoxDb']/Table[@Name='Spool']). Ideally, the number of entries should not be HUGE
     (as in not over 100/200 entries)
    3) Create seperate host and host handler for your send Port.
    4) Set The MaxReceiveInterval from adm_service(BizTalk Management DB) class table 100 ms from 500(By default).
    5)Increased the Throttling Settings Internal message queue size to 1000 from 100 In new Application Host.
    6)Set the Maximum number of messaging engine threads per CPU to 40 (By default it is 20).
    7) Add Max connection in your BTSNTSVC.exe.config file
    <system.net>
                <connectionManagement>
                            <add address
    = “*” maxConnections = “300” />
                </connectionManagement>
    </system.net>
    For other setting you can look for BizTalk Optimization Guide
    http://www.microsoft.com/en-ca/download/details.aspx?id=10855 
    Above setting are for generic performance enhancement purpose.
    Note: You can verify through Orchestration debugger or Orchestration tracing how much time send port is and pipeline is taking to publish the message to Biz Talk again .
    These will give you better picture what more settings you need to apply .
    Thanks
    Abhishek

  • How to use a custom database authentication with APEX_AUTHENTICATION??

    i have Custom user authentication method.
    create or replace function user_check(username varchar2,password varchar2) return boolem
    is
    check_out integer;
    begin
    select count(*) into check_out from "user" where USER_EMAIL=username and USER_PASS=password;
    if check_out >0 then
    return true;
    else
    return false;
    end if;
    end;
    apex_authentication.login() how to use. And how to make apex_authentication.login() use my method Verify User Login

    You can't mix custom authentication and the internal APEX authentication functions.. So either you use the pre-built user authentication in APEX or you can build your own CUSTOM authentication...
    Many examples of custom authentication are out there...
    Thank you,
    Tony Miller
    Ruckersville, VA

  • Using custom wsdl to esb routing service node

    Hi,
    I am working on a ESB flow, The entire flow works with ESB generated WSDLs. But, now, I want to use our own WSDL files, so I configured the starting Routing Service node to use existing WSDL.
    To do this, I made the following changes.
    Initially I was feeding XML file throug a File Reader node, and it was easy to test. Now, since I am working with our own WSDL, I removed File Reader node and created another Routing Service node with uses our custom WSDL file. I am now testing the flow by using OC4J web services feature. It provided me a web based form where in I can populate/feed values in. When I do this, I get an error like below:
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Software caused connection abort: connect
    Does anybody know how to fix this?
    Thanks,

    sorry your '"mysoapaction"' funda didnt work....
    can you tell me that what should be the value in p_url??
    http_req := utl_http.begin_request(p_url, 'POST', 'HTTP/1.1');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(request_text));
    utl_http.set_header(http_req, 'SOAPAction', p_soap_action);
    utl_http.write_text(http_req, request_text);
    http_resp := utl_http.get_response(http_req);
    utl_http.get_header_by_name(http_resp,'Content-Length',l_head_out);
    l_cont_length := to_number(l_head_out);
    IF l_cont_length > 0
    THEN
    utl_http.read_text(http_resp, p_response);
    END IF;

  • WSA wsdl-gen won't get a custom WSDL

    Hi,
    I'm trying to make Web Service Assembler in OC4J 10.1.2 get my custom WSDL file, but it won't no matter what i change. This is the config file i'm using now:
    <web-service>
         <display-name>Web Service Demo</display-name>
         <description>Web Service Demo for OC4J</description>
         <destination-path>./build/wsd-services.ear</destination-path>
         <temporary-directory>c:\temp</temporary-directory>
         <context>/wsdemo-ws</context>
         <stateless-java-service>
         <interface-name>es.wsd.services.DemoServiceInt</interface-name>
         <class-name>es.wsd.services.DemoService</class-name>
         <uri>/demoService</uri>
         <java-resource>./bin</java-resource>
         </stateless-java-service>
         <wsdl-gen>
         <wsdl-dir>./wsaconfig</wsdl-dir>
         <option name="force">false</option>
         <option name="packageIt">true</option>
         <option name="httpServerURL">http://localhost:8888</option>     
         </wsdl-gen>
    </web-service>
    Well, i have a DemoServiceInt.wsdl file in the wsaconfig folder hanging from my project's root, and use this ant target to launch WSA:
    <property name="WSA.dir" value="c:\desarrollo\java\oc4j\webservices\lib"/>
    <property name="WSA.dir.config" value="./wsaconfig"/>
    <target name="build.wsa" depends="build.src">
    <java jar="${WSA.dir}/WebServicesAssembler.jar" fork="true">
         <arg value="-config"/>
         <arg value="${WSA.dir.config}/config.xml"/>
    </java>
    </target>
    Thank you in advance.
    Best regards.
    Juan Alvarez Ferrando

    Let's take it one step further. Reset your network settings on your touch. Tap Settings > General > Reset > Reset Network settings. When it restarts, log back onto your network.
    Since you are using the same router as before as your access point, what really has changed? The default on DNS is "Use ISP's DNS" isn't it?

  • WCF-Custom Biztalk 2013 - Access to SQL Server 2014 Database

    Hi,
    i don't see nowhere of capability from the Biztalk adapter to access differente version of Sql server.
    I want to send ou receive information with a WCF-Custom from SQL Server 2014, i'm in Biztalk 2013 (not R2 ) it's possible ?
    Do you have a link or a list of version autorized to accessed by the wcf-custom Sql binging ?
    Thanks a lot

    Hi, I can suppose that the main problem for Joao is not if it works in general or not.
    The real problem is that he is not sure if this configuration is officially supported by Microsoft.
    If you are developing an integration project for a client you need to have this guarantee. If not, you can have an unsupported scenario, and if something fails you could have a big problem with your client.
    If I were you, I would talk with the client account manager about this.
    Regards.

  • Example of custom external authentication

    Where can I find the example of custom external authentication
    which Paul Encarnation has written since most of the links on
    the discussion forum mails seem to be outdated.
    Thanks

    Where can I find the example of custom external authentication
    which Paul Encarnation has written since most of the links on
    the discussion forum mails seem to be outdated.
    Thanks

  • BizTalk 2010 - WCF-Custom Adapter with sqlbinding - rror was encountered while attempting to transmit the message

    BizTalk 2010 RTM version with SQL 2008 R2 .
    An intermittent issue with the WCF-Custom adapter with sqlbinding, calling a SQL stored proc as below
    Message gets suspended in BT Admin console  with "An internal server error was encountered while attempting to transmit the message" .
    Event log shows 
    A message sent to adapter "WCF-Custom" on send port "xxx" with URI "mssql://server/db?" is suspended.  Error details: Unknown Error Description 
    Any advice please. Thanks
    Sullu.
    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks

    Hi Chen
    Is there any update on this please ?
    I have applied the latest CU and have noticed the following issue.
    BizTalk 2010 Enterprise Edition with BizTalk 2010 CU6 and CU3 for BizTalk Adapter Pack works fine , no issues noticed.
    However ,
    On a DEV VM ,BizTalk 2010 Developer Edition with BizTalk 2010 CU6 and CU3 for BizTalk Adapter Pack still gives the error mentioned in this post.
    In addition Microsoft BizTalk Adapter Pack ,Microsoft BizTalk Adapter Pack(x64) & WCF LOB Adapter SDK are also installed .
    Below is the Error message.
    Message gets suspended in BT Admin console  with "An internal server error was encountered while attempting to transmit
    the message" .
    A message sent to adapter "WCF-Custom" on send port "xxx" with URI "mssql://server/db?" is
    suspended.  Error details:
    Unknown Error Description 
    Could you please check and advice what needs to be done to resolve this ? Thanks .
    Regards,
    Sullu
    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks

  • Custom ldap authenticator to retrieve user bean ldap profile

    Hi,
    Wondering if we could use a custom ldap authenticator to get the user profile from Ldap and put the data bean into session.
    This will allow to use the same connection to Ldap and to benefit from Bea security authentication configuration.
    Any input on this ?
    Thank you

    Increasing the search limit is the only practical solution. Really, ~2000 entries is not that many.

Maybe you are looking for