cancel
Showing results for 
Search instead for 
Did you mean: 

Not Working - Consuming Web Service with WSDL file through BSP

Dhivya
Active Participant
0 Kudos

Hi Experts,

  I am new to WSDL. I practiced the tutorial Consuming Web Service with WSDL file through BSP in SAPTechnical.com. This is to send message to mobile. The WSDL, provided there is

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.webserviceX.NET" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <wsdl:types>

    <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">

      <s:element name="SendSMSToIndia">

        <s:complexType>

          <s:sequence>

            <s:element minOccurs="0" maxOccurs="1" name="MobileNumber" type="s:string" />

            <s:element minOccurs="0" maxOccurs="1" name="FromEmailAddress" type="s:string" />

            <s:element minOccurs="0" maxOccurs="1" name="Message" type="s:string" />

          </s:sequence>

        </s:complexType>

      </s:element>

      <s:element name="SendSMSToIndiaResponse">

        <s:complexType>

          <s:sequence>

            <s:element minOccurs="0" maxOccurs="1" name="SendSMSToIndiaResult" type="tns:SMSResult" />

          </s:sequence>

        </s:complexType>

      </s:element>

      <s:complexType name="SMSResult">

        <s:sequence>

          <s:element minOccurs="0" maxOccurs="1" name="FromEmailAddress" type="s:string" />

          <s:element minOccurs="0" maxOccurs="1" name="MobileNumber" type="s:string" />

          <s:element minOccurs="0" maxOccurs="1" name="Provider" type="s:string" />

          <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />

          <s:element minOccurs="0" maxOccurs="1" name="Status" type="s:string" />

        </s:sequence>

      </s:complexType>

      <s:element name="SMSResult" nillable="true" type="tns:SMSResult" />

    </s:schema>

  </wsdl:types>

  <wsdl:message name="SendSMSToIndiaSoapIn">

    <wsdl:part name="parameters" element="tns:SendSMSToIndia" />

  </wsdl:message>

  <wsdl:message name="SendSMSToIndiaSoapOut">

    <wsdl:part name="parameters" element="tns:SendSMSToIndiaResponse" />

  </wsdl:message>

  <wsdl:message name="SendSMSToIndiaHttpGetIn">

    <wsdl:part name="MobileNumber" type="s:string" />

    <wsdl:part name="FromEmailAddress" type="s:string" />

    <wsdl:part name="Message" type="s:string" />

  </wsdl:message>

  <wsdl:message name="SendSMSToIndiaHttpGetOut">

    <wsdl:part name="Body" element="tns:SMSResult" />

  </wsdl:message>

  <wsdl:message name="SendSMSToIndiaHttpPostIn">

    <wsdl:part name="MobileNumber" type="s:string" />

    <wsdl:part name="FromEmailAddress" type="s:string" />

    <wsdl:part name="Message" type="s:string" />

  </wsdl:message>

  <wsdl:message name="SendSMSToIndiaHttpPostOut">

    <wsdl:part name="Body" element="tns:SMSResult" />

  </wsdl:message>

  <wsdl:portType name="SendSMSSoap">

    <wsdl:operation name="SendSMSToIndia">

      <wsdl:documentation xmlns:wsdl="Send" _mce_href="http://schemas.xmlsoap.org/wsdl/">Send">http://schemas.xmlsoap.org/wsdl/">Send unlimited free SMS to India - Maximum message size is 120 characters&lt;br&gt;&lt;br&gt;&lt;b&gt;Usage:&lt;/b&gt;If your mobile number is 098XXXXXXXX ,Please enter as 98XXXXXXXX&lt;br&gt;&lt;b&gt;Network Covered:&lt;/b&gt; Airtel,Idea Cellular,Skycell ,RPG Cellular,Hutch,Celforce / Fascel,BPL Mobile,Escotel </wsdl:documentation>

      <wsdl:input message="tns:SendSMSToIndiaSoapIn" />

      <wsdl:output message="tns:SendSMSToIndiaSoapOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:portType name="SendSMSHttpGet">

    <wsdl:operation name="SendSMSToIndia">

      <wsdl:documentation xmlns:wsdl="Send" _mce_href="http://schemas.xmlsoap.org/wsdl/">Send">http://schemas.xmlsoap.org/wsdl/">Send unlimited free SMS to India - Maximum message size is 120 characters&lt;br&gt;&lt;br&gt;&lt;b&gt;Usage:&lt;/b&gt;If your mobile number is 098XXXXXXXX ,Please enter as 98XXXXXXXX&lt;br&gt;&lt;b&gt;Network Covered:&lt;/b&gt; Airtel,Idea Cellular,Skycell ,RPG Cellular,Hutch,Celforce / Fascel,BPL Mobile,Escotel </wsdl:documentation>

      <wsdl:input message="tns:SendSMSToIndiaHttpGetIn" />

      <wsdl:output message="tns:SendSMSToIndiaHttpGetOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:portType name="SendSMSHttpPost">

    <wsdl:operation name="SendSMSToIndia">

      <wsdl:documentation xmlns:wsdl="Send" _mce_href="http://schemas.xmlsoap.org/wsdl/">Send">http://schemas.xmlsoap.org/wsdl/">Send unlimited free SMS to India - Maximum message size is 120 characters&lt;br&gt;&lt;br&gt;&lt;b&gt;Usage:&lt;/b&gt;If your mobile number is 098XXXXXXXX ,Please enter as 98XXXXXXXX&lt;br&gt;&lt;b&gt;Network Covered:&lt;/b&gt; Airtel,Idea Cellular,Skycell ,RPG Cellular,Hutch,Celforce / Fascel,BPL Mobile,Escotel </wsdl:documentation>

      <wsdl:input message="tns:SendSMSToIndiaHttpPostIn" />

      <wsdl:output message="tns:SendSMSToIndiaHttpPostOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="SendSMSSoap" type="tns:SendSMSSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="SendSMSToIndia">

      <soap:operation soapAction="http://www.webserviceX.NET/SendSMSToIndia" style="document" />

      <wsdl:input>

        <soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="SendSMSSoap12" type="tns:SendSMSSoap">

    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="SendSMSToIndia">

      <soap12:operation soapAction="http://www.webserviceX.NET/SendSMSToIndia" style="document" />

      <wsdl:input>

        <soap12:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap12:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="SendSMSHttpGet" type="tns:SendSMSHttpGet">

    <http:binding verb="GET" />

    <wsdl:operation name="SendSMSToIndia">

      <http:operation location="/SendSMSToIndia" />

      <wsdl:input>

        <http:urlEncoded />

      </wsdl:input>

      <wsdl:output>

        <mime:mimeXml part="Body" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="SendSMSHttpPost" type="tns:SendSMSHttpPost">

    <http:binding verb="POST" />

    <wsdl:operation name="SendSMSToIndia">

      <http:operation location="/SendSMSToIndia" />

      <wsdl:input>

        <mime:content type="application/x-www-form-urlencoded" />

      </wsdl:input>

      <wsdl:output>

        <mime:mimeXml part="Body" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="SendSMS">

    <wsdl:port name="SendSMSSoap" binding="tns:SendSMSSoap">

      <soap:address location="http://www.webservicex.net/SendSMS.asmx" />

    </wsdl:port>

    <wsdl:port name="SendSMSSoap12" binding="tns:SendSMSSoap12">

      <soap12:address location="http://www.webservicex.net/SendSMS.asmx" />

    </wsdl:port>

    <wsdl:port name="SendSMSHttpGet" binding="tns:SendSMSHttpGet">

      <http:address location="http://www.webservicex.net/SendSMS.asmx" />

    </wsdl:port>

    <wsdl:port name="SendSMSHttpPost" binding="tns:SendSMSHttpPost">

      <http:address location="http://www.webservicex.net/SendSMS.asmx" />

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

It didnt work. I dont know why. Pls let me know, where i missed?

Thanks.,

Dhivya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I didn't understood if you're using PI as a middleware, or you're trying to call the WS directly from your Sap Ecc system with a Bsp page.

Please clarify this point, and let us know exactly which is the error/problem, in order to help you.

Dhivya
Active Participant
0 Kudos

Hi Simone,

  Actually i created Enterprise Service and then created BSP to call method in Proxy-Class. When i test the BSP, it is not throwing any error. But the method didnt return any value. I tried the sample code in the link http://www.saptechnical.com/Tutorials/BSP/WebService/Index.htm

Thanks.,

Dhivya

Former Member
0 Kudos

Have you tried to debug the call from your bsp page? Are you sure that the destination service is reachable from your Sap system?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You dont use PI middleware for message mediation. I would recommend to post it in the portal forum to get more suggestions.  Ofcourse you can create webservice client classes from the WSDL and call through BSP..  If you want to use PI then use SOAP receiver to consume the webservice and make a call using PI.

Dhivya
Active Participant
0 Kudos

Hi Simone,

  Ya., i debugged. The destination service is not reaching.

Thanks,

Dhivya.

Dhivya
Active Participant
0 Kudos

Hi Baskar,

  Thanks for your reply. Actually in  my system, there is no PI middleware. So only it didnt response.

Thanks.

Dhivya.