[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: httpapi problem
Dear Mike ,
Thanks for the reply.My questions is When i am sending soap
xml request to sap xi server,it is giving response as a WSDL
document,but not response with out put parameter.I am attaching RPG
program and debug text file.Please have a look at this.
On Fri, Dec 19, 2008 at 1:38 AM, Mike Krebs
<[1]mkrebs@xxxxxxxxxxxxxxxxxx> wrote:
Ram,
I am not a knowledgeable web services guy so I might be half
cocked, but I
don't think you are getting what you think.
The attachment you sent is the wsdl which describes the web service
(how to
use it). When you call ZCalc7425 with correct parameters (ZCalc7425
message), it appears you will get ZCalc7425Response back with the
answer.
ZCalc7425Response shows the element name to be
"Conversionrateresult". I
think that is where you will find the answer to the parameters you
sent. If
I read it correctly, the response should look something like this:
<soapenv:Envelope
xmlns:soapenv="[2]http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<soapenv:Header/>
<soapenv:Body>
<urn:ZCalc7425Response>
<Conversionrateresult>?</Conversionrateresult>
</urn:ZCalc7425Response>
</soapenv:Body>
</soapenv:Envelope>
In the conversionrateresult element, the ? will be replaced with a
value.
Since using web services is different question from is HTTPAPI
working or
how to use HTTPAPI, the question for this group is best served if
you send
your RPGLE code and the IFS file /tmp/httpapi_debug.txt. From these
we might
be able to point you in the right direction.
Mike Krebs
-----Original Message-----
From: [3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of ramesh
dadi
Sent: Thursday, December 18, 2008 8:25 AM
To: [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: httpapi problem
Dear Scott ,
I am very happy to see u helping the guys working for
Iseries. I
am learning calling web services from RPG. For which i downloaded
httpapi
tool. I am calling calculator web service in sap xi server. I am
posting
soap message to sap xi and getting the response as wsdl document.I am
unable
to find out how to get the result from the response.All i can see is
the
wsdl document . I am attaching the document which i am getting as a
response
Regards,
Ram
-------------------------------------------------------------------
----
This is the FTPAPI mailing list. To unsubscribe, please go to:
[6]http://www.scottklement.com/mailman/listinfo/ftpapi
-------------------------------------------------------------------
----
References
1. mailto:mkrebs@xxxxxxxxxxxxxxxxxx
2. http://schemas.xmlsoap.org/soap/envelope/
3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
6. http://www.scottklement.com/mailman/listinfo/ftpapi
SOAP =
'<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
+'<SOAP:Envelope>'
+'<SOAP:Body>'
+' <ConversionRate>'
+' <FromCurrency>10</FromCurrency>'
+' <ToCurrency>20</ToCurrency>'
+' </ConversionRate>'
+'</SOAP:Body>'
+'</SOAP:Envelope>';
http_debug(*ON);
rc = http_url_post_xml(
'<url>'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: %addr(rate)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
: 'http://www.nw04s:51000');
if (rc <> 1);
http_crash();
else;
Result = rate;
endif;
*inlr = *on;
/end-free
Incoming B
Incoming PI
rate 8F
depth 10I 0 value
name 1024A varying const
path 24576A varying const
value 65535A varying const
attrs * dim(32767)
const options(*varsize)
atof PR 8F extproc('atof')
string * value options(*string)
/free
if (name = 'ZCalc7425Response');
rate = atof(value);
endif;
/end-free
P E
HTTPAPI Ver 1.22 released 2008-03-25
OS/400 Ver V5R4M0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: *******.COM
DNS server found: *************
DNS server found: *************
DNS server found: ************
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /wsdl/ZCALCULATOR.wsdl HTTP/1.1
Host: nw04s:51000
User-Agent: http-api/1.23
Content-Type: text/xml
SOAPAction: http://www.nw04s:51000
Expect: 100-continue
Content-Length: 220
recvresp(): entered
HTTP/1.1 100 Continue
SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?><SOAP:Envelope><SOAP:Body> <ConversionRate> <FromCurrency>10</FromCCurrency> <ToCurrency>20</ToCurrency> </ConversionRate></SOAP:Body></SOAP:Envelope>
recvresp(): entered
HTTP/1.1 200 OK
Server: SAP J2EE Engine/7.00
Content-Type: content/unknown
Last-Modified: Thu, 18 Dec 2008 04:37:59 GMT
Last-Modified: Thu, 18 Dec 2008 04:37:59 GMT
Cache-Control: max-age=86400
Content-Length: 2051
Date: Fri, 19 Dec 2008 08:11:08 GMT
SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 2051
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:htttp="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:sap-com:document:sap:sooap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><xsd::schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" targetNamespace="u:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" targetNamespace="uurn:sap-com:document:sap:soap:functions:mc-style" elementFormDefault="unqualified" attributeFormDefault="qualified"><xsd:element namme="ZCalc7425"><xsd:complexType><xsd:sequence><xsd:element name="Param1" type="xsd:int"/><xsd:element name="Param2" type="xsd:int"/>></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="ZCalc7425Response"><xsd:complexType><xsd:sequence><xsd:element naame="ZCalc7425"><wsdl:part name="parameters" element="tns:ZCalc7425"/></wsdl:message><wsdl:message name="ZCalc7425Response"><wsdl:paart name="parameters" element="tns:ZCalc7425Response"/></wsdl:message><wsdl:portType name="Zcalculator"><wsdl:operation name="ZCalc77425"><wsdl:input message="tns:ZCalc7425"/><wsdl:output message="tns:ZCalc7425Response"/></wsdl:operation></wsdl:portType><wsdl:bindding name="ZcalculatorSoapBinding" type="tns:Zcalculator"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap//http"/><wsdl:operation name="ZCalc7425"><soap:operation soapAction=""/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:outtput><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="ZcalculatorService"><wsdl:port namee="ZcalculatorSoapBinding" binding="tns:ZcalculatorSoapBinding"><soap:address location="http://eccserver.*******.com:8001/sap/bc/srrt/rfc/sap/ZCALCULATOR?sap-client=800"/></wsdl:port></wsdl:service></wsdl:definitions>
tp_close(): entered
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------