Problem in calling a web service hosted on tomcat from BEA WebLogic portal

Hi,
I have a wsdl file for my web service which is hosted on apache tomcat 5.5(running on port : 8080). The contents of the wsdl file are-
*<?xml version="1.0" encoding="UTF-8"?>*
*<wsdl:definitions targetNamespace="http://soa.tutorials.serg.edu" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soa.tutorials.serg.edu" xmlns:intf="http://soa.tutorials.serg.edu" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">*
*<!--WSDL created by Apache Axis version: 1.4*
Built on Apr 22, 2006 (06:55:48 PDT)-->
*<wsdl:types>*
*<schema elementFormDefault="qualified" targetNamespace="http://soa.tutorials.serg.edu" xmlns="http://www.w3.org/2001/XMLSchema">*
*<element name="getNums">*
*<complexType>*
*<sequence>*
*<element name="n" type="xsd:int"/>*
*<element name="m" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNumsResponse">*
*<complexType>*
*<sequence>*
*<element maxOccurs="unbounded" name="getNumsReturn" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNums2">*
*<complexType>*
*<sequence>*
*<element name="n" type="xsd:int"/>*
*<element name="m" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNums2Response">*
*<complexType>*
*<sequence>*
*<element maxOccurs="unbounded" name="getNums2Return" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*</schema>*
*</wsdl:types>*
*<wsdl:message name="getNums2Request">*
*<wsdl:part element="impl:getNums2" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNumsRequest">*
*<wsdl:part element="impl:getNums" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNums2Response">*
*<wsdl:part element="impl:getNums2Response" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNumsResponse">*
*<wsdl:part element="impl:getNumsResponse" name="parameters"/>*
*</wsdl:message>*
*<wsdl:portType name="Echo">*
*<wsdl:operation name="getNums">*
*<wsdl:input message="impl:getNumsRequest" name="getNumsRequest"/>*
*<wsdl:output message="impl:getNumsResponse" name="getNumsResponse"/>*
*</wsdl:operation>*
*<wsdl:operation name="getNums2">*
*<wsdl:input message="impl:getNums2Request" name="getNums2Request"/>*
*<wsdl:output message="impl:getNums2Response" name="getNums2Response"/>*
*</wsdl:operation>*
*</wsdl:portType>*
*<wsdl:binding name="EchoSoapBinding" type="impl:Echo">*
*<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>*
*<wsdl:operation name="getNums">*
*<wsdlsoap:operation soapAction=""/>*
*<wsdl:input name="getNumsRequest">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:input>*
*<wsdl:output name="getNumsResponse">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:output>*
*</wsdl:operation>*
*<wsdl:operation name="getNums2">*
*<wsdlsoap:operation soapAction=""/>*
*<wsdl:input name="getNums2Request">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:input>*
*<wsdl:output name="getNums2Response">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:output>*
*</wsdl:operation>*
*</wsdl:binding>*
*<wsdl:service name="EchoService">*
*<wsdl:port binding="impl:EchoSoapBinding" name="Echo">*
*<wsdlsoap:address location="http://localhost:8080/SOATest/services/Echo"/>*
*</wsdl:port>*
*</wsdl:service>*
*</wsdl:definitions>*
I created a client from the above wsdl file using ClientGen wizard in WebLogic. This client contains the follwoing classes-
Echo.java
EchoService.java
EchoService_Impl.java
Echo_Stub.java
I created a JSP portlet and the jsp content of it is-
String url = "http://localhost:8080/SOATest/services/Echo";
Echo echo = new EchoService_Impl(url).getEcho();
getNumsResponse = echo.getNums(getNums);
I tried to call that web service from BEA weblogic portal through a JSP potlet. I got an error saying -
*<An exception [javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element] was thrown while rendering the content at [TestEcho.jsp].*
*javax.servlet.ServletException: javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:420)*
*     at jsp_servlet.__testecho._jspService(__testecho.java:112)*
*     at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)*
*     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
*     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
*     Truncated. see log file for complete stacktrace*
*javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:174)*
*     at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:485)*
*     at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)*
*     at edu.serg.tutorials.soa.EchoService_Impl.<init>(Unknown Source)*
*     at edu.serg.tutorials.soa.EchoService_Impl.<init>(Unknown Source)*
*     Truncated. see log file for complete stacktrace*
*weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)*
*     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:405)*
*     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:391)*
*     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)*
*     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)*
*     Truncated. see log file for complete stacktrace*
*java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.xml.domimpl.Loader.load(Loader.java:38)*
*     at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:122)*
*     at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)*
*     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)*
*     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:405)*
*     Truncated. see log file for complete stacktrace*
*javax.xml.stream.XMLStreamException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)*
*     at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)*
*     at weblogic.xml.domimpl.Loader.load(Loader.java:112)*
*     at weblogic.xml.domimpl.Loader.load(Loader.java:73)*
*     at weblogic.xml.domimpl.Loader.load(Loader.java:35)*
*     Truncated. see log file for complete stacktrace*
*Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
*     at weblogic.xml.babel.baseparser.BaseParser.parseProlog(BaseParser.java:417)*
*     at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:328)*
*     at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)*
*     at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)*
*     at weblogic.xml.domimpl.Loader.load(Loader.java:112)*
*     Truncated. see log file for complete stacktrace*
My web service is using soap binding. I have tested it with eclipse and other tools also. It is working well and good. But when I tried to call a web service which is created and hosted on WebLogic server(running on port : 7001), I got the correct output.
Can anyone help me out in calling a web service hosted on different server from WebLogic server.
Thanks in advance,
Tiijnar
Edited by: user8715057 on Aug 13, 2009 1:11 AM

Hi
1. The way you are invoking the WebService deployed on Tomcat server is looks suspicious. It may be valid by adding extra ?wsdl etc into the url, but still I have not seen this way to invoke the webservice.
2. So you used Weblogic ant task to generate client JARs by giving this WSDL. So looks like it generated the 4 classes (.java) and in addition any other classes for Request/Response xml objects.
3. Look at the source code of EchoService.java. It should have one default empty constructor. Internally it uses the default wsdl defined in this class. You will see another constructor that takes WSDL URL as one of the parameters (QName) etc. Echo.java is the class corresponding to the Port. In the same EchoService you should see an instance method like getEcho() something like that. This Echo.java class will have methods for all the Operations defined on this Port. So the standard code snippet we use most of the times will be like this:
EchoService myEchoService = new EchoService(); // Default it uses WSDL deployed on Tomcat at localhost:8080
Echo myEchoPort = myEchoService.getEchoPort(); // Something along these lines.
myEchoPort.xxxYYY(); // NOW this is the operation name that takes the input parameters and returns outputs defined as per the WSDL defintions. If the Input and Outputs are complex xml types, it will have corresponing .JAVA files with setters and getters.
Now if this WebService is deployed on same Tomcat but on different machine or different port, you just give the full WSDL URL with that host and port in the constructor for new EchoService(...). You may need to instantiate QName object. But look at the methods generated in EchoService.java class.
The way you are using with Impl and Stubs class may also work. I am not much famiiar with this APIs apporach. Still look at the methods generated in these classes.
Also if you latest Sun JDK 1.6, it also has one command like wsimport. Infact if you install WLS 10.3 with Sun JDK, it should have C:\beawlp103\jdk160_05\bin\wsimport command. This will also generate client jar given a WSDL URL.
Thanks
Ravi Jegga

Similar Messages

  • DNS problem when calling a web service

    Hi,
    when I try to call a web service from the Studio I get the following error message:
    return code: 503
    Network Error
    Network Error (dns_server_failure)
    Your request could not be processed because an error occurred contacting the DNS server.
    The DNS server may be temporarily unavailable, or there could be a network problem.
    Looks not like an OBPM problem, but I can access the web service via SoapUI and I can access it from an OBPM enterprise installation on a server here in the network. The problem is only when I try to access the service from OBPM Studio. I also tried accessing a local web service, also does not work.
    Does anyone have a hint, what it could be? Thanks for your help!
    Regards
    Matthias

    No, it is in my local LAN, so it should work without proxy (and in SoapUI it also works without Proxy). But nevertheless I tried it also with a proxy, but unfortunately without success.
    Regards
    Matthias

  • Problem while calling a web service in BOBJ Data services

    Hello Experts,
    I am trying to call a web service in bobj data services. A real time job has been scheduled and published as a web service. I want to consume this service in web dynpro java.
    I tried both the methods the adaptive web services and depricated version. I also tried calling the url directly and with the metadata and execution destinations.
    No matter what I do, I keep getting the following error.
    Exception on execution of web service with WSDL URL 'http://XXXXX:28080/DataServices/servlet/webservices?ver=2.0&wsdl' with operation 'SERVICE_<NAME>' in interface 'Real-time_Services'
    The call never reaches data services system.  If I try to call the service from soapUI (web service testing tool) it works fine.
    I am using SAP NW 7.0 SP22 .
    Here is my code in dynpro to call the service.
         AdaptiveModel mod = new AdaptiveModel();
         Request_SERVICE_MDM_LOOKUP request = new Request_SERVICE_MDM_LOOKUP(mod);
         Query1 query1 = new Query1(mod);
         Response_SERVICE_MDM_LOOKUP response = new Response_SERVICE_MDM_LOOKUP(mod);
         request.setQuery(query1);
         request.setResponse(response);
         List list = new ArrayList();
         DefinitionsTypes_XsdSchema_1__XsdElement_1__XsdComplexType_Sequence1 element = new DefinitionsTypes_XsdSchema_1__XsdElement_1__XsdComplexType_Sequence1(mod);
         element.setCustomer_Name(wdContext.currentContextElement().getCustomerName());
         element.setZip_Code(wdContext.currentContextElement().getZipcode());
         element.setAddr1("");
         element.setAddr2("");
         element.setCity("");
         element.setCountry("");
         element.setState("");
         list.add(element);
         query1.set$002fDefinitions$002fTypes$002fXsdSchema$005b1$005d$002fXsdElement$005b1$005d$002fXsdComplexType$0023Sequence1(list);
         wdContext.nodeRequest_SERVICE_MDM_LOOKUP().bind(request);
          wdContext.currentRequest_SERVICE_MDM_LOOKUPElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeQueryResponse().invalidate();
          wdContext.nodeSequenceResponse().invalidate();
    Please let me know if you have any pointers on how to solve this.
    Thanks in advance
    Praveen.

    have you create the destination?
    do  you use the wizard to generate code?
    usually there is catch clause for this line of code
    wdContext.currentRequest_SERVICE_MDM_LOOKUPElement().modelObject().execute();
    Edited by: John Wu on Dec 16, 2010 11:51 PM

  • Problem about Calling SQLplus Web Service on Aspen Watch Server

    Hi all,
    We're using MII 11.5 and trying to call a web service from a Aspen Watch server through the web service block in transaction. The web service enclosed a function call ExecuteSQL which will accept a sql query function and return a set of Data. Now, using the same web service on two different servers, we got a success(server A) and a failure(Server B). On the failed call, right in the first page of enter a URL, it will return a "SOAP Service could not be loaded: The element type 'META' must be terminated by the machine end-tag '</META>'" error.
    According to the admin of the web server, the web service on both servers can be called correctly when he created two simple ASP pages. After serious testing, he thought that the only reason should be MII may not be compatible with .Net 2.0 binding web service. The following is some comparison we made to the two servers.
                                                                                    Server A / Server B / Error, if applicable
    .Net Framework installed on MII server:                                 1.1, 2.0 /      1.1, 2.0     
    .Net Binding:                                                                          1.1 /               2.0
    IIS version on MII server:                                                 6 /                 6     
    From MII server broser to Server A web service:                 Yes /      Yes     
    From MII server browser to Server B web service:                 No /     No /      Return on web "The test form is only available for requests from the local machine"
    From localhost browser to Server A web service:                 n/a //     Yes     
    From localhost browser to Server B web service:                 Yes //     n/a     
    From PC browser to Server B web service:                                No /        Yes /     Return on web "The test form is only available for requests from the local machine"
    Credentials required to run web service:                                 No /     Yes /     
    The following are the SOAP generated:
    Server A
      <?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.aspentech.com/SQLplus.WebService/" 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.aspentech.com/SQLplus.WebService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.aspentech.com/SQLplus.WebService/">
    - <s:element name="ExecuteSQL">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="command" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="ExecuteSQLResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLResult" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="string" nillable="true" type="s:string" />
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="ExecuteSQLSoapIn">
      <wsdl:part name="parameters" element="tns:ExecuteSQL" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLSoapOut">
      <wsdl:part name="parameters" element="tns:ExecuteSQLResponse" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpGetIn">
      <wsdl:part name="command" type="s:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpGetOut">
      <wsdl:part name="Body" element="tns:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpPostIn">
      <wsdl:part name="command" type="s:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpPostOut">
      <wsdl:part name="Body" element="tns:string" />
      </wsdl:message>
    - <wsdl:portType name="SQLplusWebServiceSoap">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLSoapIn" />
      <wsdl:output message="tns:ExecuteSQLSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:portType name="SQLplusWebServiceHttpGet">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLHttpGetIn" />
      <wsdl:output message="tns:ExecuteSQLHttpGetOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:portType name="SQLplusWebServiceHttpPost">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLHttpPostIn" />
      <wsdl:output message="tns:ExecuteSQLHttpPostOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="SQLplusWebServiceSoap" type="tns:SQLplusWebServiceSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceSoap12" type="tns:SQLplusWebServiceSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap12:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceHttpGet" type="tns:SQLplusWebServiceHttpGet">
      <http:binding verb="GET" />
    - <wsdl:operation name="ExecuteSQL">
      <http:operation location="/ExecuteSQL" />
    - <wsdl:input>
      <http:urlEncoded />
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="SQLplusWebServiceHttpPost" type="tns:SQLplusWebServiceHttpPost">
      <http:binding verb="POST" />
    - <wsdl:operation name="ExecuteSQL">
      <http:operation location="/ExecuteSQL" />
    - <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="SQLplusWebService">
    - <wsdl:port name="SQLplusWebServiceSoap" binding="tns:SQLplusWebServiceSoap">
      <soap:address location="http://clkaspenwatch:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceSoap12" binding="tns:SQLplusWebServiceSoap12">
      <soap12:address location="http://clkaspenwatch:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceHttpGet" binding="tns:SQLplusWebServiceHttpGet">
      <http:address location="http://servera:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceHttpPost" binding="tns:SQLplusWebServiceHttpPost">
      <http:address location="http://servera:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Server B
      <?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.aspentech.com/SQLplus.WebService/" 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.aspentech.com/SQLplus.WebService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.aspentech.com/SQLplus.WebService/">
    - <s:element name="ExecuteSQL">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="command" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="ExecuteSQLResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLResult" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="ExecuteSQLSoapIn">
      <wsdl:part name="parameters" element="tns:ExecuteSQL" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLSoapOut">
      <wsdl:part name="parameters" element="tns:ExecuteSQLResponse" />
      </wsdl:message>
    - <wsdl:portType name="SQLplusWebServiceSoap">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLSoapIn" />
      <wsdl:output message="tns:ExecuteSQLSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="SQLplusWebServiceSoap" type="tns:SQLplusWebServiceSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceSoap12" type="tns:SQLplusWebServiceSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap12:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="SQLplusWebService">
    - <wsdl:port name="SQLplusWebServiceSoap" binding="tns:SQLplusWebServiceSoap">
      <soap:address location="http://serverb:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceSoap12" binding="tns:SQLplusWebServiceSoap12">
      <soap12:address location="http://serverb:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Please advise me on how to fix the probelm. And please let me know any additional information is needed. Greatly appreciated~
    Best regards,
    Lawrence
    Edited by: UMeng Lai on Feb 6, 2009 4:07 PM

    Hi all,
    We're using MII 11.5 and trying to call a web service from a Aspen Watch server through the web service block in transaction. The web service enclosed a function call ExecuteSQL which will accept a sql query function and return a set of Data. Now, using the same web service on two different servers, we got a success(server A) and a failure(Server B). On the failed call, right in the first page of enter a URL, it will return a "SOAP Service could not be loaded: The element type 'META' must be terminated by the machine end-tag '</META>'" error.
    According to the admin of the web server, the web service on both servers can be called correctly when he created two simple ASP pages. After serious testing, he thought that the only reason should be MII may not be compatible with .Net 2.0 binding web service. The following is some comparison we made to the two servers.
                                                                                    Server A / Server B / Error, if applicable
    .Net Framework installed on MII server:                                 1.1, 2.0 /      1.1, 2.0     
    .Net Binding:                                                                          1.1 /               2.0
    IIS version on MII server:                                                 6 /                 6     
    From MII server broser to Server A web service:                 Yes /      Yes     
    From MII server browser to Server B web service:                 No /     No /      Return on web "The test form is only available for requests from the local machine"
    From localhost browser to Server A web service:                 n/a //     Yes     
    From localhost browser to Server B web service:                 Yes //     n/a     
    From PC browser to Server B web service:                                No /        Yes /     Return on web "The test form is only available for requests from the local machine"
    Credentials required to run web service:                                 No /     Yes /     
    The following are the SOAP generated:
    Server A
      <?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.aspentech.com/SQLplus.WebService/" 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.aspentech.com/SQLplus.WebService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.aspentech.com/SQLplus.WebService/">
    - <s:element name="ExecuteSQL">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="command" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="ExecuteSQLResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLResult" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="string" nillable="true" type="s:string" />
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="ExecuteSQLSoapIn">
      <wsdl:part name="parameters" element="tns:ExecuteSQL" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLSoapOut">
      <wsdl:part name="parameters" element="tns:ExecuteSQLResponse" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpGetIn">
      <wsdl:part name="command" type="s:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpGetOut">
      <wsdl:part name="Body" element="tns:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpPostIn">
      <wsdl:part name="command" type="s:string" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLHttpPostOut">
      <wsdl:part name="Body" element="tns:string" />
      </wsdl:message>
    - <wsdl:portType name="SQLplusWebServiceSoap">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLSoapIn" />
      <wsdl:output message="tns:ExecuteSQLSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:portType name="SQLplusWebServiceHttpGet">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLHttpGetIn" />
      <wsdl:output message="tns:ExecuteSQLHttpGetOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:portType name="SQLplusWebServiceHttpPost">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLHttpPostIn" />
      <wsdl:output message="tns:ExecuteSQLHttpPostOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="SQLplusWebServiceSoap" type="tns:SQLplusWebServiceSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceSoap12" type="tns:SQLplusWebServiceSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap12:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceHttpGet" type="tns:SQLplusWebServiceHttpGet">
      <http:binding verb="GET" />
    - <wsdl:operation name="ExecuteSQL">
      <http:operation location="/ExecuteSQL" />
    - <wsdl:input>
      <http:urlEncoded />
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="SQLplusWebServiceHttpPost" type="tns:SQLplusWebServiceHttpPost">
      <http:binding verb="POST" />
    - <wsdl:operation name="ExecuteSQL">
      <http:operation location="/ExecuteSQL" />
    - <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="SQLplusWebService">
    - <wsdl:port name="SQLplusWebServiceSoap" binding="tns:SQLplusWebServiceSoap">
      <soap:address location="http://clkaspenwatch:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceSoap12" binding="tns:SQLplusWebServiceSoap12">
      <soap12:address location="http://clkaspenwatch:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceHttpGet" binding="tns:SQLplusWebServiceHttpGet">
      <http:address location="http://servera:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceHttpPost" binding="tns:SQLplusWebServiceHttpPost">
      <http:address location="http://servera:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Server B
      <?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.aspentech.com/SQLplus.WebService/" 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.aspentech.com/SQLplus.WebService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.aspentech.com/SQLplus.WebService/">
    - <s:element name="ExecuteSQL">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="command" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="ExecuteSQLResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLResult" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="ExecuteSQLSoapIn">
      <wsdl:part name="parameters" element="tns:ExecuteSQL" />
      </wsdl:message>
    - <wsdl:message name="ExecuteSQLSoapOut">
      <wsdl:part name="parameters" element="tns:ExecuteSQLResponse" />
      </wsdl:message>
    - <wsdl:portType name="SQLplusWebServiceSoap">
    - <wsdl:operation name="ExecuteSQL">
      <wsdl:input message="tns:ExecuteSQLSoapIn" />
      <wsdl:output message="tns:ExecuteSQLSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="SQLplusWebServiceSoap" type="tns:SQLplusWebServiceSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" 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="SQLplusWebServiceSoap12" type="tns:SQLplusWebServiceSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="ExecuteSQL">
      <soap12:operation soapAction="http://www.aspentech.com/SQLplus.WebService/ExecuteSQL" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="SQLplusWebService">
    - <wsdl:port name="SQLplusWebServiceSoap" binding="tns:SQLplusWebServiceSoap">
      <soap:address location="http://serverb:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
    - <wsdl:port name="SQLplusWebServiceSoap12" binding="tns:SQLplusWebServiceSoap12">
      <soap12:address location="http://serverb:13080/sqlpluswebservice/sqlpluswebservice.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Please advise me on how to fix the probelm. And please let me know any additional information is needed. Greatly appreciated~
    Best regards,
    Lawrence
    Edited by: UMeng Lai on Feb 6, 2009 4:07 PM

  • HELP!!! Problem of Calling external Web Service from a Java Stored Procedur

    1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
    2.After I import .jar to Oracle what is required by the topic,som error occued.
    Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
    ORA-29545: badly formed class.
    3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
    Thany you!

    Try this
    Re: HELP! Loading Java Classes into Oracle ERROR

  • UWL connector: problems with calling a web service with a SAPLOGONTICKET

    Hi,
    I want to implement a uwl connector that calls a web service to retrieve the uwl items data with a SAPLOGONTICKET. If I refresh the UWL I get the following error.
    An error occured while reading data from the destination sap.com/com.xxxx.connector.RequestLeaveDP/com.xxxx.connector.RequestLeave/Config1Port_Document. The error was: com.sap.security.core.client.ws.SSO2Exception No SAP Logon Ticket was found for the user. Please ensure the user authenticated using HTTP/HTTPS and the JAAS login stack has been configured correctly. As an alternative, consider changing the authentication type to Assertion Ticket. .
    If I call  the Web Service in an iView I don't get this error. Maybe the UWL calls the web service not with the current authenticated user.
    I tried the following code, to get the current SSO2 Ticket from the current user. It looks like, that is the current user, but the web service will not accept this. (testing purpose)
    com.sap.security.api.IUser currentUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
    String logonTicketUwlUser = (String) context.getUser().getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
    String logonTicketCurrentUser = (String) currentUser.getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
    InitialContext contextWebService = new InitialContext();
    RequestLeaveWebService requestLeaveWebService = (RequestLeaveWebService) contextWebService.lookup(wsClient);
    RequestLeaveWebServiceViDocument webServiceEndPoint = requestLeaveWebService.getLogicalPort("Config1Port_Document");
    UWLHolidayItem holidayItem = webServiceEndPoint.getHolidayItem("");
    Any ideas?
    Regards
    Markus
    Edited by: Markus Karsch on Oct 18, 2008 11:15 PM

    Are you calling invoke()?
    Do you have the port type in the servlet context?

  • Calling a web service in external system from SRM

    Hi folks,
    A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how I'll get a return. Please let me know in detail.
    Thanks,
    Prem

    Prem,
    Hi. You can call the service via HTTP protocol. Pass them values (SET_DATA), and receive a response (GET_DATA), via xml/html.
    In your code you would need to create the xml data to pass them, and evaluate the returned xml.
    Process...
    Data setup
    1) Create the XML to send them
    Working with the external service
    2) Open the HTTP connection
    2a) cl_http_client=>create_by_url (IF_HTTP_CLIENT)
    2b) lr_client->authenticate
    3) Call the to send them the XML
    3a) lr_client->request->set_data
    3b) lr_client->send
    4) Call the lr_client->receive to return the response
    5) Close the connection lr_client->close
    Data evaluate
    6) Evaluation the returned XML and process.
    Hope this helps
    Cheers
    Rob
    Code example below.. (There are loads of SAP examples depending on which release you are on).
    Process the call to the HTTP client - logic copied from RSHTML01     *
    Open IF_HTTP_CLIENT
      call method cl_http_client=>create_by_url
        exporting
          url                = l_url
        importing
          client             = lr_client
        exceptions
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          others             = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                   with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          raising oops.
      endif.
    Authenticate the user
      if not g_int_type-usr is initial.
        move: g_int_type-usr      to l_user,
              g_int_type-password to l_password.
        call method lr_client->authenticate
          exporting
            username = l_user
            password = l_password.
      endif.
    Allow for Cookies
      lr_client->propertytype_accept_cookie = lr_client->co_enabled.
    Set the server protocol
      select single gsval into l_server_protocol
        from z77s0
          where grpid = c_grpid
          and   semid = c_server_protocol.
      if sy-subrc eq 0
      and not l_server_protocol is initial.
        move l_server_protocol to l_st_server_protocol.
        call method lr_client->request->set_header_field
          exporting
            name  = '~server_protocol'
            value = l_st_server_protocol.
      endif.
      Send out the XML
      Set body to XML data
        lr_client->request->set_data( g_xxml ).
        save_xml( i_role = cl_xml_document=>c_role_oreq ).
        l_request_length = xstrlen( g_xxml ).
      If Data is sent through then we need certain flags set
        lr_client->request->set_header_field(
                                   name = 'Content-Type'
                                   value = zcl_tem_bsp=>c_xml_content ).
        call method lr_client->request->set_header_field
          exporting
            name  = '~request_method'
            value = 'POST'.
      Set length of string to the header fields
        if not l_request_length is initial.
          move l_request_length to l_st_request_length.
          lr_client->request->set_header_field(
                                    name = 'content-length'
                                    value = l_st_request_length ).
        endif.
      Send the request
        call method lr_client->send
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            http_invalid_timeout       = 4
            others                     = 5.
        check_for_error 'Send'.
      Receive the response
        call method lr_client->receive
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            others                     = 4.
        check_for_error 'Receive'.
      Determined returned XML or HTML
        g_xxml = lr_client->response->get_data(  ).
      Determine the header fields for failure validation
        if lr_client->response->get_header_field( '~status_code' )
              between 200 and 299.
          save_xml( i_role = cl_xml_document=>c_role_ires ).
        else.
          l_status_code =
            lr_client->response->get_header_field( '~status_code' ).
          l_descript_1 =
            lr_client->response->get_header_field( 'error' ).
          l_descript_2 =
            lr_client->response->get_header_field( 'errortext' ).

  • Strange problem when calling a Web Service...

    Hi,
    First of all, I succeed calling a custom web service : I pass to this web service a table and retrieve a table.
    Now, I am trying to do the same thing with the web service of BAPI_USER_GETLIST.
    Here is the code in the Component Controller.
    <i>
    Request_BAPI_USER_GETLISTPortType_BAPI_USER_GETLIST    input =
         new Request_BAPI_USER_GETLISTPortType_BAPI_USER_GETLIST();
    wdContext.nodeRequest_BAPI_USER_GETLISTPortType_BAPI_USER_GETLIST().bind(input);
    ComplexType_BAPI_USER_GETLIST complex = new ComplexType_BAPI_USER_GETLIST();
    complex.setMAX_ROWS(10);
    complex.setWITH_USERNAME("X");
    complex.addRETURN(new ComplexType_BAPIRET2());
    complex.addSELECTION_EXP(new ComplexType_BAPIUSSEXP());
    complex.addSELECTION_RANGE(new ComplexType_BAPIUSSRGE());
    complex.addUSERLIST(new ComplexType_BAPIUSNAME());
    input.setParameters(complex);
    try {
         wdContext.currentRequest_BAPI_USER_GETLISTPortType_BAPI_USER_GETLISTElement()
              .modelObject().execute();
    }catch(Exception e) {
         wdContext.currentContextElement().setException(e.getMessage());
    wdContext.nodeResponse().invalidate();
    </i>
    I do not get any results.
    When debugging in the ABAP code, I get something strange.
    For everyone who looks in the BAPI_USER_GETLIST source code, you can notice
    that there is a refresh in the initialization function for the retrun and userlist
    tables.
    But, all the other tables (SELECTION_EXP and SELECTION_RANGE) has an empty line added!
    And this cause the problem.
    How do I know that this is the problem ? Because, when debugging in ABAP, I delete
    those lines in thoses 2 tables and everything works good.
    Is there a way to solve this problem ?
    Thanks in advance.

    Hi
      Again you are trying to add an empty line and then delete it. Well what i am saying is you dont have to do the lines
    complex.addRETURN(new ComplexType_BAPIRET2());
    complex.addUSERLIST(new ComplexType_BAPIUSNAME());
    ComplexType_BAPIUSSEXP d1 = new ComplexType_BAPIUSSEXP();
    complex.addSELECTION_EXP(d1);
    ComplexType_BAPIUSSRGE d2 = new ComplexType_BAPIUSSRGE();
    complex.addSELECTION_RANGE(d2);
    complex.removeSELECTION_EXP(d1);
    complex.removeSELECTION_RANGE(d2);
    input.setParameters(complex);
    Just write the following code and you are good to go.
    Bapi_User_Getlist_Input complex = new Bapi_User_Getlist_Input();
    wdContext.nodeBapi_User_Getlist_Input().bind(complex);
    complex.setMax_Rows(10);
    complex.setWith_Username("X");
    try
      wdContext.currentBapi_User_Getlist_InputElement().modelObject().execute();        
    catch(Exception e)
      wdComponentAPI.getMessageManager().reportException ("Exception occured "+e,true);      
    Hope that helps you. You dont have to pass any values to the table structures. This specific bapi does not require data to be passed to the structures and by doing so empty lines are added and that is what i was saying when i explained in my previous post. Hope that clarifies your doubt. Do let me know in case u require further clarifications.
    If you are getting a error saying Return and Selection_EXP are required check the mapping.
    It is enough if you just select the nodes under
       Bapi_User_List_Input
          |_Output
          |    |_Return (Model Node)
          |    |_Selection_Exp (Model Node)
          |    |_Selection_Range (Model Node)
          |    |_Userlist (Model Node)
          |    |_Rows (Model Attribute)
          |_Max_Rows (Model Attribute)
          |_With_Username (Model Attribute)  
    and of course select the Model Attributes MAX_ROWS and With_Username
    Let me know if you require any more information
    regards
    ravi

  • Problem in Calling a Web Service

    Hi All,
    I created an Adaptive Web Service Model by selecting a wsdl file in one of my Web Dynpro Project. Deployment of project is successful but when i run the application i am getting the following error:
    The initial exception that caused the request to fail, was:
       com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 404 while accessing URL: http://paritas.sap.com:8000/sap/bc/srt/wsil/. Response Message: Not Found. Content Type: text/html. Body Content: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Error Report</title> <style> td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;} A:link A:visited A:active </style> </head> <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>  404 &nbsp Not Found</b></font></td> </tr> <tr bgcolor="#3F73A3"> <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td> <td height="23"><img width=1 height=1 border=0 alt=""></td> <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/7.01 </b></font></td> </tr> <tr bgcolor="#9DCDFD"> <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td> </tr> </table> <br><br><br><br><br><br> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>  The requested resource does not exist.</b></font></td> </tr> <tr bgcolor="#FFFFFF"> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><b>  Details:</b></font></td> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><pre>  Go to <A HREF="/" target="_parent">main page</A> of this application!</pre></font></td> </tr> </body> </html>
    Can anyone tell me how to solve this issue??
    regards,
    Ramakanth

    Hi Lavanya,
    Thanks for the reply..
    As u said i tried from webservices navigator.. It is giving a message as
    Cannot download WSDL from http://paritas.sap.com:8000/sap/bc/srt/wsdl/bndg_DF69792F4B606DF1B168001CC0F24CF0/wsdl11/allinone/ws_policy/document?sap-client=101: It is not allowed to access this service. If you believe you should be able to, please contact your system administrator.
    But I am the administrator and i logged in as administrator only..
    regards,
    Ramakanth

  • Problem in call onpremise web service from o365 using jquery ajax

    I am trying
    to consume an onpremise web  service from the o365 site page using
    jquery ajax and it's giving me following error:<o:p></o:p>
     "Error:
    Operation aborted<o:p></o:p>
    Here is the
    code:<o:p></o:p>
     <o:p></o:p>
    jQuery.support.cors
    = true;<o:p></o:p>
              $.ajax<o:p></o:p>
    ({    <o:p></o:p>
    type: "POST",
                   <o:p></o:p>
     url: 'http://**************/WebService.asmx/CreateFolder',
                 <o:p></o:p>
    data: "{'PartId':'"+partnerid+"'}",
                  <o:p></o:p>
    contentType: "application/jsonp; charset=utf-8",
                  <o:p></o:p>
    dataType: "jsonp",
                 <o:p></o:p>
    username: "*****************",
                  <o:p></o:p>
    password: "******************",<o:p></o:p>
      success:
    function (msg) { $("#divResult").html("Success"); },
                <o:p></o:p>
       error:
    function (xhr, status, error){  console.log(error);
    console.log(status); }
              <o:p></o:p>
    });<o:p></o:p>
    Any
    help would be greatly appreciated.Thanks.<o:p></o:p>

    Where exactly you are trying to create folder
    This will work on both Office 365 and on prem
    http://www.c-sharpcorner.com/UploadFile/0e18a8/create-a-folder-in-document-library-in-sharepoint-2013-using/
    var context = SP.ClientContext.get_current();
    //gets the current context
    var web = context.get_web();
    //gets the web object
    var list = web.get_lists();
    //gets the collection of lists
    var targetList;
    var itemCreation;
    function createFolder() {
        targetList = list.getByTitle("MyDocumentLibrary");
        itemCreation =
    new SP.ListItemCreationInformation();
        itemCreation.set_underlyingObjectType(SP.FileSystemObjectType.folder);
        itemCreation.set_leafName("MyCustomFolder");
        var folderItem = targetList.addItem(itemCreation);
        folderItem.update();
        context.load(folderItem);
        context.executeQueryAsync(onFolderCreationSuccess, onFolderCreationFail);

  • Error in calling a web service

    hi,
    i am facing a problem in calling a web service.
    following are the steps i followed.
    1. created a client proxy object in transaction se80
    2. called that proxy object in my program
    3. executed the program
    problem
    1. an exception 'CX_AI_SYSTEM_FAULT' is caught with error code 'GET_BUSINESS_SYSTEM_ERROR' and error text 'An error occurred when determining the business system (SLD_API_EXCEPTION)'
    some facts abt the system:
    1. we do not have XI server.
    2. i havent created a logical port manually still there exists one entry in table SRT_LP which is as follows-
    PROXYCLASS - CO_CAT_PING
    LP_NAME - CO_CAT_PING
    ACTIVE - A
    DEFAULTPORT - X
    3. i found error messae in transaction 'sldcheck' as 'Summary: Connection to SLD does not work'
    4. i havent created a rfc destination.
    please reply ASAP.
    thanks in advance,
    Sagar

    Got a new file for testing the web service and it executed fine. Closing the thread.
    Regards
    Barada

  • Calling Web Service with SOAP header from BPEL

    Hi,
    I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
    But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
    Below is the error message (copied from clipboard).
    +<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
    +<pSubnoin>+
    +<insubno>12345678</insubno>+
    +</pSubnoin>+
    +</getsubinfoElement>+
    +</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
    start fault message:+
    Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
    *:end fault message*</summary>
    +</part></bindingFault></fault></messages>+
    As said, no header information is visible in the Invoke activity.
    Please provide help for the above issue.
    -MJ

    Hello Patrick,
    Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
    +<assign name="Assign_Header">+
    +<copy>+
    +<from expression="'tkl12'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'tkl123'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'TKL'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +</assign>+
    The expected input by the web service is as below with the header information highlighted.
    +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
    +*<soap:Header>*+
    +*<ns1:LOGIN_INFO>*+
    +*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
    +*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
    +*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
    +*</ns1:LOGIN_INFO>*+
    +*</soap:Header>*+
    +<soap:Body>+
    +<ns1:substatusElement>+
    +<ns1:pInparam>+
    +<ns1:insubno>7674988</ns1:insubno>+
    +</ns1:pInparam>+
    +</ns1:substatusElement>+
    +</soap:Body>+
    +</soap:Envelope>+

  • Problem calling a web service via SOAP ad.

    Hi,
    I need to call a web service in an synchronous RFC to Web service scenario.The provider of service said me that they are going to accept production order with the service they provide. However, service semms to have only 2 request parameters one is a string enumeration ("online" or "offline") but the other has no type. In WSDL it is shown as the following -
    -<s:element minOccurs="0" maxOccurs="1" name="strFilenameOrXML">
    - <s:complexType mixed="true">
    - <s:sequence>
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
    When I try to test the web service with Altova XML Spy it gives me the error "Object reference not set to an instance of an object" .. at StokbarPlus.ProdService.WriteProdToSB(XmlNode strFilenameOrXML, IntegrationType EntegrasyonTip)..
    I guess the service is waiting for a xmlNode object...
    Is it possible to assign an XI message(coming from RFC) as an xmlNode object to an element of a webservice message and send it by using SOAP adapter?.
    I tried send the SOAP message by putting the whole xml(a sample order document) as a string constant in the strFilenameOrXML element and send but it did not work...
    How should I proceed?
    Thanks in advance for your help,
    -Tarik

    Hi,
    Problem is still unsolved.
    By the way I figured out that they are waiting the xml message inside strFilenameOrXML tag and tried to send it so. However it does not work. I have tried two different ways to send it.
    First one is by using messages in WSDL: did not work because special chars like <,> in the message that I am sending in the tag is escaped  .
    The Second way is using the data types that I developed, it did not work too since the receiver expects one of the inner node's namespace prefix to exist.
    I tried exporting the xsd of the message type, adding attributeFormDefault="qualified" to header, and reimporting it. It did not work, because it changes all nodes, but they want some specific node to be qualified.
    Any suggestions?

  • Problem trying to call a web service.

    I have a CF page that needs to use user authentication from an ASP.NET machine, so I'm trying to call a web service to determine whether or not the user has been authenticated.
    I'm using this code:
    <cfinvoke
        webservice="https://my-domain.com/SessionQueryService?wsdl"
        method="UserLookupServiceService"
        returnvariable="authenticated"
        >
    Running this returns the following error:
    Unable to read WSDL from URL: https://my-domain.com/SessionQueryService?wsdl.
    Error: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated.
    I'm assuming this is a certiificate problem, since when I visit the ASP.NET machine via a browser, I get a certificate warning and have to add an exception.  Is my assumption correct, and is there a way around it?

    Now I have the sesssion ID I needed, and it's on to the next point of failure.
    Web service operation userLookupBySessionResponse with parameters {applicationName={xxxx},endUserIPAddress={xxxx},accessCode={xxxx},sessionId={xxxx}} cannot be found.
    I've Googled and Googled, with no luck.  If I browse my web service URL I get an Axis 1.4 XML file with several entries.  I'm assuming that the "wsdl:message name=" part is what I use for my <cfinvoke> method, but I could be wrong.  I assume that because there are "wsdl:part name="s that match my invokearguments.
    It seems like I'm doing everything right, yet still the message above.  I have no idea where to go from here.

  • Problems calling external Web Service from a Java Stored Procedure

    I'm using a sample code that I found here about calling external web services from a Java Store Procedure ( Credit Agency Web Service http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html ) but when I run it ,send this error. I dont know what can I do or what is missing. Please help me. Thanks.
    Error: Premature EOF encountered [java.io.EOFException] [SOAPException: faultCode=SOAP-ENV:IOException; msg=Premature EOF encountered; targetException=java.io.EOFException: Premature EOF encountered] at org.apache.soap.SOAPException.(SOAPException.java:77) at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765) at org.apache.soap.rpc.Call.invoke(Call.java:261) at oracle.otnsamples.wsclient.CreditAgencyServiceStub.authorizeCustomer(CreditAgencyServiceStub.java:84) at Products.jspService(Products.jsp:120) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:795) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:794) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    I'm also facing problem in running the example on the page http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    I've Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and Oracle Application Server 10g (10.1.3). When I executed the following command,
    loadjava -thin -user sys/password@localhost:1521:oradb -resolve -synonym -verbose -grant public %OC4J_HOME%/webservices/lib/soap.jar %OC4J_HOME%/lib/dms.jar %OC4J_HOME%/jlib/javax-ssl-1_1.jar %ORACLE_HOME%/lib/servlet.jar %OC4J_HOME%/j2ee/home/lib/mail.jar
    ... mentioned in step 3 under the "Configuring the Application" section on the above link, the process terminates with the following error
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    class javax/net/DefaultServerSocketFactory: creation (createFailed)
    class javax/net/DefaultSocketFactory: creation (createFailed)
    class javax/net/ServerSocketFactory: creation (createFailed)
    class javax/net/SocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLSocketFactory: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedEvent: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedListener: creation (createFailed)
    class javax/net/ssl/SSLException: creation (createFailed)
    class javax/net/ssl/SSLHandshakeException: creation (createFailed)
    class javax/net/ssl/SSLKeyException: creation (createFailed)
    class javax/net/ssl/SSLPeerUnverifiedException: creation (createFailed)
    class javax/net/ssl/SSLProtocolException: creation (createFailed)
    class javax/net/ssl/SSLServerSocket: creation (createFailed)
    class javax/net/ssl/SSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/SSLSession: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingEvent: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingListener: creation (createFailed)
    class javax/net/ssl/SSLSessionContext: creation (createFailed)
    class javax/net/ssl/SSLSocket: creation (createFailed)
    class javax/net/ssl/SSLSocketFactory: creation (createFailed)
    class javax/security/cert/Certificate: creation (createFailed)
    class javax/security/cert/CertificateEncodingException: creation (createFailed)
    class javax/security/cert/CertificateException: creation (createFailed)
    class javax/security/cert/CertificateExpiredException: creation (createFailed)
    class javax/security/cert/CertificateNotYetValidException: creation (createFailed)
    class javax/security/cert/CertificateParsingException: creation (createFailed)
    class javax/security/cert/X509Certificate: creation (createFailed)
    exiting : Failures occurred during processing
    I've checked the path to all the jar files.
    I tried to run the command again with system/password instead sys/password but then I got the following stacktrace:
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    exiting : Failures occurred during processing
    Thanks in advance for any useful help.
    -

Maybe you are looking for