Mortarello
asked on
Calling WebService from WCF c#
Hello Guys,
I'm trying to create a Custom Binding to call a WebService using ISO8859 with out success.
Does any one could help me please ?
I found some code on internet but did not work.
Many Thanks,
Michel
I'm trying to create a Custom Binding to call a WebService using ISO8859 with out success.
Does any one could help me please ?
I found some code on internet but did not work.
Many Thanks,
Michel
Do you have a WSDL file for the service?
ASKER
Hi kaufmed,
Thanks to your answer...Yes I download some code to add a acustomer binding but without sucess.
Is it possible if I send the projecto to you ? ..There is only one form and I'm traying to consume the Web Service using Iso-8859
Thansk man
Thanks to your answer...Yes I download some code to add a acustomer binding but without sucess.
Is it possible if I send the projecto to you ? ..There is only one form and I'm traying to consume the Web Service using Iso-8859
Thansk man
If it's not sensitive information, then you are welcome to post it.
ASKER
Hi kaufmed,
You can download my project from here..
http://www.mediafire.com/?nn2idh90wr0vez4
Kaufmed, you will see 3 buttons
Addressing --- is working fine ..
Shippiment -- Requires ISO
tracking --- Requires ISO
Thanks man
You can download my project from here..
http://www.mediafire.com/?nn2idh90wr0vez4
Kaufmed, you will see 3 buttons
Addressing --- is working fine ..
Shippiment -- Requires ISO
tracking --- Requires ISO
Thanks man
I won't be able to look at that as my office's proxy blocks MediaFire (and probably most/all of the download sites). You should be able to post the project here. IIRC, you need to remove the bin and obj folders, and the .suo file in the root. When you try to upload the zip, EE will tell you if there are any other offending files.
Outside of that, you can wait to see if someone else pops in who can access the zip you posted. Otherwise, I can review it later tonight when I am home.
Outside of that, you can wait to see if someone else pops in who can access the zip you posted. Otherwise, I can review it later tonight when I am home.
ASKER
Hi Kaufmed,
Thanks to try to help me. The zip file is only 172KB and I'm getting erro to attach the file.
The WSDL is ( http://demo.despatchbay.com/api/soap/v11/shipping?wsdl )
On the Config file I had added ..
<appSettings>
<add key="user" value="1-AZO67F52" />
<add key="password" value="VR1TXCG" />
</appSettings>
This is my method call.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
var SP = new ShippingService.ShippingSe rvicePortT ypeClient( );
var u = ConfigurationManager.AppSe ttings["us er"];
var p = ConfigurationManager.AppSe ttings["pa ssword"];
SP.ClientCredentials.UserN ame.UserNa me = u;
SP.ClientCredentials.UserN ame.Passwo rd = p;
// should make a call to GEtDomesticServicesByPoste Code method to check availibility before adding a shippment.
try
{
var temp = SP.GetDomesticServicesByPo stcode("ha 8 7td");
}
catch (Exception ex)
{
MessageBox.Show(String.For mat("Excep tion Message : {0}",ex.Message));
}
-------------------------- ---------- -------
Thanks to try to help me. The zip file is only 172KB and I'm getting erro to attach the file.
The WSDL is ( http://demo.despatchbay.com/api/soap/v11/shipping?wsdl )
On the Config file I had added ..
<appSettings>
<add key="user" value="1-AZO67F52" />
<add key="password" value="VR1TXCG" />
</appSettings>
This is my method call.
--------------------------
var SP = new ShippingService.ShippingSe
var u = ConfigurationManager.AppSe
var p = ConfigurationManager.AppSe
SP.ClientCredentials.UserN
SP.ClientCredentials.UserN
// should make a call to GEtDomesticServicesByPoste
try
{
var temp = SP.GetDomesticServicesByPo
}
catch (Exception ex)
{
MessageBox.Show(String.For
}
--------------------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
P.S.
You can ignore/remove line 3. I forgot to erase it, and it was for something I was trying in the WDF version I attempted.
You can ignore/remove line 3. I forgot to erase it, and it was for something I was trying in the WDF version I attempted.
ASKER
Hi Kaufmed,
Many thanks Kaufmed for your help..
Could you tell me how did you created that proxy class. I have to do the tracking too.
Tks
Many thanks Kaufmed for your help..
Could you tell me how did you created that proxy class. I have to do the tracking too.
Tks
Open a Visual Studio Command Prompt (Start->Programs->MS Visual Studio 2008/2010->Visual Studio Tools->VS Command Prompt). Navigate to the folder where you want to place the output file. Enter the following command:
This will dump out a .cs file containing the proxy class(es), all housed in a namespace called "ShippingService". The default name of the file will be the name of the service appended with ".cs". If you need to change the name of the file, you can pass the "/out" parameter:
I am behind a proxy, so in order to create the class using the URL, I had to enter my login details for my proxy. To do this you can use the "/proxy", "/proxyusername", and "/proxypassword" options to specify those details:
Alternatively, you can just download the WSDL file locally and use the path to the local file rather than download it from the URL. If you do this, you won't need to worry about any proxy information.
wsdl.exe /namespace:ShippingService /protocol:SOAP http://demo.despatchbay.co m/api/soap /v11/shipp ing?wsdl
This will dump out a .cs file containing the proxy class(es), all housed in a namespace called "ShippingService". The default name of the file will be the name of the service appended with ".cs". If you need to change the name of the file, you can pass the "/out" parameter:
wsdl.exe ... /out:newname.cs ...
I am behind a proxy, so in order to create the class using the URL, I had to enter my login details for my proxy. To do this you can use the "/proxy", "/proxyusername", and "/proxypassword" options to specify those details:
wsdl.exe ... /proxy:www.example.com /proxyusername:user /proxypassword:password ...
Alternatively, you can just download the WSDL file locally and use the path to the local file rather than download it from the URL. If you do this, you won't need to worry about any proxy information.
P.S.
The code file you create with this utility won't be added by default to your project, so you will need to "Add Existing Item" this file to your project in order to be able to use it.
The code file you create with this utility won't be added by default to your project, so you will need to "Add Existing Item" this file to your project in order to be able to use it.