I have ported over some code from a Windows application to Monotouch.
It is using ASMX Web Services to talk to some API.
The code fails on Monotouch 5 because the method
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWriterForMessage()
is never called.
I have seen that in Mono you will even get a NotImplementedExeption but not in Monotouch. It simply gets ignored.
I need to find a way around this. I have to add custom headers to make the solution work.
Any workarounds or maybe is there even a chance that this will be fixed soon?
(I also filed a bug report, but I'm asking here because I am desperately looking for a workaround).
EDIT:
I found kind of a workaround but it is very annoying to use.
In the auto generated reference file you will have to decorate each and every method with
[SoapHeader( "SessionKeyHeader", Direction = System.Web.Services.Protocols.SoapHeaderDirection.InOut )]
Then implement the custom soap header class but skip the GetXmlWriter() method.
A bug has been filed at Xamarin about this issue.
Related
I have a large preexisting code base depending on many external libraries which all uses \MTd as the runtime setting. This code base is stable and well tested in this configuration.I would prefer to keep it as is.
I am attempting to integrate a new external library into the code base (incase it matters it is the Casablanca REST SDK) however I have just discovered it appears to need to be used with the \MDd setting. I was getting some strange untrackable bug deep in std:shared_ptr when I discovered this problem. When I changed my isolated project to use \MDd casablanca worked much better.
Visual studio does not appear to allow me to have different settings it appears to be either all or nothing in one solution?
Does anyone know of a good work around for this situation? Any suggestions? I'm not even sure where to focus my attention?
1) Can I fake Visual studio out and use both? and if so should I actually do that?
2) Or should I attempt to get a working static library of casablanca? It does not appear possible on the disscussion forum?
3) Or should I just bite the bullet and move the entire solution to \MDd?
4) Lastly, should I just cut my loses and try a different client server framework? A quick search showed for a windows c++ client server solution I could use Boost Asio, Google Client API, WinSock?
This is my first client server implementation and opinions are very welcome.
We actually moved the entire code base to link dynamically. There were other libraries causing some concerns and this seemed like a good time to migrate the code base. Problem solved, at least for now. Thanks for the feedback.
I need to make web-based API calls, using POST. This is very easily achievable via libcurl, but in my case - it is only working via IE API due to special requirements.
I found winapi function URLOpenStream which is working fine, but I did not found way, to use this function with POST data.
Is there are any way to do so? Or use other function, but it should be strictly IE API based.
You can try using WinINET's (wininet.dll) HttpOpenRequest function instead:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384233(v=vs.85).aspx
I'm not sure what version of C++ you are using but I found a code example here in CodeProject:
http://www.codeproject.com/Questions/816567/How-do-I-post-data-using-HttpSendRequest-to-a-loca
I've found "Msxml2.XMLHTTP.6.0" component, which suits me best, JFYI anyone, who will find this question :)
I am trying to connect to a Soap Web service. I am very familiar with C++ , but this is the first time I try anything related to the web. I would like to use visual studio. Can anyone explain how to do it?
Can anyone explain how to do it?
Some notes (this is not a complete list/howto, but more of a guideline):
First, you need to choose a SOAP client library for C++. The best out there (or not the best - that's debatable) seems to be gSOAP.
For gSOAP (the library I am familiar with):
Second, (with gSOAP) you can generate a code base particular to the SOAP endpoints you need to connect with.
Third, add a project in Visual Studio ("project A") that links against this generated code, and hides it's interface behind it's own (A's) interface. This is not mandatory, but it is good practice, ensuring that changes to the generated code, do not force you to recompile your entire code base.
DO NOT EDIT the generated code. That would ensure you can no longer regenerate it, or that when you regenerate it you will have to apply all your edits again. If you have any workaround or processing to be done on requests/responses, implement those in Project A.
Then, write your code based on your Project A.
I am building webparts and self hosted apps for sharepoint 2013, I want to consume the Query String filters that the user sets up, the process should be as simple as specified here on this microsft site.
Unfortunately I dont get the option to send values to 'my web part' but I do for other stock webparts that come with sharepoint. Which leads me to believe I need to implement IFilter or equivelent in my webpart, I have found information into IFilterConsumer interface and IFilterProvider interface on msdn which seems to be exactly what I need, however the documentation has one snag:
NOTE: This API is now obsolete.
So My question is, what is Microsofts new intended way of doing this with Sharepoint 2013.
Ultimately I need to read query variables in the HostWeb request inside my AppWeb code.
Edit: Apparently IWebPartParameters is the new interface for this.... trying to implement now.
I have also tried whats suggested here:
Passing parameters through sharepoint sitepage to web part Still not working, at the moment I have implemented IWebPartParameters, IWebPart, IWebPartRow and none of my functions that implement these interfaces are being called. I must be missing something in the manifest or features file maybe?
Thanks in advance
Crash
Ok the answer to this question is simple, firstly you can only do this in a dev environment with sharepoint installed, as you need access to the sharepoint.dll.
Then this thread answers the question http://www.manning-sandbox.com/thread.jspa?threadID=19791, with the following code solution which is here http://www.markitup.com/BookCodeSamples/TestingWebPartConnections.zip
We may start converting an old VS2003 MFC project to use the fancy new features provided by the MFC Feature Pack and VS2008. Several of the new UI controls would be very nice except for one thing - they automatically save their information to the registry. I don't have a problem with the registry, but for the multiple environments the users use out program from, it's much easier to save user data to the database.
So, I'm hoping that there is one main "access the registry" function that could be overloaded to point the database. But brief investigation hasn't turned up anything. Has anyone else had any success doing something similar?
It seems like it should be possible to do what you're suggesting, according to the information on this page in MSDN. I haven't tried this myself, so I don't know how difficult it will be in practice.
According to the documentation, you should create a class that inherits CSettingsStore to read and write the settings, and call CSettingsStoreSP::SetRuntimeClass so that the framework uses your class instead of the default.
The MFC feature pack uses code supplied by BCGSoft and they added this feature (so you can save state to an XML file, database, etc.) way back in 2001. I don't have the feature pack on this PC but try looking for a class called something like CMFCRegistrySP.
I will check myself tomorrow.
Does the StateCollection sample do this?
http://msdn.microsoft.com/en-us/library/bb983406.aspx