[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New to http questions
Hi, all. As a newbie, I am having a bit of a problem trying to call a web service to post some data. I'm trying to send internal data from an rpg pgm to a web service. I have been sent a wsdl describing the call.
I took example 18 and then tried to substitute info from the wsdl into the soap build. Not knowing what I am supposed to substitute, other than the obvious, I'm frustrated.
I got the pgm to compile, but running it produced a 404 error. I know what that means, but I think there are other problems.
Would someone look at see if there is anything obvious? I am going to show the wsdl and then my mods. Please pardon the length, as it is a bit long.
----WSDL--------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://services.prealert.hwy.pgl" xmlns:impl="http://services.prealert.hwy.pgl" xmlns:intf="http://services.prealert.hwy.pgl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="http://services.prealert.hwy.pgl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://services.prealert.hwy.pgl" xmlns:intf="http://services.prealert.hwy.pgl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<element name="processLoadResponse">
<complexType>
<sequence>
<element name="processLoadReturn" nillable="true" type="impl:ArrayOfXSDAnyType"/>
</sequence>
</complexType>
</element>
<element name="processLoad">
<complexType>
<sequence>
<element name="loadInfo" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<complexType name="ArrayOfXSDAnyType">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="anyType" nillable="true" type="xsd:anyType"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="processLoadRequest">
<wsdl:part element="impl:processLoad" name="parameters"/>
</wsdl:message>
<wsdl:message name="processLoadResponse">
<wsdl:part element="impl:processLoadResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="PreAlertServices">
<wsdl:operation name="processLoad">
<wsdl:input message="impl:processLoadRequest" name="processLoadRequest"/>
<wsdl:output message="impl:processLoadResponse" name="processLoadResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PreAlertServicesSoapBinding" type="impl:PreAlertServices">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="processLoad">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="processLoadRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="processLoadResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PreAlertServicesService">
<wsdl:port binding="impl:PreAlertServicesSoapBinding" name="PreAlertServices">
<wsdlsoap:address location="http://172.30.30.20/PreAlertWebServices/services/PreAlertServices"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
------------------------------
--- My mods------
d ALERT_DFS PR ExtPgm('ALERT_DFS')
d AlertData 256a const
d ALERT_DFS PI
d AlertData 256a const
~~~
~~~
SOAP =
'<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
+'<SOAP:Envelope'
+' xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"'
+' xmlns:tns="http://172.30.30.20/PreAlertWebServices'
+ '/services/PreAlertServices">'
+'<SOAP:Body>'
+' <tns:PreAlertServices>'
+' <tns:processLoad>'+ %trim(AlertData) + '</tns:processLoad>'
+' </tns:PreAlertServices>'
+'</SOAP:Body>'
+'</SOAP:Envelope>';
http_debug(*ON);
rc = http_url_post_xml(
'http://172.30.30.20/PreAlertWebServices/services/PreAlertServices'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: %addr(status)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
: 'http://172.30.30.20/PreAlertWebServices/services' +
'/PreAlertServices' + ')');
--------------------
I'm not sure just what the "tns" in in the soap body refers to. That is not in the wsdl
Thanks for any help ... I'm really in the dark here.
W.powell
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------