on 07-23-2010 1:53 PM
Hi All,
I am a .Net developer and working on integrating SAP PI web services into our Asp.Net application. We are using Visual Studio 2008 and .Net Framework 3.5.
I have added the SAP webservice by using Add Service Reference. (When I use Add Web Reference, I could not identify the Classes available in the SAP service but when Add Service Reference is used, they are appearing)
Once the service is added, I have added the below configuration in the web.config file.
<basicHttpBinding>
<binding name="SAP_SoapBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<endpoint address="http://<hostname>:<port>/dir/wsdl?p=sa/<Logical Key>/portType"
binding="basicHttpBinding" bindingConfiguration="SAP_SoapBinding"
contract="SOService.SI_SOAP_Request_Sync_Out"
name="basicHttpBinding_SI_SOAP_Request_Sync_Out">
</endpoint>
C# code:
SI_SOAP_Request_Sync_OutClient objClient = new
SI_SOAP_Request_Sync_OutClient("basicHttpBinding_SI_SOAP_Request_Sync_Out");
objClient.ClientCredentials.UserName.UserName = <username>;
objClient.ClientCredentials.UserName.Password = <password>;
DT_Request req = new DT_Request();
req.EVENT = <Event name>;
Z_WRAPPER_Response resp1 = objClient.SI_SOAP_Request_Sync_Out(req);
At this point an error is raised "Unrecognized message version".
I have gone through some posts in the forums, and found out that we should give endpoint address as the webservice url and not the wsdl. However, the wsdl does not contain any soap:address and hence I couldn't find out the webservice url.
Can you please tell me how I can get the webservice url other than from wsdl or if I am doing any mistake.
Thanks in advance
Hi Haritha,
the address to PI webservice must be in the format: http://<hostname>:<port>/ XISOAPAdapter/MessageServlet? channel=
<party>:<service>:<channel>
Eg: <soap:address location="http://h03kyq:51000/XISOAPAdapter/MessageServlet?channel=:SDDS_DEV:ssReadSddsAddress" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
Do you have access to PI? If so you can derive the webservice address url in there.
Regards, William.
Edited by: WvStrien on Jul 27, 2010 9:06 PM
Edited by: WvStrien on Jul 27, 2010 9:07 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi HarithaT,
Did you manage to solve the error? I'm facing the same problem.
Many thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use Visual Studio 2008 and .Net Framework 3.5 express edition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.