cancel
Showing results for 
Search instead for 
Did you mean: 

Invoke sql 2005 native web services

Former Member
0 Kudos

Dear all,

I am trying to invoke from sap ecc 6.0 a native web services written in sql 2005.

For instance the web service path is something like http://10.1.0.197:8080/EmployeeXml?wsdl .

The web method is GetEmployeesXml

If I try to consume via custom .net application, it works but when I try to do the same in sap

following this guide

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/802edea6-274e-2e10-fd95-e5e1a8bc0...

I get the error http not supported.

The differnce between an asp.net web services (where everythings works) and this one is regarding the autentication.

For the first one it is possible to specify anonymous login for second it is necessary to specify the username and password.

I kindly ask you to give any help to solve this issue, or is there a manual for sm59?

Thank you very much

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Greg,

thank you for you answer I am trying to follow the instructions but seems that I am doing something wrong.

The problem is on the authentication I am trying specifing Domain \username username@domain but still I get unothorized

Any clue ?

thank you

Luidos

former_member184681
Active Contributor
0 Kudos

You should rather use a dedicated SQL web services user for authentication purposes.

Former Member
0 Kudos

I have created a user name for the machine added to sql server and I retried.

I get HTTP version not supported for both http version 1.0 and 1.1

Former Member
0 Kudos

In the wnd I found an error on the wsdl file there is a problem with xsd:choice

here the solution: Note 1131786 - Problems when using xsd:choice

The point is that I cannot apply this pach because I have a too ald version of sap.

So for that I need to rewrite a part of wsdl document this one

<xsd:complexType name="SqlResultStream">

<xsd:choice minOccurs="1" maxOccurs="unbounded">

<xsd:element name="SqlRowSet" type="sqlsoaptypes:SqlRowSet" />

<xsd:element name="SqlXml" type="sqlsoaptypes:SqlXml" />

<xsd:element name="SqlMessage" type="sqlmessage:SqlMessage" />

<xsd:element name="SqlRowCount" type="sqlrowcount:SqlRowCount" />

<xsd:element name="SqlResultCode" type="sqlsoaptypes:SqlResultCode" />

<xsd:element name="SqlTransaction" type="sqltransaction:SqlTransaction" />

</xsd:choice>

</xsd:complexType>

Does any one know how to rewrite it using for example xsd:element tag.

Thank you very much

former_member184681
Active Contributor
0 Kudos

Try with the following:

<xsd:complexType name="SqlResultStream">
   <xsd:sequence>
      <xsd:element name="SqlRowSet" type="sqlsoaptypes:SqlRowSet" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SqlXml" type="sqlsoaptypes:SqlXml" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SqlMessage" type="sqlmessage:SqlMessage" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SqlRowCount" type="sqlrowcount:SqlRowCount" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SqlResultCode" type="sqlsoaptypes:SqlResultCode" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SqlTransaction" type="sqltransaction:SqlTransaction" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
</xsd:complexType>

You also have to know that this is not a perfect equivalent, as no tag can replace the xsd:choice. The xsd:choice means that only one of the elements can occur, while in xsd:sequence any of the elements can occur. But you should be able to achieve the same with a properly built mapping: create only one of the fields, and leave the rest empty - this is possible thanks to minOccurs="0".

Hope this helps,

Greg

Former Member
0 Kudos

H Greg,

i tried your change and now I am getting the following error:

proxy generation terminated mixed content not supported

error sprx063. Is there something that I can do ?

Thank you

Luidos

former_member184681
Active Contributor
0 Kudos

Hi Luidos,

In this case, you need to configure the authentication for your web service in SOA Manager. See some details about it here:

http://help.sap.com/saphelp_nwpi71/helpdata/en/46/a4863ea82152b8e10000000a155369/content.htm

Hope this helps,

Greg