cancel
Showing results for 
Search instead for 
Did you mean: 

WebService - getting "Could not execute web service operation"

Former Member
0 Kudos

Hi all,

I have imported a websevice into my VC model, I can see input and output ports and I can add input and output forms. But when I try to test the webservice I get the error: "Could not execute web service operation". I have read this link https://wiki.sdn.sap.com/wiki/display/VC/PortalRequestFailed and a have checked the parameters (all of them are text and not null). The webservice is running great in other application. Can anyone tell where else could be the mistake?

Thanks in advance

Ivo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you provide the URL for this webservice (if it's an openly accessible service)?

Former Member
0 Kudos

Unfortunately it is not accessible. It is a test webservice in Lotus Notes 6.5.

MichaelSambeth
Advisor
Advisor
0 Kudos

Hello Ivo,

a Lotus Notes/Domino server exposes the web services as standard URLs - similar to accessing a Lotus application via the browser.

Could you maybe ask the Lotus guys once more? The URL on a Lotus Domino R6 system would usually be like this: http://lotuserver.mycompany.com/mydatabase.nsf/myservice?OpenAgent

Or simply post the WSDL (in the section <soap:address location=.../> you also find the URL of the WebService.

Regards

Michael

Former Member
0 Kudos

Hi Michael,

I meant it isnt accesible outside our intranet. The WSDL is:

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

- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="ISBNSearch" targetNamespace="http://www.your-company.com/ISBNSearch.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.your-company.com/ISBNSearch.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.your-company.com/ISBNSearch.xsd1">

- <types>

<xsd:schema targetNamespace="http://www.your-company.com/ISBNSearch.xsd1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

</types>

- <message name="ISBNSearch">

<part name="isbn" type="xsd:string" />

</message>

- <message name="ISBNSearchResponse">

<part name="copies" type="xsd:string" />

<part name="title" type="xsd:string" />

<part name="authors" type="xsd:string" />

<part name="publisher" type="xsd:string" />

<part name="price" type="xsd:string" />

<part name="isbnout" type="xsd:string" />

</message>

- <portType name="ISBNSearchPortType">

- <operation name="ISBNSearch">

<input message="tns:ISBNSearch" />

<output message="tns:ISBNSearchResponse" />

</operation>

</portType>

- <binding name="ISBNSearchBinding" type="tns:ISBNSearchPortType">

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

- <operation name="ISBNSearch">

<soap:operation soapAction="capeconnect:ISBNSearch:ISBNSearchPortType#ISBNSearch" />

- <input>

<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.your-company.com/ISBNSearch/binding" use="encoded" />

</input>

- <output>

<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.your-company.com/ISBNSearch/binding" use="encoded" />

</output>

</operation>

</binding>

- <service name="ISBNSearch">

- <port binding="tns:ISBNSearchBinding" name="ISBNSearchPort">

<soap:address location="http://10.188.3.22/bookcatalog.nsf/WebService" />

</port>

</service>

</definitions>

MichaelSambeth
Advisor
Advisor
0 Kudos

Hello Ivo,

please try and test with the SAP WebServices Checker. To do so, please perform the following steps:

- open SAP NetWeaver Developer Studio

- Window --> open perspective --> enterprise portal

- load the wsdl

- then right-click on one of the methods and perform "create SOAP request"

- then enter the parameter value(s)

- then send the message

on the right, you the the response.

Regards

Michael

Former Member
0 Kudos

I am getting: The SOAP message returned is not well formed. com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Unable to create message from source.

The XML Tab is empty. When running the same webservice from a standalone application it works fine.

MichaelSambeth
Advisor
Advisor
0 Kudos

Hello Ivo,

could you send me the NSF?

Thanks & regards

Michael

Former Member
0 Kudos

Maybe there could be a problem with namespaces in WSDL?

MichaelSambeth
Advisor
Advisor
0 Kudos

Hello Ivo,

I see two problems with this example that prevent it from working:

- the "RemoveWhiteSpace" function

- the addressing and usage of the LotusScript Library

<b>Regarding (1)</b>

when using the SAP WebServicesChecke the created SOAP Request also contains carriage returns and blanks. The RemoveWhiteSpace function in the agent code however does not remove those characters. To do so, you have to add the following statements:

i1 = Instr(1, PlainText, Chr$(10))

While i1 <> 0

PlainText = Mid$(PlainText, 1, i1-1) & Mid$(PlainText, i1+1)

i1 = Instr(1, PlainText, Chr$(10))

Wend

i1 = Instr(1, PlainText, " <")

While i1 <> 0

PlainText = Mid$(PlainText, 1, i1-1) & Mid$(PlainText, i1+1)

i1 = Instr(1, PlainText, " <")

Wend

<b>Regarding (2)</b>

the addressing of the ISBN Search function relies on an URI: identifier that should be used to find the script library called "Domino" which hosts the ISBNSearch() function. This does not work since the SOAP request does not contain a URI: identifier. To solve this issue, add Use "Domino" to the options of the script library to the agent and change the call to ISBNSeach from "Execute callString" to "response = ISBNSearch(incoming)"

Then the example works fine. I tested with WFetch (a Microsoft Tool) and with SAP NetWeaver Developer Studio web services checker. I also sent you a screenshot of NWDS and a ISBN search.

Summarizing the Lotus agent and script library code is subject to improvement since the usage of such string manipulations is error-prone. It is more effective and more stable to use a SOAP Parser implementation such as the Microsoft SOAP toolkit or others which also work fine with DOmino R6. I also send you an example based on the SOAP toolkit which comes with a much smaller source code.

Regards

Michael

Former Member
0 Kudos

Thank you for your help Michael.

Former Member
0 Kudos

One more thing. Did you try this webservice in VC? It is running great in NWDS but I am still getting "Could not execute web service operation" in VC.

Former Member
0 Kudos

I have changed a script a little bit and now the web service works even from VC. The VC sends the request with namespace definition in SOAP-ENV:Body tag which was not acceptable for this webservice. After that i had a problem with right order of output paramaters. If the parameters arent ordered in a way that VC expects it throws an exception. I didnt find out how the VC orders the parameters but it is not alphabetically nor as described in WSDL.

Now I have one more problem which doesnt make sense to me. When I test the webservice the VC displays in each column the price value. So in each column I am getting 49,90. I have checked the web service output xml file and it gives right values(in each column there is a different value). Did anyone experience anything similar?

Regards

Ivo

Answers (0)