How to override GetWebRequest?

Greetings,
I have a WCF client/server architecture for synchronization purpose (SQL Server <-> SQL CE on WPF). 
Because of the deployment environment (HTTP 1.0 proxy between client and server), I must change the HTTP version of the client's POST messages from 1.1 to 1.0 
It seems that the only way is to override GetWebRequest to change anything I want concerning the HTTP protocol :
protected override WebRequest GetWebRequest(Uri uri)
HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion=HttpVersion.Version10;
return webRequest;
In a perfect world this override can be done by some kind of derivation of a class generated by the service reference, BUT I can't. There seems to miss the adequate class were I can place that code. Some people on the internet have had that kind of problem,
but never with Sync Framework and that kind of Reference.cs file. 
How can I do that ?
Here's the Reference.cs code :
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName = "VinciWCFRef.ISyncVinciSyncContract")]
public interface ISyncVinciSyncContract
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/ApplyChanges", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/ApplyChangesResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, System.Data.DataSet dataSet, SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/GetChanges", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/GetChangesResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/GetSchema", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/GetSchemaResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
SyncSchema GetSchema(string[] tableNames, SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/GetServerInfo", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/GetServerInfoResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
SyncServerInfo GetServerInfo(SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/GetServerChanges", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/GetServerChangesResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
string[] GetServerChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/Genere_ID_Synchro", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/Genere_ID_SynchroResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
string[] Genere_ID_Synchro(SyncGroupMetadata groupMetadata, SyncSession syncSession);
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/ISyncVinciSyncContract/TestConnect", ReplyAction = "http://tempuri.org/ISyncVinciSyncContract/TestConnectResponse")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)]
string[] TestConnect(SyncGroupMetadata groupMetadata, SyncSession syncSession);
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface ISyncVinciSyncContractChannel : Vinci.VinciWCFRef.ISyncVinciSyncContract, System.ServiceModel.IClientChannel
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class SyncVinciSyncContractClient : System.ServiceModel.ClientBase<Vinci.VinciWCFRef.ISyncVinciSyncContract>, Vinci.VinciWCFRef.ISyncVinciSyncContract
public SyncVinciSyncContractClient(){}
public SyncVinciSyncContractClient(string endpointConfigurationName) :
base(endpointConfigurationName){}
public SyncVinciSyncContractClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress)
public SyncVinciSyncContractClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress){}
public SyncVinciSyncContractClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress){}
public SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, System.Data.DataSet dataSet, SyncSession syncSession)
return base.Channel.ApplyChanges(groupMetadata, dataSet, syncSession);
public SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
return base.Channel.GetChanges(groupMetadata, syncSession);
public SyncSchema GetSchema(string[] tableNames, SyncSession syncSession)
return base.Channel.GetSchema(tableNames, syncSession);
public SyncServerInfo GetServerInfo(SyncSession syncSession)
return base.Channel.GetServerInfo(syncSession);
public string[] GetServerChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
return base.Channel.GetServerChanges(groupMetadata, syncSession);
public string[] Genere_ID_Synchro(SyncGroupMetadata groupMetadata, SyncSession syncSession)
return base.Channel.Genere_ID_Synchro(groupMetadata, syncSession);
public string[] TestConnect(SyncGroupMetadata groupMetadata, SyncSession syncSession)
return base.Channel.TestConnect(groupMetadata, syncSession);
Thanks for your help

transferMode=StreamedResponse in the app.config helped me for this issue.
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" closeTimeout="00:45:00" openTimeout="00:45:00"
receiveTimeout="00:45:00" sendTimeout="00:45:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="StreamedResponse"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" realm="" />
</security>
</binding>
</basicHttpBinding>
</bindings>
Squid proxy 3.1.20 didn't like the chunked messages caused by the
transferMode=Streamed
But wait ! There's more !
Now there is still an underlying problem, as the synchronization goes to ~14% :
(badly translated) bad SOAP adress or action. Inner exception : 404 error
this exception fires only when going through the squid proxy. On another network it's fine.
I'm working on that problem, but if you have an idea you'll be my hero.

Similar Messages

  • How to override the create method invoked by a create form?

    Hello everyone, I'm using ADF Faces and have the next question:
    How can I override the create method which is invoked by a create form to preset an attribute in the new row (the preset value is not fixed, I have to send it to the method as a parameter as it is obtained using an EL expression)?
    In the ADF guide I read how to override a declarative method (Section 17.5.1 How to override a declarative method), but this explains how to do it with a method that is called by a button. I don't know how to do the same with a method which is called automatically when the page is loaded.
    I also tried overriding the view object's createRow() method to receive a parameter with the preset values but it didn't work, I believe that was because the declarative create method is not the same as the view object's createRow. This caused the form to display another row from the viewobject and not the newly created one (I also set the new row into STATUS_INITIALIZED after setting the attribute).
    Well, I hope my problem is clear enough for somebody to help me.
    Thank you!

    Hello,
    I'm not sure you can do it with standard generated Create Form.
    In your view object you'll need to create your own create method with parameters, publish it to client interface and invoke instead of standard generated create action in page definition.
    Rado

  • Computer doesn't recognize administrator password.  How to override or reset?

    Computer doesn't recognize administrator password.  How to override or reset?

    You cannot override but you can chage it, the approach depends on the Mac OS X you are using.

  • How to override confirmation fr sending sms? -urgent-

    I made an application that suppose to send an sms automatically. But it always prompts a confirmation question. How to override this? Thank you..

    This is a problem not only when sending to the few people without a data plan but for people roaming with their data connection disabled to control costs. Somehow, my iPhone can tell the other phone is an iPhone even with no data connection and tries to send an iMessage. It would be nice to be able to send a text message right away instead of waiting for the iMessage to fail or perhaps failing to notice that the "Delivered" notice did not appear.

  • HOW TO override/modify default PTG homepage?

    Hi:
    I want to know how to override default portal to go homepage. I've create my wireless app that is already well deployed in a container and already working in PTG. I want to know how to modify the default ptg home. I've removed all apps from ptg to the guests users and just give access to guest to my application. I need a simple default homepage and i need to remove the SETUP link that is always displayed in /PTG/RM page. Also, can anyone tell me how to create a simple url to access my wireless portal?
    for instance i have to write : portal.myorg.pt/ptg/rm and i would like to just hae to write : wire.morg.pt
    How can i achieve this?
    Thanks
    Joao

    I'm using a beta of 10G at the moment. What I did is change the oracle logo (logo.gif) with our own company's logo (http://host:port/ptg/images/logo.gif) (also the wbmp and png file) .
    If you can get access to the webtool http://host:port/webtool/login.uix you can click on the system tab and look for
    System > Wireless Server: Administration > Device (look at component configuration).
    From here you can enable/disable standard interface options
    Multi-Channel Server Setup Menu Configuration
    Enable Login
    Enable Logout
    Enable User Info
    Enable Application Customization
    Enable Global Preset
    Enable User Profile
    Enable Self Registration
    Enable User's Home Page
    Enable Help
    Help URL
    You can change the logon page and other pages on <oracle_home>\wireless\j2ee\applications\ptg\ptg-web\modules\login
    and
    <oracle_home>\wireless\j2ee\applications\ptg\ptg-web\modules\iaswfr
    I'm also curious if there is a more easy way to customize things.
    Thomas

  • How to override truncateToFit method for SuperTabNavigator

    Hi All,
               How to override truncateToFit method for SuperTabNavigator.
    we have editableLabel method for changing the tab name.
    it is dispalying the ... elipse when entered characters grater than the tab width. it is ok.
    but if the entered characters less than the tab width it is also appending the ... elipse.
    i dont want that . how to remove those. i dont want completely truncateToFit option.
    how to override .
    Can any help me regarding this?
    Thanks in Advance
    Raghu.

    Give me a sample codeNo. Read the links provided by Yannix, try it out for yourself, and if you still have a question, post the code you tried.
    db

  • How to override component default events

    How to override the scroll panel default click event to custom event.

    Events bubble by default... It sounds like you want to look at the Event class' stopImmediatePropagation method.

  • How to override iMac password?

    how to override iMac password?

    This discussion is for computer built before 2006.  The same solution probably applies to newer computers.
    You can  change the password on an account.  ( Do you know Unix. You are in a Unix single user console. )  The setup commands you need should be listed on the screen.  For Mac OS 10.4.11, the commands are:
    # Type the follow two instructions to access the startup disk in read/write.
    # check out the filesystem.
    # ( in case of partial success repeat this command until errors go away. )
    /sbin/fsck -fy
    # Gain read / write access to your startup drive
    /sbin/mount -uw /
    ->Start up some utility processes that are needed.
    sh /etc/rc
    ->You will probably need to press the return key once the system stops typing.
    ->To find out the users on the system type, use the ls command. The l is a lower case L:
    ls /Users
    ->One of these accounts will be the administrator.
    ->Pick one of the users which I'll call a-user-name and type it in this command:
    passwd a-user-name
    ->and enter the new user password. You need six characters.
    ->You will need to enter your password twice.  Your typing will not show up on the screen just
    -> press enter when you complete the typing.
    ->For cryptic information on these commands try:
    man ls
    man passwd
    The root account isn't enabled by default. I am not sure if changing the password on root will enable it.

  • How to override the default height of tree component...

    Hi,
    Can anyone please tell me how to override the default height of <af:tree> component.
    Actual Problem:
    I have a PanelBox in which I have a ShowDetail component. ShowDetail contains Tree component. When I click on ShowDetail item the Tree component have to be displayed. But, PanelBox is expanding to TREE default height(27.27 ems) instead of expanding to exact height of Tree.
    How to manage this issue?
    Thanks
    -Sukumar

    Did you already try
               <af:treeTable value="#{bindings.DashProjectPhasesDev.treeModel}"
                                  var="node"
                                  selectionListener="#{bindings.DashProjectPhasesDev.treeModel.makeCurrent}"
                                  rowSelection="none" rowBandingInterval="0"
                             inlineStyle="width:810px; height:1100px;"> Check the last line with inlineStyle...
    Julian

  • One of my kids changed my password, and now i can't access my mail accounts. Any ideas on how to override the password and set up a new one?

    one of my kids changed my password, and now i can't access my mail accounts. Any ideas on how to override the password and set up a new one?

    A mail account password or you login password?
    Which OS by the way?

  • HT1277 I am trying to setup a new email account.  Apple Mail is trying to configure it as an iMAP account but it is actually a POP account.  I cannot figure out how to override that.  What do I need to do?

    I am trying to setup a secondary e-mail account which is a POP account.  However, when I try to setup the new account, Mail detects it as an iMAP account.  Once Mail sets it up as an iMAP account it doesn't work.  I cannot figure out how to override the automatic setup and manually configure it as a POP account.

    Yeah, silly as it seems, OSX is trying to do too much for us, not on 10.8 to test, but try this...
      velocityg4    
    macrumors 68040
    Join Date: Dec 2004 
    Location: Georgia
                I'm not sure why you would want POP over IMAP.  When IMAP is so much more versatile.
    velocityg4
    Anyways if it works like 10.7 Mail.  When adding the account trick it. Do this by just entering some fake email address and password into the boxes and click continue.  It will then say it could not find the correct settings, click continue.  Now you will be given the option to enter everything manually. 
    Now you can choose POP and manually enter the POP and SMTP settings for Yahoo.  Which I believe are pop.mail.yahoo.com, Port 995, SSL and smtp.mail.yahoo.com, port 465, SSL, authentication required. Enter your correct email address now.
    Once added go back to your accounts list and edit it to make sure that it now lists your correct yahoo address and not the fake address in all areas.
    Note: Be sure when entering the fake email address to not use a major provider it likely knows.  So don't choose @gmail, @hotmail, &c instead use something like @weevilfarts.com.
    http://forums.macrumors.com/showthread.php?t=1460262

  • How to override Approve button for list item?

    Hello,
    Is there a way how to override the method that runs after list item is approved / rejected? I know there is a way for the Save button but I can't find how to do it for the Approve button.
    I have a list with approval and workflow. Then I have a page that displays the items from the list in my webpart in a calendar/grid way. The items in the webopart have links leading to the display form with the item ID and Source parameters. Source parameter
    leads back to this page. The background color of the item in the webpart is decided by the approval state of the item.
    When user approves the item and the item form closes user is then sent to the page with the webpart (via the Source parameter) but the workflow takes couple of seconds more to process the aproval so the color is not changed when the webpart renders but if
    the page is refreshed it shows the correct color because the workflow has finished.
    I want to override the Approval method, let it update the item so the workflow can fire and process the approval, delay the form a bit and then continue as usual so when the user is redirected to the webpart page it would render with the correct state.
    I can make a delay page that redirects to the webpart page and change the Source parameter in the items link to go there but it doesn't look that great.
    Or maybe there is a way how to do it in Javascript? I am using it in the new item form using the SP.UI.ModalDialog.showModalDialog(options) function where the dialogReturnValueCallback refreshes the windows after 3 seconds.
    dialogReturnValueCallback: function(dialogResult) {
            if (dialogResult == SP.UI.DialogResult.OK) {
             setTimeout(function(){window.location = "MyPageUrl"}, 3000)
    Thanks for any tips and ideas!

    you can try to achieve this via separate responsibility by personalizing the form by display false on the particular control button..

  • How to override the 'default' partition in composite.xml - urgent

    All,
    Version: 11.1.1.4
    I have created a simple BPEL A which invokes another BPEL B which is deployed to 'default' partition. In the composite.xml of BPEL A I can see the WSDL location of BPEL B as *"http://localhost:7001/soa-infra/services/default/BPELB/BPELB.wsdl"*. I noticed that the name of the partition (i.e in our case its 'default') is hardcoded in the wsdl location. During deployment I want to override to other partition, how I can achieve this?
    thanks
    sen

    If you want to change the partion name at run time then used Token ,value concept and define it in build.xml
    For Example
    <target name="replaceAllValues">
    <input
    message="Please enter full path of the file directory:"
    addproperty="dirPath"/>
    <replace dir="${dirPath}">
    <replacefilter
    token="OldValue."
    value="Newvalue"/>
    </replace>
    </target>
    Call the above target from ant build.xml before you deploying the service.
    Regards,
    Tarak.

  • How to override AD identity template for resource contained in role?

    This is yet another variation on the "I need to compute the container for my AD user, so how do I override the identity template?"
    I have a relatively elegant hack (detailed below)...but it is a hack and I am worried about unintended consequences.
    Details:
    I am running an active sync on a database table representing our HR info. Based on info in the table, I am assigning business roles, such as faculty, staff. Those particular business roles contain an IT role which has an AD resource assigned to it. There are different depths in the tree for students (from the student information system, not HR) vs. employees, so I can't hack it by using AD Department and Division attributes in the identity template.
    Unlike many of the other posts, I am not assigning the AD resource directly. That may not matter, but it feels like that gives it even more opportunity to lose track of the information I might compute on my active sync form.
    I have tried a several things. These were the most promising so far:
    1. Setting accounts[AD].identity in the active sync form. Looking with the IDE debugger, it's there and correct when I leave the active sync form. But by the time the Create User process is invoked, accounts[AD] is nowhere to be found in the user. I see it after I step over the provision task, so I'm looking for it in the right place. (Other attributes, like Description, get set in the active sync form, and are also ignored by the time the user is created.)
    2. Something I thought for sure was going to work: I've mapped distinguishedName in the schema, and set it via a rule in the "Set attribute values" under the resources tab of the role. Then I set the identity template to $distinguishedName$. But that failed because it complained that distinguishedName didn't exist.
    Here's the hack: If I use Description instead of distinguishedName in #2 above, it works: the user is created in the correct AD ou. But Description is abused, and that feels like it's going to be trouble someday. Also, setting the identity template to $Description$ is freaky.
    What's the real way to do this? Do I use the hack except with a custom AD attribute so that Description isn't abused? Do I customize a Create User for my active sync form that sets accounts[AD].identity just prior to the provision task?
    Thanks in advance. -Les

    Steve and Paul: good ideas, and good insight. Thanks!
    For the moment, I am going to pursue the path Steve suggested once I verify that I will be able to assign folks to groups outside of the root container assigned to the different adapter instances. (Employees can enroll in classes, and access to course-related objects is by group, therefore there will a group to assign that's outside of someone's root container...) I don't think this is a problem, though.
    Also, I sort of expected that folks wanted something human-friendly in Division and Department attributes ("Business Office" vs. "buso"). I need to use the department code (not name) in the OU because the name is more likely to change over time, and I don't know how to tell the gateway to move a user between AD containers. I've seen references in the forum of doing that by turning an update into a rename operation, but I don't yet know enough about the product to do anything actionable with that piece of knowledge.
    Thanks again! -Les

  • How to override to_number function?!

    Hi,
    I already tried to find an answer by searching this forum but without success...
    My problem is, that I have a lot of mappings using the to_number() function to convert char into number. Now it turns out, that in some cases - due to the bad data qualtity - fields contain special chars e.g. 1234" Don't ask why ;) Of course the reguIar tu_number() function fails on that. Now I wrote a to_number function that handles the issue by removing all the special chars and then convert. I now want to override oracle's built-in to_number function with my own function.
    Do you have any ideas how that works? As a requirement the solution should be simple... It would be an imense work to edit every mapping. I global solution is preferred. Something like a priority option, to take self written functions first or sth...
    Thanks for any help!
    Cheers Steffen

    Hi,
    you could use OMB to change all occurance of that functino in your project.
    Unfortunately I know OWB allmost only from theory :-( but I remember, that you can set a context to a project or a mapping and all subsequent operations will happen within that horizont.
    As far as I saw, OMB isn't to hard to use, even without days of learning, just by looking for fitting operation, but I know documentation about OMB is pretty poor, almost only syntax reference is available.
    really overriding the pre_build to_number-function might be possible as sys, but I would avoid that or only do in a relly play-instance. I suppose you tried allready simply to run 'create or replace ...' ?
    Thanks for your tip about number checking, but I tried allready many variations functions like that. I never can get it validated:
    I have a function is_number_num, returning 1 for ok, 0 for false, which si working fine on SQL*PLUS, but when I use it splitter-condition, in this variations:
    "IS_NUMBER_NUM"( GRP_IN.ANZAHL,'NLS_NUMERIC_CHARACTERS='',.''') = 1
    I get: PLS-00801 internal error [phdxcsql_canonicalize_sql:state]
    with .... == 1
    I get:
    Line 0, Col 0:
    The expression is not properly formed.
    I have no bloody idea, what that means and what might be wrong in here ? Even google does not return 1 singel page for the error-parameter !
    I tried several versions:
    "IS_NUMBER_NUM"( GRP_IN.ANZAHL,'NLS_NUMERIC_CHARACTERS='',.''') = 1
    also this: "IS_NUMBER_NUM"( GRP_IN.ANZAHL) = 1
    but nothing is accepted !
    Also I made a more easy function for checking for date-format, which works fine in SQL*PLUS, but can't be validated in OWB-splitter.
    Oracle support is playing for time since days !
    thsi function brings same error, depending if I use 1 or 2 "=" !???
    any idea ?
    somehow I have the feeling, I missed 1 easy rule on how to use a splitter-condition correctly ?
    But I can't see anything wrong in my constructions, especially because they are working fine in SQL*PLUS !???
    thanks for any hint, LaoDe

Maybe you are looking for