Variable Response Message Script

In the script below, everything works fine except when the first IF statement is true and the user clicks "Yes", the rest of the script (else if, etc...) does not fire. Originally I didn't have the section in red font but added it trying to solve this problem. Help would be appreciated...
Form1.Subform2.EmailButton::click - (JavaScript, client)
if (NoticeInfo.ExportClassification.rawValue == null || NoticeInfo.ExportClass.rawValue == null){
var nResponse = xfa.host.messageBox("You did not enter an export classification and/or select an export classification statement.\n\n Do you want to continue?", "Export Classification Blank", 1, 2);
if (nResponse == 3)
xfa.host.setFocus("NoticeInfo.ExportClassification");
if (nResponse == 4)
NoticeInfo.ExportClassification.rawValue == null;
else if (Subform3.NDAinPlace.rawValue !== "Yes"){
xfa.host.messageBox("The current NDA in place checkbox was left blank. Parts should not be sent to an external lab without current NDA in place.", "Current NDA in Place?", 0);
   xfa.host.setFocus("Subform3.NDAinPlace");
else{
var vSubject = "External Lab Engineering Request";
var vBody = "Instructions:"; 
event.target.submitForm({cURL:"mailto:?" + "subject=" + vSubject + "&body=" + vBody,cSubmitAs:"PDF",cCharset:"utf-8"});

Hi,
That is how the script is set up. Even without checking the response of the messageBox, you have three main if/else statements:
if (first test condition) {
     messagebox script
else if (second test condition) {
     another messageBox script
else {
     submit form
So, if the first condition is met, the subsequent else if statement and the else statement will not fire.
You may want to move the email script into the if nResponse == 4 script.
Hope that helps,
Niall

Similar Messages

  • Contact form response message not working

    So i am trying to move the location of my response message after the send button has been hit by the user. It comes up at the top of the screen but I want it to appear in a div just below. I read that using javascript should work. Here's what ive put:
    PHP:
    <?php
    if ($_POST){
    if (!filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)){
    $message="Please provide a correct email address";} else {
      $fname = strip_tags($_POST['fname']);
      $sname = strip_tags($_POST['sname']);
      $telephone = strip_tags($_POST['tel']);
      $email = $_POST['email'];
      $comments = strip_tags($_POST['comments']);
      $to = '[email protected]';
      $subject = 'Contact form submitted.';
      $body = $fname. "\n". $sname. "\n". $comments;
      $headers = 'From: ' .$email;
      if (mail($to, $subject, $body, $headers)) {
      echo 'Thanks for contacting us. We\'ll be in touch soon!';
      } else {
      $message = 'Sorry an error occurred. Please try again later.';
    ?>
    <?php echo "<p style='color:red'>$message</p>"; ?>
    Form:
    <div class="contact_form">
    <table class="table">
      <tbody>
    <form id="contactForm" action="" method="post">
        <tr>
          <th scope="row">First Name:</th>
          <td><textarea name="fname"  cols="100" rows="3" id="fname"></textarea></td>
        </tr>
        <tr>
          <th scope="row">Surname:</th>
          <td><textarea name="sname" cols="100" rows="3" id="sname"></textarea></td>
        </tr>
        <tr>
          <th scope="row">Email Address:</th>
          <td><textarea name="email" cols="100" rows="3" id="email"></textarea></td>
        </tr>
        <tr>
          <th scope="row">Telephone Number:</th>
          <td><textarea name="tel" cols="100" rows="3" id="tel"></textarea></td>
        </tr>
        <tr>
          <th scope="row">Comments:</th>
          <td><textarea name="comments" cols="100" rows="10" id="comments"></textarea></td>
        </tr>
        <tr>
          <th scope="row"></th>
          <td height="40px"><input type="submit"></td>
        </tr>
        <tr>
        </form>
        </tr>
      </tbody>
    </table>
    Javascript:
    <script type="text/javascript" src="morris_construction/jquery-1.11.2.min.js"></script>
    <script>
         $("#contactForm").submit(function(event)
             /* stop form from submitting normally */
             event.preventDefault();
             /* get some values from elements on the page: */
             var $form = $( this ),
                 $submit = $form.find( 'button[type="submit"]' ),
                 fname_value = $form.find( 'input[name="fname"]' ).val(),
      sname_value = $form.find( 'input[name="sname"]' ).val(),
      tel_value = $form.find( 'input[name="tel"]' ).val(),
                 email_value = $form.find( 'input[name="email"]' ).val(),
                 comments_value = $form.find( 'textarea[name="comments"]' ).val(),
                 url = $form.attr('action');
             /* Send the data using post */
             var posting = $.post( url, {
                               fname: fname_value,
        sname: sname_value,
        tel: tel_value,
                               email: email_value,
                               comments: comments_value
             posting.done(function( data )
                 /* Put the results in a div */
                 $( "#contactResponse" ).html(data);
                 /* Change the button text. */
                 $submit.text('Sent, Thank you');
                 /* Disable the button. */
                 $submit.attr("disabled", true);
    </script>
    </div><!-- end of contact form -->

    No javascript needed or desired for this solution.
    Instead of
    echo 'Thanks for contacting us. We\'ll be in touch soon!';
      } else {
    echo 'Sorry an error occurred. Please try again later.';
    make them variables, like this:
    $message = 'Thanks for contacting us. We\'ll be in touch soon!';
      } else {
    $message = 'Sorry an error occurred. Please try again later.';
    Then, in the location where you want the message to appear. . .
    <?php echo $message ?>

  • Using c++ variable in apple script

    Hi all,
    I am just calling the apple script from my indesign plugin.
    I need to pass the c++ variable to apple script for opening a file
    This in my apple Script which i have embedded in c++ code
    tell application "TextEdit"
    activate
    open "Users:User1:Library:Preferences:Adobe Indesign:Version 5.0:MathEQ.txt"
    end tell
    The filepath "Users:User1:Library:Preferences:Adobe Indesign:Version 5.0:MathEQ.txt" is stored in the C++ variable char* textFileName.
    I need to use the variable textFileName in apple script which has the path.
    How to go about it?
    Thanks
    Sakthi

    I have a similar problem trying to get data from any field into an AppleScript variable.
    Something like *set phoneNumber to cell "Phone Number" of current record* works fine if you are using the script from a layout that has this field on it.
    But I have a lot of fields on different layouts and I want to have access to all fields in the table, no matter what layout they are on, or what layout is currently active.
    And I want to do this without having to specify on what layout each field is located.
    In the past (FileMaker 6) I used something like *set phoneNumber to (cell "Phone Number" of current record of database 1)* but this is no longer working in FileMaker 9.
    So I was thinking to use something like *set phoneNumber to cell "Phone Number" of current record of table "Table Name"* but that doesn't seem to work.
    The only thing that seems to work is *set phoneNumber to cell "Phone Number" of current record of layout "Layout Name"* but as I said, I don't want to specify the layout for each field.
    Any ideas anyone?
    Message was edited by: khasmir

  • Getting error when passing variable to Matlab script

    Hi
    I am using LabVIEW 2013 Version 13.0f2 (32bit) and MATLAB R2014b (Version: 8.4.0.150421) in Windows 7 Professional  Version 6.1 (Build 7601: Service Pack 1).
    I am trying to pass measured data to a matlab script to plot but I get errors.
    I have made a small program to make the problem easyer to solve and I get this error
    Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: ??? Reference to a cleared variable A.
    . in MatlabTest.vi
    I tried the solution mentioned in http://digital.ni.com/public.nsf/allkb/4475BC3CEB062C9586256D750058F14B though it was intended for an older version. This gave me this error instead
    Error 1048 occurred at LabVIEW:  LabVIEW failed to get variable from the script server. Server:"??? Undefined function or variable 'num'.
    " in MatlabTest.vi
    The problem occures when I try to access the input, in other words I can have inputs to my script as long as I do not use them.
    How can I solve this?
    Attachments:
    MatlabTest.vi ‏7 KB

    Thank you so very much.
    I shold of cours have realised that that was what happened but I always use the three clearing lines (close all, clear all, clc) in the beginning of a script to make sure that no old and irrelevant data corrupts my script and did not think about when the inputs were generated.
    Again, Thank you!

  • OSB and WSDL response message

    Hi all,
    from the WSDL, that I put at bottom of this post, I've created a new OSB project importing the WSDL itself and creating a proxy service based on it.
    I've implemented it using the fn-bea:execute-sql function:
    <ctx:route><ctx:service>{   
    fn-bea:execute-sql (
    $myDataSource,
    'resultset',
    'SELECT id, name, type_id, domi_country_id, open_date, close_date FROM myTable WHERE id=?',
    xs:string($body/urn:clientDataLookup/portfolioNumber/text())
    }</ctx:service></ctx:route>
    For getting the response, in the pipeline reponse I added a REPLACE action:
    Replace [ node contents ] of [ . ]
    in [ body ] with
    [ <urn:clientDataLookupResponse>
    <xmlCntent>{ $result/con:service/resultset }</xmlCntent>
    </urn:clientDataLookupResponse>
    I deduced the above xml response message using the OSB xquery wizard navigating through variable structure section and selecting $body - clientDataLookup (response) variable:
    $body/urn:clientDataLookupResponse/xmlCntent
    from that xpath expression I deduced the above xml response message.
    My question: is that approach correct ? Why should I rewrite the xml response message ?
    I'm wondering how to allow OSB to generate the correct xml response message in automatic way and then use it as template and fill only the xmlCntent param.
    Thanks in advance
    ferp
    <definitions name="ClientDataLookup"
    targetNamespace="http://wsdl/ClientDataLookup.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://wsdl/ClientDataLookup.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="ClientDataRequest">
    <part name="buId" type="xsd:string"/>
    <part name="portfolioNumber" type="xsd:string"/>
    </message>
    <message name="ClientDataResponse">
    <part name="xmlCntent" type="xsd:string"/>
    </message>
    <portType name="ClientData_PortType">
    <operation name="clientDataLookup">
    <input message="tns:ClientDataRequest"/>
    <output message="tns:ClientDataResponse"/>
    </operation>
    </portType>
    <binding name="ClientData_Binding" type="tns:ClientData_PortType">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="clientDataLookup">
    <soap:operation soapAction="clientDataLookup"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:bsource:dataservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:bsource:clientdataservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="ClientDataService">
    <documentation>WSDL File for Client Data Lookup</documentation>
    <port binding="tns:ClientData_Binding" name="ClientData_Port">
    <soap:address
    location="http://localhost:8080/soap/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>

    In most common use cases a service bus transforms the messages from one format to other. In your case you are actually doing the same. You are transforming the message from database structure to the structure which is defined by the WSDL. The snippet you are using is not XML, its an XQuery snippet. There is nothing unusual about it. The tree structure in the left side is given for that purpose only, to facilitate writing XPaths and XQuery snippets. If you do not want to type anything and want to get it graphically (or example when its a big XML), use Eclipse IDE of OSB and create a XQuery transformation which you can call from OSB message flow.
    Edited by: AbhishekJ on Nov 11, 2011 12:57 AM

  • Missing response message in Idoc - WS scenario

    Hello
    I 'm missing a response message in the follwing scenario:
    Idoc-> XI -> Web service (SOAP)
    A Matmas idoc is sent from R/3 to XI. In XI the Idoc is
    mapped to a SOAP message and sent to a web service.
    The Message Interface for the SOAP call is synchronous
    and has a PushMaterialSoapOut and a PushMaterialSoapIn
    messsage, which is defined in the WSDL from the
    web service and imported into XI Repository.
    Everything is working fine but I do not get the response
    message. The web service has sent the response message. I
    have traced the firewall logs and i have seen the
    response.
    What is wrong? Is it basically possible to have a
    scenario like this?
    The message must have arrived somewhere, since the web
    server does not throw an exception. But where is it?
    Thank you in advance
    Thomas

    Hello Stefan
    >Scenarios with IDOCs are always async. Therefore you
    >cannot have a response.
    Ok, so I have to use BPM.
    >How do you want to process the response? What should
    >happen in the sender system?
    I was thinking about an ALEAUD idoc which is sent back
    to R/3. Therefor I have created an synchronous message
    interface with the MATMAS idoc as outgoing message and an
    ALEAUD as incoming message. Accordingly I have a message
    mapping for the response message.
    An other reaction to the response message could be to set
    the message to status failed. But this is the next issue.
    >In some scenarios you might use a BAPI instead of an
    >IDOC for synchronous message processing, but this
    >depends of many circumstance depending ofyour business
    >requirement.
    The process in SAP R/3 is fixed. To move to BAPI is not
    an option.
    Regards
    Thomas

  • How to SIMPLY use the %DIMENSION_TO_SET% variables into logic scripts

    hello,
    I'm using a prompt of type "COPYMOVE" or "COPYMOVEINPUT". In this type of prompt, there are 2 columns of dimension members list, one for defining the "source zone" and one for defining the "target zone" of logics.
    The left colum of the prompt (for source zone) feeds the variables %DIMENSION_SET% : %ACCOUNT_SET%, %ENTITY_SET%, %CATEGORY_SET%, etc...and these variables can be used in the logic scripts in *XDIM_MEMBERSET instructions for example.
    The right colum of the prompt feeds the variables %DIMENSION_TO_SET% : %ACCOUNT_TO_SET%, %ENTITY_TO_SET%, %CATEGORY_TO_SET%, etc...and I don't know how to SIMPLY use these variables in the logic scripts.
    I've found a tricky way to do that but I meet 2 problems :
    - it is complicated
    - the multi-info instruction (BEGININFO/ENDINFO) seems to be bugged as blank lines are added all the time in the code and sometimes I have to wait for minutes when I try to modifiy the package code through BPC for excel eData/modify package menu.
    So the question is how to SIMPLY get the %DIMENSION_TO_SET% variables into logic scripts and use them ? Thanks, R.
    Here is the tricky package code I use at this time (I build one function for each %DIMENSION_TO_SET% variable and I pass these functions to the logic) :
    PROMPT(COPYMOVE,,,,"ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,USER,WS-WW\PlauchuR)
    TASK(Execute formulas,APPSET,US)
    TASK(Execute formulas,APP,SV)
    TASK(Execute formulas,SELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\FROM_1561_.TMP)
    TASK(Execute formulas,TOSELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\TO_1561_.TMP)
    BEGININFO(%FSS%)
    *FUNCTION TARGETACCDETAIL=%ACCDETAIL_TO_SET%
    *FUNCTION TARGETACCOUNT=%ACCOUNT_TO_SET%
    *FUNCTION TARGETCATEGORY=%CATEGORY_TO_SET%
    *FUNCTION TARGETDATASRC=%DATASRC_TO_SET%
    *FUNCTION TARGETENTITY=%ENTITY_TO_SET%
    *FUNCTION TARGETTIME=%TIME_TO_SET%
    *FUNCTION TARGETYEARS=%YEARS_TO_SET%
    ENDINFO
    TASK(Execute formulas,FORMULASCRIPT,%FSS%)
    TASK(Execute formulas,LOGICFILE,D:\BPC\Data\WebFolders\US\SV
    ..\AdminApp\SV\_TEST.Lgf)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Edited by: ALEXANDRE BEDIER on Jun 16, 2010 3:15 PM

    hello,
    finally I've discovered that there is no need of BEGININFO instruction.
    One can pass several functions to a logic with one FORMULASCRIPT task. The functions definitions have to be separated by instructions. See below :
    PROMPT(COPYMOVEINPUT,%FTARGETS%,,"select source and target zone for category and datasource.","ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,FORMULASCRIPT,*FUNCTION TACCDETAIL=%ACCDETAIL_TO_SET% *FUNCTION TACCOUNT=%ACCOUNT_TO_SET% *FUNCTION TCATEGORY=%CATEGORY_TO_SET% *FUNCTION TDATASRC=%DATASRC_TO_SET% *FUNCTION TENTITY=%ENTITY_TO_SET% *FUNCTION TTIME=%TIME_TO_SET% *FUNCTION TYEARS=%YEARS_TO_SET%)
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,%APP%)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\_TEST.LGF)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Then one will be able to use the functions TACCDETAIL, TCATEGORY, TACCOUNT,... in the logic script.
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:31 AM
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:33 AM

  • HOW TO CREATE A VARIABLE IN SAP SCRIPT

    HI ALL,
    CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
    THANK YOU,
    BYE
    TAKE CARE.

    Hi Ravi,
    You can use like this
    A text in the editor contains the following DEFINE commands:
    /: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
    &mysymbol&
    /: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
    / &mysymbol&
    The printed text appears

  • Error:SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. --- There is an error in XML document (1, 447). --- Input string was not in a correct format.

    Hi All,
        We have a scenario of FTP-->PI---> Webservice.  While triggering the data in the FTP, it is failing in the PI with the below error
    SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. ---> There is an error in XML document (1, 447). ---> Input string was not in a correct format.
    Can you please help?

    Hi Raja- It seems to be a data quality issue.
    Check for the value @ 1447 position in the xml message that you are trying to send to web service..
    may be a date filed/decimal value which is not in expected format.

  • 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

  • Sharepoint error - Search Issue - The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1).

    i see this error everywhere - In ULS logs, on site. On the site > Site settings > search keywords; I see this - 
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 7.0 Detailed Error - 500.19 - Internal Server Error</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 40px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px; border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696; border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;'.
    I am facing issues in searching, my managed metadata service is not running, search results page throws internal error. Any Idea why this above error comes.
    P.S: We use windows authentication in our environment.

    Hi IMSunny,
    It seems you have solved this issue based on your another post.
    http://social.technet.microsoft.com/Forums/en-US/aa468ab0-1242-4ba8-97ea-1a3eb0c525c0/search-results-page-throws-internal-server-error?forum=sharepointgeneralprevious
    Thanks
    Daniel Yang
    TechNet Community Support

  • Error consuming Web service - content type text/xml;charset=utf-8 of the response message does not match the content type of the binding

    Hi all,
    We are trying to interact with Documentum server through DFS exposed WCF which communicates through port 9443 and we are provided with documentum issued Public Key certificates. We have successfully imported the certificates in client machine and configured
    the bindings as below in our .Net web application config file.
    <system.serviceModel>
    <bindings>
    <wsHttpBinding>       
    <binding
    name="ObjectServicePortBinding1">
    <security
    mode="Transport">
    <transport
    clientCredentialType="None"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    <binding
    name="QueryServicePortBinding">
    <security
    mode="Transport">
    <transport
    clientCredentialType="None"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    </wsHttpBinding>
    </bindings>
    Also, we set the message encoding as MTOM and the wcf client object initialization code snippet is as below,
    ObjectServicePortClient
    serviceClient = new
    ObjectServicePortClient(new
    WSHttpBinding("ObjectServicePortBinding1"),
    new
    EndpointAddress(UriUtil.ObjectServiceUri));
    if (serviceClient.Endpoint.Binding
    is
    WSHttpBinding)
       WSHttpBinding
    wsBinding = serviceClient.Endpoint.Binding as
    WSHttpBinding;
    wsBinding.MessageEncoding =
    "MTOM".Equals(transferMode) ?
    WSMessageEncoding.Mtom :
    WSMessageEncoding.Text;
    serviceClient.Endpoint.Behaviors.Add(new
    ServiceContextBehavior(Config.RepositoryName,
    Config.DocumentumUserName,
    Config.DocumentumPassword));
    When we execute the above code, we are getting error message as below,
    Exception: The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported
    method is implemented properly. The first 407 bytes of the response were: '<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:VersionMismatch</faultcode><faultstring>Couldn't
    create SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope </faultstring></S:Fault></S:Body></S:Envelope>'
    Then, we changed the bindings as below
    <system.serviceModel>
    <bindings>
    <wsHttpBinding>       
    <binding
    name="ObjectServicePortBinding1">
    <security
    mode="Transport">
    <transport
    clientCredentialType="Certificate"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    <binding
    name="QueryServicePortBinding">
    <security
    mode="Transport">
    <transport
    clientCredentialType="
    Certificate"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    </wsHttpBinding>
    </bindings>
    We are getting another error message,
    Exception: The client certificate is not provided. Specify a client certificate in ClientCredentials.
    Any pointers on resolving this issue would be highly helpful.
    Thanks

    Hi Dhanasegaran,
      As per your case, the corresponding details which may guide you to resolve this issue:
    1. First of all, you can try to call the wcf service directly from the browser & check where it will point out the correct location.
    2. In config file ,Set IncludeExceptionDetailInFaults to true to enable exception information to flow to clients for debugging purposes .
    Set this to true only during development to troubleshoot a service like below :
    <serviceBehaviors>
      <behavior name="metadataAndDebugEnabled">
        <serviceDebug
          includeExceptionDetailInFaults="true"   
    />
        <serviceMetadata
          httpGetEnabled="true"
          httpGetUrl=""   
    />
      </behavior>
    </serviceBehaviors>
    3. I suggest you to change that <security mode ="TransportWithMessageCredential"> instead of <security mode ="Transport">
     for more information, refer the following link :
    https://msdn.microsoft.com/en-us/library/aa354508(v=vs.110).aspx

  • WCF returning "The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)"

    I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
    Does anyone have any suggestions on how to solve this probelm?
    Here is the error:
    The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>500 - Internal server error.</title>
    <style type="text/css">

    I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
    Hi,
    I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
    {"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
    1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
    PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
    5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
    0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
    Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
    I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
    I do have windows Activation Features installed and I am using .Net Framework 4.
    Thanks
    Sofia Khatoon

  • The content type of the response message does not match the content type of the binding

    I have written an ASP.Net web service which returns english,chinese and portuguese data. Everything seemed working fine until the method retunred only english data. The moment it returns english, chinese and portuguese data I get the error:
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using
    a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: 
    '<!DOCTYPE html> <html>     <head>         <title>Runtime Error</title>
            <meta name="viewport" content="width=device-width" />         <style>          body {font-family:"Verdana";font-weight:normal;font-size:
    .7em;color:black;}           p {font-family:"Verdana";font-weight:normal;color:black;margin- -5px}          b {font-family:"Verdana";font-weight:bold;color:black;margin-
             H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }          H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon
    }          pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}          .marker {font-weight:
    bold; color: black;text-decoration: none;}          .version {color: gray;}          .error {margin-bottom: 10px;}          .expandable
    { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }          @media screen and (max-width: 639px) {           pre { width: 440px; o'.
    It is not written using WCF ... any workarounds?!
    Thank you.

    Hi Raj Krish,
    For ASP.NET related issue, please post to the following forum:
    http://forums.asp.net/
    Regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • In Synch comm, what happens to response message if sender fails?

    Hi All,
    I have came up with the following question:
    I have a synchronous scenario type: WS -> PI -> Proxy.
    Lets say that the external system is able to consume the Web Service, and send the data to PI, and from there to the SAP ERP.  SAP ERP starts processing the message (calling function, BAPIs, etc). During that execution the external system for some how cuts its connection (session) to the WS that PI is exposing.
    What will happen then?
    In SAP ERP I will have some processes that were executed, the response message will be sent back to PI, but not to the legacy system.  So the data will not be consistent, as ERP was able to perform its process but the Legacy system will never know that these were done, so I will have an unbalanced scenario.
    One of my questions is, will SAP ERP know that the connection between the legacy system and PI was cut, and there for ERP will stop, cancel or not perform its processes?
    If the response message was sent back to PI by the ERP, but this message could not reach the legacy system. How can we let know the legacy system that ERP did all of its processes and that it should "update" their data according to the response message sent by ERP?
    As we all know, we can not re-process a synchronous message. So, what will be the best way to mantaining the consistency of the DATA between the two systems (ERP - Legacy)?
    Thanks and regards,
    Felipe

    One of my questions is, will SAP ERP know that the connection between the legacy system and
    PI was cut, and there for ERP will stop, cancel or not perform its processes?
    There is a possibility of triggering an alert when your Target system is down (i suppose this is what you mean when you say connection is cut)....the udf can be implemented in a mapping.....just check the blog:
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    from the blog:
    We can use this code in the Exception Handler block of the try u2013 catch block of the code to
    publish the JMS message, and, whenever the JMS service was down, the Exception handler block is
    called and the Alert is triggered to the Operations Support team.
    check if this suits your requirement
    Regards,
    Abhishek.

Maybe you are looking for

  • ITunes graphical problems

    I'm having a lot of graphic issues with iTunes since I built my Windows 7 64 bit PC. On XP I had no issues with this though, what is occoring is a smear of albums under music when scrolling and even text if I display in list mode. Here is a picture o

  • Presentation of columns in a workbook or in a query view

    Hi With BW3, it was easy to change .the size of a column in a query view and then to freeze it . I can't find the way to do that in BI 7 Can somebody help me with that? Thanks Claude

  • List of stock by storage bin

    Hi, I need to display a list of materials by storage bin. How to display in this list the quantity and valuation of stock for each material and for each storage bin. Thanks for your comments and suggestions.

  • Bit rate-to-capacity chart?

    Hi all, I'm new to making DVDs, so my apologies if this is a simple question. I have looked here and on Google but I've not found exactly I'm looking for. Let's say I've got 2 hours of material I want to put on a DVD. What's the easiest way to calcul

  • FileUpload does not work in MVC application

    I created an MVC application with controllers and views for the different frames (header.do/header.htm, menu.do/menu.htm, toolbar.do/toolbar.htm, statusdo./status.htm, detail.do/detail.htm). The main-controller is front.do, the main-view is front.htm