[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Need some examples to start



I got a lots of advice, thanks for everybody. 

I did try to clone the exchange rate program and apply to my application. The compilation was OK, but when I executed the program, I got a HTTP 500 Internal service error. Attached is the debug log. The web service is running within our internal network. Can I any suggestion to trouble shoot the problem.

Thanks again.




Henry Kwong | Lead System Analyst
Mattel Global IT - Managed Services 
Mattel, Inc. | 333 Continental Blvd. | El Segundo, CA 90245 
* 310-252-3205 | *  Henry.Kwong@xxxxxxxxxx

 


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Tuesday, May 03, 2011 11:08 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Need some examples to start

Henry,

Scott's examples are the best you're going to find.  Giving you more source isn't going to help.

I suggest you take a look at some of Scott's articles on using HTTPAPI.
http://systeminetwork.com/article/rpg-consuming-web-services-httpapi-and-soapui
http://systeminetwork.com/article/report-weather-your-sign-screen
http://systeminetwork.com/article/look-bank-routing-number-rpg
http://systeminetwork.com/article/rpg-can-consume-web-services
http://systeminetwork.com/article/rpg-web-service-consumer
http://systeminetwork.com/article/rpg-web-service-consumer-part-2

Lastly, you may want to look into a companion tool for HTTPAPI called WSDL2RPG.  With it, you don't need to understand XML or web services...
http://systeminetwork.com/article/call-web-service-wdsl2rpg

HTH,
Charles


On Tue, May 3, 2011 at 1:35 PM, Kwong, Henry <Henry.Kwong@xxxxxxxxxx> wrote:
> I have gone thru the examples. I want to find the one which is close to my application. My application is to pass a input XML string  and getting one output in XML format.
>
> Appreciate If anyone can let me know or share the source code.
>
> On May 2, 2011, at 8:55 PM, "Ron" <ron@xxxxxxxxxxxx> wrote:
>
>>
>> Check out example programs EXAMPLE1-EXAMPLE20. It's a good place to start.
>> Keep in mind HTTPAPI is NOT an XML web services utility. It's a HTTP 
>> communications data exchange tool that lets you write programs that 
>> use web services. You'll need to learn a lot about web services (ie: 
>> HTTP headers, SOAP, XML) outside the constructs of HTTPAPI.
>>
>>
>> -----Original Message-----
>> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Kwong, 
>> Henry
>> Sent: Monday, May 02, 2011 7:27 PM
>> To: HTTPAPI and FTPAPI Projects
>> Subject: Need some examples to start
>>
>> Hi, I am very new of using iseries to consume a web service. I have 
>> been looking through some of the examples from the HTTPAPI downloads, 
>> but still not fully understand.
>>
>> Can anyone have a simple example with the source code, I just want to 
>> see how the coding look like if we are going to consume a web service 
>> with an input parameter and output result set in xml format.
>>
>> Thanks in advance for your help.
>>
>>
>> Henry Kwong | Lead System Analyst
>> Mattel Global IT - Managed Services
>> Mattel, Inc. | 333 Continental Blvd. | El Segundo, CA 90245
>> * 310-252-3205 | *  Henry.Kwong@xxxxxxxxxx
>>
>>
>>
>> ---------------------------------------------------------------------
>> -- This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> http://www.scottklement.com/mailman/listinfo/ftpapi
>> ---------------------------------------------------------------------
>> --
>>
>> ---------------------------------------------------------------------
>> -- This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> http://www.scottklement.com/mailman/listinfo/ftpapi
>> ---------------------------------------------------------------------
>> --
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
HTTPAPI Ver 1.23 released 2008-04-24
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: CORP.MATTEL.COM
DNS server found: 156.20.57.150
DNS server found: 156.20.57.14
DNS server found: 156.20.200.61
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST http://mattelpdmd:8095/axis2/services/PDMApplicationService HTTP/1.1
Host: mattelpdmd:8095
User-Agent: http-api/1.23
Content-Type: text/xml
SOAPAction:  
Expect: 100-continue
Content-Length: 195
Proxy-Authorization: Basic a3dvbmdoZW46a3dvbmcxYXBy


recvresp(): entered
SetError() #43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
processService?PDMServiceInput=<?xml version="1.0"?><PDMServiceInput><RequestID>PartNumberCheck001</RequestID><CatalogYear>2011</CatalogYear><PartNumber>01806-9993 </PartNumber></PDMServiceInput>
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Via: 1.1 NAPRX01A
Connection: close
Proxy-Connection: close
Date: Tue, 03 May 2011 23:36:15 GMT
Content-Type: text/xml;charset=UTF-8
Server: Apache-Coyote/1.1


SetError() #13: HTTP/1.1 500 Internal Server Error
recvdoc parms: identity 0
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode></faultcode><faultstring>com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'p' (code 112) in prolog; expected '&lt;'
 at [row,col {unknown-source}]: [1,1]</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------