470,636 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

DB2 v9 web services sample doesn't work?

Hi All;
I am trying to test the web services consumer example on a DB2 v9 ESE
Windows server. I have tried 2 methods which both return the same
error:
-----------------------------------------------------------------------
[IBM][CLI Driver][DB2/NT] SQL0443N Routine "DB2XML.SOAPHTTPV"
(specific name "SOAPHTTPVIVO") has returned an error SQLSTATE with
diagnostic text "Error during socket connect". SQLSTATE=38309
------------------------------------------------------------------------

Here is the code that generates the error (method #1)
-------------------------------------------------------------------------
values db2xml.soaphttpv('http://services.xmethods.net/soap'
,''
,varchar('<ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
|| '<country1 xsi:type="xsd:string">usa</country1>'
|| '<country2 xsi:type="xsd:string">euro</country2>'
|| '</ns1:getRate>')
)
---------------------------------------------------------------------------
Here is the code for method #2
---------------------------------------------------------------------------
VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLCAST(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);
----------------------------------------------------------------------------

Is the provider still functional? Do I have a firewall issue? Has
anyone gotten these to work? Thanks for any help or insight.

Pete H

Nov 14 '06 #1
4 2608
Hi Pete

this error can occur, if the remote web service is not available. It
might be that you just tried it at a time where the XMothods server was
down. It might also be a firewall issue in case DB2 is not allowed to
connect.

I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.

So - in case you get this error you might want to double check if the
server is responding - for example you can use the endpoint URL in a
browser and see if you get some response. And you might also want to
check your firewall settings.

Regards,

Michael

peteh wrote:
Hi All;
I am trying to test the web services consumer example on a DB2 v9 ESE
Windows server. I have tried 2 methods which both return the same
error:
-----------------------------------------------------------------------
[IBM][CLI Driver][DB2/NT] SQL0443N Routine "DB2XML.SOAPHTTPV"
(specific name "SOAPHTTPVIVO") has returned an error SQLSTATE with
diagnostic text "Error during socket connect". SQLSTATE=38309
------------------------------------------------------------------------

Here is the code that generates the error (method #1)
-------------------------------------------------------------------------
values db2xml.soaphttpv('http://services.xmethods.net/soap'
,''
,varchar('<ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
|| '<country1 xsi:type="xsd:string">usa</country1>'
|| '<country2 xsi:type="xsd:string">euro</country2>'
|| '</ns1:getRate>')
)
---------------------------------------------------------------------------
Here is the code for method #2
---------------------------------------------------------------------------
VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLCAST(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);
----------------------------------------------------------------------------

Is the provider still functional? Do I have a firewall issue? Has
anyone gotten these to work? Thanks for any help or insight.

Pete H
Nov 16 '06 #2

sc*******@gmail.com wrote:
Hi Pete

I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.
Hi Michael;
Can you confirm that you cut-and-pasted the EXACT statement from my
post and it ran OK? That would seem to point to a firewall issue as
I've tried it many times over the last few days with no success.
Thanks!

Pete H

Nov 16 '06 #3
Hello Pete,

sorry for the late response - but yes, I copied and paste the exact
statement you posted here. The first one works right away. The second
one fails with the following error:

SQL0443N Routine "DB2XML.SOAPHTTPV" (specific name "SOAPHTTPVIVO") has
returned an error SQLSTATE with diagnostic text "1 is an invalid
index".
SQLSTATE=38327

But this is due to changes in XMLCAST function in DB2 version 9.1 - you
have to use XMLSERIALIZE now - change the 2nd statement to:

VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLSERIALIZE(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);

So from my perspective that looks pretty much like a firewall issue.

Regards,

Michael
peteh wrote:
sc*******@gmail.com wrote:
Hi Pete

I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.

Hi Michael;
Can you confirm that you cut-and-pasted the EXACT statement from my
post and it ran OK? That would seem to point to a firewall issue as
I've tried it many times over the last few days with no success.
Thanks!

Pete H
Nov 30 '06 #4
sc*******@gmail.com wrote:
Hello Pete,

sorry for the late response - but yes, I copied and paste the exact
statement you posted here. The first one works right away. The second
one fails with the following error:
Thanks for confirning. I've been working with our network services
group to resolve. Btw, great info on XMLSerialize.

Pete H

Dec 1 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Burns | last post: by
4 posts views Thread by Sahil Malik [MVP] | last post: by
8 posts views Thread by Woody Splawn | last post: by
4 posts views Thread by =?Utf-8?B?U2NvdHQ=?= | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.