[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Anyone got any idea on why this comes up with a 400 BAd Request?
1) mine doesn't differ that is why this is driving me crazy. The name XML will work from .Net application and even a PICK application.
2) here is the debug file
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: PMSIONLINE.COM
DNS server found: 172.21.50.51
DNS server found: 172.21.50.52
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
do_post(): entered
POST /Enterprise/DataNotificationService.asmx HTTP/1.1
Host: ws20dev.pmsionline.com
Content-Type: text/xml
SOAPAction: http://pmsionline.com/enterprise/PublishBILL_REVIEW_STATUS
Expect: 100-continue
Content-Length: 1216
recvresp(): entered
HTTP/1.1 100 Continue
SetError() #13: HTTP/1.1 100 Continue
sendraw(): entered
sendraw(): entered
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.o
recvresp(): entered
HTTP/1.1 400 Bad Request
Date: Tue, 21 Dec 2010 18:48:19 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
SetError() #13: HTTP/1.1 400 Bad Request
recvdoc parms: identity 0
header_load_cookies() entered
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
SetError() #13: HTTP/1.1 400 Bad Request
http_close(): entered
3) The browser application only expects me to pass the part between the XmlAsString tags
4) I guess I could try the CDATA to see what happens. I believe all my tags are properly structured.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, December 21, 2010 1:01 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Anyone got any idea on why this comes up with a 400 BAd Request?
Hi Donald,
I'm sorry, there just isn't enough information here.
1) You haven't shown what you've coded. So while you've told us what
you are supposed to send, we don't know how yours differs.
2) You tell us in that you're getting a 400 error, but haven't provided
the HTTP protocol detail that causes it. Please post a debug file.
3) You say "I take the xml between the tags XmlAsString and run it
through the browser I get success." That's unclear. What is meant by
"run it through the browser"? When you do this "running through" (which
I still don't understand) why do you take only part of the document?
4) You seem to have embedded one XML document as the payload of another
XML document. Perhaps you forgot to use CDATA? or escape the tags?
On 12/21/2010 10:08 AM, Zimmerman, Donald W. wrote:
>
> Here is the specifications of the web service call
>
> POST /Enterprise/DataNotificationService.asmx HTTP/1.1
> Host: ws20dev.pmsionline.com
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
> SOAPAction:
> "http://pmsionline.com/enterprise/PublishBILL_REVIEW_STATUS"
>
> <?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>
> <PublishBILL_REVIEW_STATUS
> xmlns="http://pmsionline.com/enterprise/">
> <XmlAsString>string</XmlAsString>
> </PublishBILL_REVIEW_STATUS>
> </soap:Body>
> </soap:Envelope>
>
>
> Here is the XML I am generating
>
>
> <?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>
> <Publish/BILL_REVIEW_STATUS
> xmlns="http://pmsionline.com/enterprise/">
>
> <XmlAsString> <?xml version="1.0" encoding="iso-8859-1"
> standalone="no"?> <BILL_REVIEW_STATUS.Insert.Request>
> <MessageHeader> <MessageVersion>1</MessageVersion>
> <MessageId>BILL_REVIEW_STATUS.Insert.Request20101221104916</MessageId>
> <MessageSource>2</MessageSource> <MessageDestinations>
> <MessageDestination>7</MessageDestination> </MessageDestinations>
> <MessageReference /> </MessageHeader> <MessageBody>
> <TransactionData>
> <SOURCETABLENAME>BILL_REVIEW_STATUS</SOURCETABLENAME> <BCN_NO />
> <PTBILL_NO>12345678901234567890</PTBILL_NO> <RX_NO>1234567</RX_NO>
> <STAGE>40</STAGE> <STAGE_TS>2010-12-21 10:49:16</STAGE_TS>
> <SOURCE_SYSTEM>4</SOURCE_SYSTEM><INVOICE_CONTROL>123456789</INVOICE_CO
> NTROL> <INVOICE_LINE>123</INVOICE_LINE> <USERID>DWZPGMR</USERID>
> </TransactionData> </MessageBody>
> </BILL_REVIEW_STATUS.Insert.Request> </XmlAsString>
> </Publish/BILL_REVIEW_STATUS> </soap:Body>
>
> </soap:Envelope>
>
>
> When I take the xml between the tags XmlAsString and run it through
> the browser I get success. But when I run the entire XML from the the
> AS/400 I get 400 BAD REQUEST.
>
>
> If I happen to remove the second xml version (inside XmlAsString) I
> get the web service to invoke but it then fails on an instance not
> created error. I am sure it has something to do with the second xml
> version but I am not sure why.
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
Notice: THIS DOCUMENT MAY CONTAIN CONFIDENTIAL OR PROPRIETARY INFORMATION, INCLUDING PATIENT HEALTH INFORMATION THAT IS PROTECTED UNDER HIPAA AND OTHER STATE AND FEDERAL CONFIDENTIALITY LAWS. PLEASE DELIVER IMMEDIATELY ONLY TO THE INTENDED RECIPIENT. IF THIS TRANSMISSION WAS RECEIVED IN ERROR, PLEASE CONTACT THE SENDER IMMEDIATELY AND DO NOT DISTRIBUTE THE INFORMATION TO ANY OTHER PERSON.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------