Webservice call problem

roatax

New Member
I'm trying to create a procedure with a call to a webservice and keep getting this error when i do the actual call to 'GetTodaysOutlook':

"Error creating SOAP Call parameter: The requested 'PSCAnyType' C++ type for the {http://www.xignite.com/services/}OutlookTypes XML type cannot be instantiated. Mapping to 'WASP_DII_String' was found. (11797)"

I did run the WSDL analyzer(bprowsdldoc) on the wsdl , but i still cant find out what i do wrong).

If there is anyone that can tell me what i do wrong, i would appreciate it
(even if that answer is that i do everything wrong:)

CODE
-------------
DEFINE VARIABLE hWS AS HANDLE.
DEFINE VARIABLE hPortType AS HANDLE.
DEFINE VARIABLE OutlookType AS LONGCHAR NO-UNDO.
DEFINE VARIABLE GetTodaysOutlookResult AS LONGCHAR NO-UNDO.

PROCEDURE GetTodaysOutlook:
DEFINE INPUT PARAMETER OutlookType AS LONGCHAR NO-UNDO .
DEFINE OUTPUT PARAMETER GetTodaysOutlookResult AS LONGCHAR NO-UNDO.
END PROCEDURE.

CREATE SERVER hWS.
hWS:CONNECT("-WSDL http://www.xignite.com/xOutlook.asmx?WSDL ").
IF NOT hWS:CONNECTED() THEN MESSAGE "SERVER NOT CONNECTED" VIEW-AS ALERT-BOX.

RUN XigniteOutlookSoap SET hPortType ON SERVER hWS.

DEFINE VARIABLE hDoc AS HANDLE.
DEFINE VARIABLE hRoot AS HANDLE.
DEFINE VARIABLE hChild AS HANDLE.
DEFINE VARIABLE hNextChild AS HANDLE.
DEFINE VARIABLE hNextNode AS HANDLE.
DEFINE VARIABLE hTextNode AS HANDLE.
CREATE X-DOCUMENT hDoc.
CREATE X-NODEREF hRoot.
CREATE X-NODEREF hChild.
CREATE X-NODEREF hNextChild.
CREATE X-NODEREF hNextNode.
CREATE x-noderef hTextNode.
hDoc:CREATE-NODE-NAMESPACE(hRoot, "http://www.xignite.com/services/","ns0:GetTodaysOutlook", "element").
hRoot:SET-ATTRIBUTE("xmlns:ns0", "http://www.xignite.com/services/").
hDoc:APPEND-CHILD(hRoot).
hDoc:CREATE-NODE-NAMESPACE(hChild, "http://www.xignite.com/services/","ns0:OutlookType", "element").
hRoot:APPEND-CHILD(hChild).
hDoc:CREATE-NODE(hTextNode, ?, "text").
hTextNode:NODE-VALUE = "MarketReflections".
hChild:APPEND-CHILD(hTextNode).
hDoc:SAVE("longchar", OutlookType).

RUN GetTodaysOutlook IN hPortType(INPUT OutlookType , OUTPUT GetTodaysOutlookResult). /** Error point **/

delete object hPortType no-error.
hWS:DISCONNECT().
DELETE OBJECT hWS.

----
 

Gasoline

New Member
Hi,

Not sure if this is of any help at all, but when I ran your code, it worked fine for me.
Here is the SOAP Response (from SOAP Spy)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<GetTodaysOutlookResponse xmlns="http://www.xignite.com/services/">
<GetTodaysOutlookResult>
<Outlook>
<Outcome>RequestError</Outcome>
<Message>No Outlooks matched your search criteria.</Message>
<Identity>IP</Identity>
<Delay>0</Delay>
<EventID/>
<OutlookType>None</OutlookType>
<Date>1/1/1900</Date>
<Time/>
<Content/>
<Location/>
<Author/>
</Outlook>
</GetTodaysOutlookResult>
</GetTodaysOutlookResponse>
</soap:Body>
</soap:Envelope>

I guess this suggests that there is nothing wrong with your code at least.
 
Top