help with SOAP

Nancy Palmquist nlp at vss3.com
Thu Nov 16 07:03:14 PST 2006


Enrique Arredondo wrote:
> Hi,
> 
> I'm doing an ACH processing project within filepro with the help of curl 
> command, and now I'm stuck in the parsing of the responce I get from the 
> ACH center. Is there a built in parser in curl ? I tried using "deurl" 
> but no luck.
> 
> Here's what I do:
> 
> 1. I created the SOAP message in a filepro report:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
>    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns:xsd=
> schemas.xmlsoap.org/soap/envelope/" 
> xmlns:soapenc="http://schemas.xmlsoap.org/so
> p.org/soap/encoding/" xmlns:ns5="http://test.achex.com" 
> xmlns:ns6="java:com.ache
>    <soap:Body>
>    <ns5:createCheckAuthorization>
>     <credentials href="#id0" />
> 
> bla blablablabla.......
> 
> 2. After I get the file created with the fields populated , I run this 
> command:
> 
> curl --data @request_xml.txt --header 'Content-Type: text/xml' 
> http://blabla.bla.com/soap
> 
> NOTE: Once I have this working , I'll run everything internally from the 
> process line. like system noredraw "curl ......" and then read the output
> with "import ascii......."
> 
> 3. I get a responce that I have to parse to get the results, I tried 
> changing the </ for a CR+</  but I don't know how to use the tr to do 
> all that. Or is there a parser like "deurl" to work with some xml:sopa 
> like this :
> 
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xsi="h
> ttp://www.w3.org/2001/XMLSchema-instance" 
> xmlns:soapenc="http://schemas.xmlsoap.
> org/soap/encoding/" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Body env:e
> ncodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:createCheckAuthoriza 
> 
> tionResponse xmlns:m="http://achex.com"><result 
> xmlns:n1="java:com.achex.webserv
> ices" xsi:type="n1:AuthorizationResponse"><clearerID 
> xsi:type="xsd:string">12251
> </clearerID><details xsi:nil="true"></details><merchantID 
> xsi:type="xsd:string">
> 12251</merchantID><statusCode 
> xsi:type="xsd:string">210</statusCode><statusDispl
> ayDescription xsi:nil="true"></statusDisplayDescription><trackingID 
> xsi:type="xs
> d:string">12251-11140610230000</trackingID></result></m:createCheckAuthorization 
> 
> Response></env:Body></env:Envelope>
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 
Enrique,

Can you narrow your options to the part of the file you really need and 
just grab that out and work on that section?

I am guessing the <env:Body> stuff or just particular tags in that section.

I exchange XML with other customers and we have been asked to develop to 
this SOAP standard but quite honestly when we decided to work on a 
little simplier level all were very thankful.

As Mark posted, this is a very crazy structure and is intended, as far 
as I can determine, for public data exchanges.  Someone owns data, they 
post a document (WDSL) identifying how anyone can get that data.  The 
format is very formal because the two parties are not really known to 
each other.

I am thankful we did not have to work with the formal standard you are 
blessed with.

Good luck.

I have determined that to parse with filePro, the best method was to 
first remove all CR/LF/TAB characters from the file.  Then I could look 
from <tag> to </tag> to grab the sections containing each data set.  Of 
course, you now have attributes and all kinds of url's to weed out of 
that mess, but by breaking it down you have a better way to write 
routines for each kind of tag you receive.

Maybe that logic will apply to a curl parser as well.  My skills are 
with filePro so I always do my work there.

Nancy

-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com


More information about the Filepro-list mailing list