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

RE: Help with WebServices



Hi Scott,

I have attached the debug file for you.

As for the WSDL, I think what you're looking for is within the second attachment, webserviceattempt2.txt

Hope this information is OK, if you need anything else then please let me know.

Kind regards,
Connie  

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: 23 October 2015 07:01
To: HTTPAPI and FTPAPI Projects
Subject: Re: Help with WebServices

Connie,

I did see your messages on RPG400-L as well as this one, and unfortunately, I don't feel that I have enough information to help you.  
Every web service is different, and the error you are getting is not coming from HTTPAPI, it is coming from the web service server.  (The server sends the error to HTTPAPI, which in turn copies it back to you.)

Please create a debug/trace file so I can see some more detailed 
information, and post it here.   Also, since it sounds like you're using 
SOAP, please provide the WSDL (or a link to it) so we can see what is expected for this service.

To create the debug/trace, add a line like the following to the start of your program and recompile/run:

      callp http_debug(*on);

This will create a file named /tmp/httpapi_debug.txt.  Please attach that file to a reply to this message so I can see it.  (and the WSDL as well, or provide a link to the WSDL).

Thanks!



On 10/22/2015 7:26 AM, Connie Fuller wrote:
>     Good Afternoon,
>
>
>     I have posted this on the RGP/400 mailing lists on Midrange but a lot
>     of users have pointed me in this direction.
>
>
>     Basically I have created a webservice in RPG, and I am trying to do the
>     HTML_POST to send the request to the designated server.
>
>
>     It is not working - my knowledge of WebServices are very little and I'm
>     trying to use a source program we use for another type of webservice
>     but cannot get it to work.
>
>
>     As far as I'm aware the SOAP body is OK, it seems to dump on the HTML
>     Post:
>
>
>     rc = %len(soap);
>
>      rc = http_post_xml(
>
>                   url
>
>                 : %addr(SOAP) + 4
>
>                 : %len(SOAP)
>
>                 : *NULL
>
>                 : %paddr(endElem)
>
>                 : *null
>
>                 : 600
>
>                 : HTTP_USERAGENT
>
>                 : 'text/xml'
>
>                 : SOAPACTION);
>
>
>     I keep getting a response saying the `server did not recognise the
>     value of HTTP Header SOAPACTION'.
>
>
>     I am trying to get the HTTP_DEBUG to work and create a debug log for me
>     on the IFS but can't get that to produce the file.
>
>
>     Can anyone help me with this? I am a complete novice and want to
>     webservices and any help would be very much appreciated.
>
>
>     I am using the Scott Klements HTTP_API copysource.
>
>
>     Any help would be great.
>
>
>     Thanks,
>
>
>
>     Connie Fuller
>
>     Computer Programmer/Analyst
>
>     Williamson-Dickie Europe Ltd
>
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
HTTPAPI Ver 1.25beta2 released 2012-03-06
OS/400 Ver V6R1M0

http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: dickiesportal.com
DNS server found: 192.168.1.30
DNS server found: 192.168.118.241
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /WinTillCustomerService/CustomerManager.asmx HTTP/1.1
Host: 192.168.1.13
User-Agent: http-api/1.24
Content-Type: text/xml
SOAPAction: /AmendCreateCustomer
Content-Length: 1458


senddoc(): entered
POST /wintillcustomerservice/customermanager.asmx HTTP/1.1Host: 192.168.1.13Content-Type: text/xml; charset=utf-8Content-Length: 1435SOAPAction: "http://www.wintill.com/services/customers/AmendCreateCust omer"<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> <soap:Body> <AmendCreateCustomerRequest xmlns="http://www.wintill.com/services/customers";> <Customer xmlns="http://www.wintill.com/services/customers";><AccountRef></AccountRef><ContactDetails><Company><Name>A. David & CO Ltd</Name></Company><ContactAddresses><ContactAddress><Description></Description><Address><Line1>Hillside Farm</Line1><Line2>Bishop Sutton</Line2><Line3>Bristol</Line3><Line4></Line4><Line5></Line5><Postcode>BS39 5XR</Postcode></Address></ContactAddress></ContactAddresses><ContactEmailAddresses><ContactEmailAddress><Description></Description><EmailAddress><Address></Address></EmailAddress></ContactEmailAddress></ContactEmailAddresses><ContactTelephoneNumbers><ContactTelephoneNumber><Description></Description><TelephoneNo><Number>08444 120555</Number></TelephoneNo></ContactTelephoneNumber></ContactTelephoneNumbers></ContactDetails><CreditLimit></CreditLimit><AccountBalance></AccountBalance><DiscountID></DiscountID><PriceBandID>7</PriceBandID></Customer></AmendCreateCustomerRequest></soap:Body></soap:Envelope>
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Thu, 22 Oct 2015 13:00:51 GMT
Content-Length: 425


SetError() #13: HTTP/1.1 500 Internal Server Error
recvresp(): end with 500
recvdoc parms: identity 425
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server did not recognize the value of HTTP Header SOAPAction: /AmendCreateCustomer.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered
POST /wintillcustomerservice/customermanager.asmx HTTP/1.1
Host: 192.168.1.13
Content-Type: text/xml; charset=utf-8
Content-Length: 1435
SOAPAction: "http://www.wintill.com/services/customers/AmendCreateCustomer";
<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> 
<soap:Body> 
<AmendCreateCustomerRequest 
xmlns="http://www.wintill.com/services/customers";> 
<Customer xmlns="http://www.wintill.com/services/customers";>
<AccountRef></AccountRef>
<ContactDetails>
<Company>
<Name>A. David & CO Ltd</Name>
</Company>
<ContactAddresses><ContactAddress>
<Description></Description>
<Address>
<Line1>Hillside Farm</Line1>
<Line2>Bishop Sutton</Line2>
<Line3>Bristol</Line3>
<Line4></Line4>
<Line5></Line5>
<Postcode>BS39 5XR</Postcode>
</Address>
</ContactAddress>
</ContactAddresses>
<ContactEmailAddresses>
<ContactEmailAddress>
<Description></Description>
<EmailAddress>
<Address></Address>
</EmailAddress>
</ContactEmailAddress>
</ContactEmailAddresses>
<ContactTelephoneNumbers>
<ContactTelephoneNumber>
<Description></Description>
<TelephoneNo>
<Number>08444 120555</Number>
</TelephoneNo>
</ContactTelephoneNumber>
</ContactTelephoneNumbers>
</ContactDetails>
<CreditLimit></CreditLimit>
<AccountBalance></AccountBalance>
<DiscountID></DiscountID>
<PriceBandID>7</PriceBandID>
</Customer>
</AmendCreateCustomerRequest>
</soap:Body>
</soap:Envelope>'                                                              
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------