.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem with create SOAP clinet...

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net


I have problem with create soap client. I get WebApi documentation and find example in PHP:

try {
// access key to WebAPI
$accessKey = "ABSDFB34FI651N4MJAXY564F";
// create client object Soap
$soapClient = new SoapClient("http://beta.otodom.pl/webapi2/?wsdl");
// login to WebAPI.  Method  doLogin returned session key
$sessionKey = $soapClient->doLogin($accessKey,"twojemail@domena.pl","twojehaslo" );
echo "Login OK. Session key : $sessionKey.\n";
} catch (SoapFault $fault) {
echo "login is not success. Error code: [{$fault->faultcode}]

how to translate it in ASP.NET to C# ????



View Complete Post

More Related Resource Links

Problem to create assembly which depends on other dll's from SQL Server

I am developing an application in .Net but I need to access to some procedures in ASP.Net since SQL Server.I have got it but i have problems to assembly the dll if it has dependencies of another dll's.I have read that if a dll need other dll it call it automatically but when I try to assembly my class in .NET there is the next error: Create failed for SqlAssembly 'ClaseEjemplo'. Assembly 'csyt.dal, version=, culture=neutral, publickeytoken=null.' was not found in the SQL catalog. (.Net SqlClient Data Provider) Nevertheless if I the class hasn't another dependencies it works.The class I am trying to assembly is ClaseEjemplo.If I try to use the procedure of other class "'csyt.dal" I have problems.If ClaseEjemplo hasn't dependencies it works perfectly!My class ClaseEjemplo is: using System;using System.Collections.Generic;using System.Text;using Csyt.DAL;using Csyt.Info; namespace ClaseEjemplo{    public class Class1    {        public static long devolucion()        {            AIAlarmaDB.TipoCondicion aux1 = new AIAlarmaDB.TipoCondicion();                        AIAlarmaDB aux = new AIAlarmaDB();            aux1=aux.GetTipoCondicionById(1);            return aux1.Id;        }     }}Thanks in advance

is there any problem if i create a site collection through programmatically which web application ha

hi all, My web application have 2  types of authentication -- for internal users (windows authentication) and external users (Form based authentication). I am creating site collections through programmatically in the web application. so this site collection should have the permission as form based authentication for external users and windows authentication for internal users. is it possible are not? please give me some suggestions on creating site collections which have form based authentication and windows authentication. thanks in advance......

REST and SOAP headers problem

Hi!   I'm trying to expose a service and, particularly, an operation that has an input that has been "tagged" as [MessageHeader]. When I try to run the service, I'm given an InvalidOperationException.    The full message is: Operation 'X' in contract 'Y' uses a MessageContract that has SOAP headers. SOAP headers are not supported by the None MessageVersion.   Unfortunately that MessageContract has to use headers so I haven't got the possibility to "dispose" the headers altogether. Does anyone know how I can correctly expose my service to both a SOAP and Web client (btw, I've already tried the "How to: Expose a Contract to SOAP and Web Clients" in the MSDN documentation) under these circumstances?   Thanks in advance!

Problem create a web application on SharePoint 2007 (Project Server 2007)

I installed a Project Server 2007 in a 3 server structure (all Win 2003 sp2; one for App server hosting Central Admin, Project Server service & Search service; one for web server; one for database server).  They are only in the same domain and I use the same network account for the installation as well as the WSS service account.  The same network are local admin for those 3 servers. All installation & patches seem ok (at least I don't get error messages) until I attempt to create my first Web Application.  After I filled out the web appliction and try to click OK, the page does not change and i saw the java error at the right bottom corner from my IE browser (version 6). The message is .... Line: 1686 Char: 1 Error: 'WebForm_PostBackOptions' is undefined Code: 0 URL: http://myservername:28804/_admin/extendvs.aspx On my SP log, below are the portion of the log when the error happen. 09/09/2010 12:28:29  1  INF        Entering function UserInterface.ShowCentralAdmin 09/09/2010 12:28:29  1  INF          The show central admin command has been chosen 09/09/2010 12:28:29  1  INF          Searching for registry key Software\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS\CentralAdministrati

Soap exception problem

Hello, I'm having a problem with the web service soap exception that im facing. In my if else statement, the web service keeps on throwing soap exception when name was not found. SoapException was caught A user with the account name test.name could not be found --> User Not Found: Could not load profile data from the database. My question is.. Is it possible to handle that in if else statement? Basically the web service returns profile data (ex. name, age, address, in xml format) What i want is if just like this.. If _result isnot nothing then _str = _result else 'do nothing end if Is that possible?    Ã‚®Â©T½¼

problem with calling soap service written (most probably in java)

Hi evebody, I'm experiencing problem calling third-party service written in java (mostprobably). When i call service i get following response: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header></env:Header> <env:Body> <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <faultcode>env:Server</faultcode> <faultstring>Content root name does not match element name: {http://foo.bar/}arg0 != arg0</faultstring> </env:Fault> </env:Body> </env:Envelope> I've used command line java utility provided by service provider and found following difference: soap request, generated by wcf (similar results with webservices)   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <baz xmlns="http://foo.bar/"> <arg0 xmlns="">string value</arg0> <arg1 xmlns="">string value</arg1> <arg2 xmlns="">string value</arg2> </baz> </s:Body> </s:Envelope> request, generated by java utility: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:baz xmlns:ns2="http://foo.bar/"> <arg0>string value</arg0> <arg

Problem with EventSetter - "Failed to create a 'Handler' from the text" ...

I have a DataTrigger which when active sets the Template of a ListBox. Within the ListBox i then have a custom type which is based on a border. I wanted to get the MouseDown event for the Border, so in the custom type created a routed event which is fired when the MouseDown event occurs. Im using an EventSetter to hook this up and it compiles, however when ever the DataTrigger becomes active and the Template is changed i get an error: "Failed to create a 'Handler' from the text (name of method in code behind).   xaml: <ListBox x:Name="buttonDisplay" VerticalAlignment="Center" HorizontalAlignment="Center"> <ListBox.Resources> <Style x:Key="answerBtnStyle" TargetType="{x:Type cc:callControlButton}"> <EventSetter Event="borderClicked" Handler="ccAnswerBtn_MouseDown"/> </Style> </ListBox.Resources> <ListBox.Style> <Style TargetType="{x:Type ListBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate></ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=window,Path=currentCall.callstate}" Value="ringi

Joining Dimtime table by a referenced Join create a problem



I am trying to join a dimtime table by a refernced join to an orderlines table which is the fact.

(the referenced join was defined in the relationship matrix of the cube ).

The referenced table is the ordersheader which had no measures in it but only used a linking table between those two other.

The join from the dimtime to the ordersheader  is done by date and from ordersheader to orderlines by orderid

The problem is that in the cube browser measures are shown as they were multiplied across all dates (like the join was done in a wrong way )

I have created an sql query and the logic is working just fine when quering directly from the DB


What am I doing wrong

How to properly create SOAP Request that has x509 signed message body and unsigned usernameToken




I'm trying to  create a .NET client that will consume AXIS WS.

Request should be signed (using x509 Signature) and after this usernametoken profile 1.0 should be attached.

Using SOAP-UI I can create Outgoing Security Policy with few steps described below:

1) Define keystore

2) Add WSS Signature entry and mark key identifier type as X509 Certificate or Binary Security Token

3) Add WSS Username entry

The order is important.

I cannot recreate SOAP request that would generate valid response.

I got "The signature or decryption was invalid" most of the time.

Here is valid SOAP Request from SOAP-UI:


 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://users.api.swd.zbp.pl"

Problem with end user not being able to create alerts

I created a team site as a sub site off our main site. I broke inheritance from the parent and added a new group and assigned that group a custom permission that has create alerts permission. Problem is when the end user goes to create alerts it throws an access denied error after clicking okay on the new alert page. I've checked and rechecked permissions and everything looks to be setup correctly?

Problem to create assembly which depends the Same DLL 'System.Web' as itself???


I need to register a .Net assembly within the SQL 2005 eng because other assembies depend on it. That I need to use.


I get the following error message listed below, of the Assembly is depended on itself [ IE 'System.Web'  need assembly 'System.Web' ] see the bold/unscore below...


Has any one solve this or can tell me what I'm doing incorrect?


The Jet


Here is the message stack:



Attempting to create the following assembly in SQL Server 2005:


WCF client, svcutil and SOAP array problem


Hi, everyone. I hope someone will be able to help me about this issue:
I am trying to generate WCF client by issuing following command:
svcutil testingWsdl.wsdl /ser:XmlSerializer (/ser option has nothing with problem, I've just tried with it also)
I am getting following error:

Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: The datatype 'http://schemas.xmlsoap.org/soap/encoding/:Array' is missing.

Here is complete WSDL:

<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
<import namespace="soap" location="http://schemas.xmlsoap.org/wsdl/soap/"/>
 <portType name="SoapInPort">
 <operation name="SoapIn">

Problem when trying to create site programaticly



I'm trying to create a site from a Site Definition programaticly. I am using the following to accomplish that


   SPSite oSiteCollection = new SPSite("http://sbshp/Elev");   
   SPWeb oWebSite = oSiteCollection.OpenWeb();
   SPWebCollection oSitesCollection = oWebSite.Webs;
   SPWeb newWebSite = oSitesCollection.Add("abc", "Document Library Template", "This is site created through code.", 1033, "STS#2", true, false);

When running, i get the "SPException was unhandled by user code. The language is not supported on the server "(Translated from Swedish).

I can't seem to solve this problem, can you guys help me?


Problem when I create directory mapping


Hi all.

I have many  users in my website and I need to get a private page to one by one users.

Now I can't  create physival private page for one by one users and I need to create directory mapping to load users details on my website.

To load usres details on myweb site I must get  username of user from querystring EXP. "http://www.mysitename.com/username" and start to view user details on privatepage.aspx. The privatepage.aspx is handler users details of myweb site for users. For getting username from the querystring I need your help.

I trid very much to get username of user from querystring but I was unsuccessful to do this.

If somebody of my friends can help me. please send a post to me.

Best Regards.

Soap cs code from WSDL encoding response problem


I have created a client proxy from a WSDL file with WSDL.exe

i can both send and recieve data fine.

The xmlfile i recieve contains Nordic char data (i see that in fiddler).

ex: <mydata>øæå</mydata>

The problem occurs when the data goes into my client proxy. It looks like they are in utf-8 format (and that will not work with nordic chars).

so the nordic chars are just scrambled.

any way to override this ?

 object[] response = this.Invoke("Query", new object[] { message });
 message = ((elements)(response[1]));
 return (string)(response[0]);




Problem with create ActionResults using 2 tables


I have a create actionlink the data that I'm adding belong to table name

One of the fields (name company_Id), is connect to table name company,(one2many
table),  So, if I'm trying to write data that already exist
in the company table , the model is invalid ,

Ne w company name,it is valid, how can write a new data entry and still
use the company table existing data entry

I'm adding my code so mybe my Q. will be more understandable ,


public  interface Irepository
       IEnumerable<company> list1();

       IEnumerable<cosmetic> list();
       cosmetic Get(int id);
       void Create(cosmetic cosmeticToCreate, company conpanyToCreate);
       void Edit(cosmetic cosmeticToEdit);
       void Delete(cosmetic cosmetToDelete);

//the class
 public class CompanyRepository :Irepository
        SR_1Entities _entitiy = new SR_1E

How to create a WCF service that is in compliance with Soap Messages with Attachments

Hi, I know that there are many ways to send attachments, but unfortunately i need to create a webservice that follows the "SOAP messages with Attachments" specification (http://www.w3.org/TR/SOAP-attachments). This specification can be sumarrizing as and Multipart MIME message that groups a Soap Envelope and more files as attachmens in differnent MIME parts, such as SOAP with Attachments MIME envelope -Root Body MIME part --Soap Envelope ---Soap Header ---Soap Body - Mime Part 2 --First File - Mime part 3 --Second File .... Hopefully that structure can be helpful,otherwise you can easily check in the specification page. I don't know how to do that: - Creating a Contract with one parameter that will a Message that will encapsules all the information, but this means that I need to create all the MIME parts manually. and lqater in the client I'll have to split the information and deserialized in objects. Any help would be great, Thanks in advance for your help. Cheers
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend