Skip to Content
author's profile photo Former Member
Former Member

Check if Web Service Client is configured properly.

hi

I am building a very simple application which will send email using a webservice.

i have followed following steps :

Import Web Service Model

WSDL : Browsed from local machine.

I follwed all steps as mentioned in SAP document for the same.

But while running this application i m getting following error :

Service call exception; nested exception is: java.rmi.RemoteException: The host of endpoint URL "http://www.abysal.com/soap/soapmail.wdtp" was not found. Check if the WS Client is configured correctly. Probably endpoint URL is not set or use of HTTP Proxy is required.; nested exception is: java.net.UnknownHostException: www.abysal.com

Please guide me if i have to do some configuration settings to use a web service.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 05:49 AM

    Hi,

    Try with Using Adaptive Webservice model

    Regards,

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 06:04 AM

    Hi,

    If you are using webservice model for email service

    copy this below wsdl file.

    <?xml version="1.0" encoding="UTF8" ?> 
     <definitions name="AbysalSendEmail" targetNamespace="http://www.abysal.com/AbysalwebDTP" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.abysal.com/AbysalwebDTP" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
     <types> 
     <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.abysal.com/AbysalwebDTP"> 
     <xsd:element name="SendEmail"> 
     <xsd:complexType> 
     <xsd:sequence> 
    <xsd:element minOccurs="0" maxOccurs="1" name="From" type="xsd:string" /> 
    <xsd:element minOccurs="1" maxOccurs="1" name="FromAddress" type="xsd:string" /> 
    <xsd:element minOccurs="0" maxOccurs="1" name="To" type="xsd:string" /> 
    <xsd:element minOccurs="1" maxOccurs="1" name="ToAddress" type="xsd:string" /> 
    <xsd:element minOccurs="0" maxOccurs="1" name="Subject" type="xsd:string" /> 
    <xsd:element minOccurs="1" maxOccurs="1" name="MsgBody" type="xsd:string" /> 
    <xsd:element minOccurs="0" maxOccurs="1" name="Acknowledgement" type="xsd:string" /> 
    <xsd:element minOccurs="0" maxOccurs="1" name="Priority" type="xsd:string" /> 
    </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 
     <xsd:element name="SendEmailResponse"> 
     <xsd:complexType> 
     <xsd:sequence> 
    <xsd:element minOccurs="1" maxOccurs="1" name="ReturnCode" type="xsd:integer" /> 
    </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 
    </xsd:schema> 
    </types> 
     <message name="SendEmailInput"> 
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Mail input parameters</documentation> 
    <part name="parameters" element="tns:SendEmail" /> 
    </message> 
     <message name="SendEmailResponse"> 
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Output parameters</documentation> 
    <part name="parameters" element="tns:SendEmailResponse" /> 
    </message> 
     <portType name="SendEmailPortType"> 
     <operation name="SendEmail"> 
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Abysal Systems Web Service to send mail with WebDTP server</documentation> 
    <input message="tns:SendEmailInput" /> 
    <output message="tns:SendEmailResponse" /> 
    </operation> 
    </portType> 
     <binding name="SendEmailBinding" type="tns:SendEmailPortType"> 
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
     <operation name="SendEmail"> 
    <soap:operation soapAction="" /> 
     <input> 
    <soap:body use="literal" /> 
    </input> 
     <output> 
    <soap:body use="literal" /> 
    </output> 
    </operation> 
    </binding> 
     <service name="SendEmailService"> 
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Abysal Systems Web Service demonstration example</documentation> 
     <port binding="tns:SendEmailBinding" name="SendEmailPort"> 
    <soap:address location="http://www.abysal.com/soap/soapmail.wdtp" /> 
    </port> 
    </service> 
    </definitions>
    

    Use the below code to execute

    try {
    		Request_SendEmailPortType_sendEmail obj=new Request_SendEmailPortType_sendEmail();
    		wdContext.nodeRequest_SendEmailPortType_sendEmail().bind(obj);
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setFrom("naga");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setFromAddress("sender email");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setMsgBody("hai hello");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setPriority("high");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setSubject("sub");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setTo("nagaraju");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().setToAddress("receiver email");
    		wdContext.currentRequest_SendEmailPortType_sendEmailElement().modelObject().execute();
    		wdContext.nodeResponse().invalidate();
    	} catch (Exception e) {
    		// TODO Auto-generated catch block
    		e.printStackTrace();
    	}
    

    Regards,

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 04:58 AM

    Hi Naga

    I did tried it again using "Adaptive Webservice model".

    And XML provided by you in WSDL.

    But now it is unable to read my WSDL file.

    It is throwing following exception.

    java.io.FileNotFoundException: C:\Documents and Settings\saurabh.agarwal\Desktop\AbysalEmail.wsdl (The system cannot find the file specified)

    at java.io.FileInputStream.open(Native Method)

    at java.io.FileInputStream.<init>(FileInputStream.java:106)

    at java.io.FileInputStream.<init>(FileInputStream.java:66)......

    While i have checked it correctly that my file is located on this very location...!!

    Can i use some path relative to my current project workspace...!!

    please help me out.

    thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 05:11 AM

    Hi,

    to use adaptive web service model, create destinations for webservice as described in this document.

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d076c662-8c0f-2b10-8ca4-e63c26e2e489

    Regards,

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 11:23 AM

    Hi Naga,

    I did selected as specified in document, "Import adaptive web service model"

    Then in next step under select WSDL source I selected "Local file system or URL" Again as specified in document.

    In next step I selected "No logical designation". Wereas in document "Use destination for metadata and execution" is selected.

    It sems that this might be cause of my problem. The error which i am getting

    "java.io.FileNotFoundException: C:\Documents and Settings\saurabh.agarwal\Desktop\AbysalEmail.wsdl (The system cannot find the file specified) "

    Could u please explain me this point.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.