HTTP unsupported Media type issue - ios

i use WCF with ios application, and when request for some method, IIS returns me 415 error, Not Supported Media Type.
Proxy class are generated through wsdl2objc, the same call from windows application works fine

The problem is probably in your WCF service configuration, specifically the binding you're using. I suppose you have configured it to use either custom binding or WSHttpBinding, but in either way the service expects application/soap+msbin1 mime type, but the requests made by the generated classes from wsdl2objc are with text/xml. I'm not quite sure how to fix it, but start by configuring your service for the standard BasicHttpBinding and give it a try. Also revert all changes you've made on the generated code from wsdl2objc.
Btw WSHttpBinding uses SOAP 1.2 and I'm not sure if wsdl2objc can work with it (i have tested it only with BasicHttpBinding).

Related

how to call a soap webservice made in delphi (on apache) from curl

In Delphi 11 Alexandria, I created a simple SOAP webservice using File->New->Soap Server. I asked to create the demo interfaces, I have built the project, corrected Apache conf, and I have copied the DLL inside Apache's module directory.
So, if I request:
http://127.0.0.1:81/xyz/mod_webbroker.dll
I get into the page where I see the interfaces, and I can view the WSDL.
Now, I would like to try to call the demo function (echoDouble) from PHP using curl.
How do I know what address I should use?
I tried:
http://127.0.0.1:81/xyz/wsdl/IMyService/echoDouble/
But it's not working.
Any help?
I understand my doubts now. I have always used "Datasnap rest application" but now I am trying "SOAP server application", that is why I cannot find the correct URL, because they work different. When using "Datasnap rest application" you need to go to a specific URL to get the function but SOAP works different, the base URL is always this (in my case):
http://127.0.0.1:81/xyz/wsdl/IMyService/
Sorry for that, I will switch back to "Datasnap rest application"

How to generate request format for WCF web service method for Mac and iPhone

I am not able to generate request format for WCF web service method for iOS and Mac project bot. which accepts an object as a parameter. Used service url is “ https:// “ for security concern. I am using “WSDL2Objc Parser” and “Sudz-c” both to generate proxy files but its not working properly ( like : it generate some syntax error while creating files) . web service is implemented in .Net language.
At Server side (.Net) we are using wsHttpBinding to be able to use SOAP 1.2 but we can't generate the client proxies - which is dead easy on the Windows box but not so easy on a Mac or iOS.

Create web service using external WSDL through Add Service Reference

I have an ASP.NET MVC3 project in .NET 4 which needs to act as a SOAP server to receive notifications from another website.
I have created web services before, but I don't know how to set up a way to receive these notifications where the WSDL is provided by the external website.
I know I can create a service and get that to produce its own WSDL, but I'm assuming there must be an easy way to add a service reference, and then create a service that uses the objects/methods generated by it.
How do I do this?
Thanks
You can use the svcutil tool from visual studio commands line, to create the required configuration and proxy files

svcutil support for WS-Addressing and WS-Policy

I'm using schema-first web service development approach by hand-coding WSDL/XSD and then feeding it to svcutil tool to generate .NET data and service contracts. I've tried to introduce WS-Addressing into my WSDL by including "UsingAddressing" element both directly into binding and as WS-Policy import. Policy import is ignored, but I get the following error, when "UsingAddress" is included directly into WSDL binding: "WSDL extension element "UsingAddressing" from namespace 'http://www.w3.org/2006/05/addressing/wsdl' was not handled".
According to MSDN, "UsingAddressing" element is supported by WCF (http://msdn.microsoft.com/en-us/library/ms996497.aspx), so is it so, that this element is not supported by svcutil?
For anyone coming across this, I had the same problem trying to generate a proxy with svcutil. I had to generate the proxy via VS2017 and it worked.

Fix non-standard web serverice port on contractRef and docRef

My problem is closely related to this one: How can I use .NET web services from non-standard ports?. My web service runs behind a port-forwarding firewall, so the port numbers reported in the WSDL document contain the internal high-numbered port. I wrote a SoapExtensionReflector class which is able to rewrite the WSDL document. So a request like example.com/path/loginservice?wsdl is handled correctly.
However, this doesn't handle the "disco" request: example.com/path/loginservice?disco. This returns an XML document like this:
<discovery>
<contractRef ref="http://example.com:10092/loginservice.asmx?wsdl" docRef="http://example.com:10092/loginservice.asmx"/>
<soap address="http://example.com/path/loginservice.asmx" binding="q1:LoginServiceSoap"/>
<soap address="http://example.com/path/loginservice.asmx" binding="q2:LoginServiceSoap12"/>
</discovery>
While the soap bindings have been properly re-written by the SoapExtensionReflector, the contractRef and docRef URLs have the high-numbered port. How can I rewrite them as well?
Finally figured something out. Created proxy classes manually using svcutil after migrating everything to WCF. I figure you could probably do the same thing using the wsdl tool that came with the old asp.net web services, but I haven't tried that.

Resources