Consume Web Services from SAP

Consume Web Services from SAP

  
Hi guys,

I'm trying to consume a webservice on Outsystems from SAP in order to avoid integration studio, visual studio, proxy connectors, ...

The strange behaviour is that it can be consumed by visual studio, but it returns me an error:
load error - No service descriptions found.

I've asked for help to a person that told me that is missing the wsdl service name.
Has anyone expirencied this kind of behaviour when using SAP web services ?

My Outsystems Server version is 6.0.0.1.

Here goes the wsdl:

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style"xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style">
<wsdl:documentation>
<sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl"/>
</wsdl:documentation>
<wsp:UsingPolicy wsdl:required="true"/>
<wsp:Policy wsu:Id="IF_Z_TESTE_OUTSYSTEMS">
<sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
<sapsession:enableSession>false</sapsession:enableSession>
</sapsession:Session>
</wsp:Policy>
<wsp:Policy wsu:Id="OP_ZTesteOutsystems">
<sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
<sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
<saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
<saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
</wsp:Policy>
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style">
<xsd:element name="ZTesteOutsystems">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</xsd:element>
<xsd:element name="ZTesteOutsystemsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IOut" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ZTesteOutsystems">
<wsdl:part name="parameters" element="tns:ZTesteOutsystems"/>
</wsdl:message>
<wsdl:message name="ZTesteOutsystemsResponse">
<wsdl:part name="parameters" element="tns:ZTesteOutsystemsResponse"/>
</wsdl:message>
<wsdl:portType name="Z_TESTE_OUTSYSTEMS">
<wsp:Policy>
<wsp:PolicyReference URI="#IF_Z_TESTE_OUTSYSTEMS"/>
</wsp:Policy>
<wsdl:operation name="ZTesteOutsystems">
<wsp:Policy>
<wsp:PolicyReference URI="#OP_ZTesteOutsystems"/>
</wsp:Policy>
<wsdl:input message="tns:ZTesteOutsystems"/>
<wsdl:output message="tns:ZTesteOutsystemsResponse"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Hi Francisco.

It appears that the WSDL was not well generated in SOAMANAGER transaction and it does not have the service definition, as the error states.

I believe that WSDL was generated in the “Open Porttype WSDL Document” link of the SOAMANAGER and it should be in the “Open WSDL document for selected binding” Link.
 

 
If this link doesn’t work, be sure to have the Hostname and portnumber well defined in the System Global Settings -> Access Information J2EE server tab, also in SOAMANAGER transaction.
 

 

 
Also check this post and site for instructions of SAP WebServices:
http://www.outsystems.com/forums/discussion/6027/exposing-a-sap-bapi-as-a-web-service/
http://sapignite.com/create-a-web-service-in-10-minutes/

Hope it Helps.
Regards
MP
Hi Miguel,

I've tried a lot of things, and reached the solution.
The file that i attached contains a symbolic walkthrough. There is some details that may be missing to me, but this was the way I found to make the webservice to work. I hope it helps somebody else that is stuck with this and have no clew how to solve it.

Thank you.
Hi Francisco,

Glad it turn out ok for you.
Thanks for sharing your solution.

Best Regards
MP
Great walkthrough! Thanks. I did get  the service tag in the WSDL myself just by deleteing the service in SOAMANAGER. Create a new one with a binding. Edited this service and applied authorization method user ID/Password. I'm creating the GUI side with Eclipse and Jetty plugin as webserver and the Axis2 CodeGenerator -> Generate Java code from wsdl.
Thanks again.