Trying to create a Webservice for SAP Client
I somewhat new to webservices (ie creating them) not consuming them... We need to create a webservice for an SAP intergrtaion that will send us an XML file and we will return an a packet of information that will tell them if it is success and provide a url to open a new window or some error code on why it failed. I created a CFC and was able to test our wdsl using soapUI but I am being told that the defensions that CF is creating in the WSDL are not valid and SAP can not consume the service. Also I am trying to understand how I return an xml package back in the soap return not just a single value. Any help on this would be great and if there are any good resourse on how to do this with SAP out there that would also be helpful. Thanks in advance. Matt ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338756 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Trying to create a Webservice for SAP Client [spamtrap bayes][spamtrap heur]
Matt, I tried to use the Web Services capability within Coldfusion for integrating into QuickBooks, and ended up with a work around. Here is some sample code that hopefully can help you: cfif isXmlDoc(xmlin) cftry cfset writeoutfile = 0 cfset filetime = #DateFormat(now(), MMDD)#-#TimeFormat(now(), HHmmss)# cfset wsmethod = xmlin.Envelope.Body.XmlChildren[1].XmlName cfswitch expression=#listlast(wsmethod, ':')# cfcase value = serverVersion !--- serverVersion method --- cfset xmlOut = '?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 serverVersionResponse xmlns=http://developer.intuit.com/; serverVersionResult xsi:type=xsd:stringV1/serverVersionResult /serverVersionResponse /soap:Body /soap:Envelope' /cfcase cfcase value = clientVersion !--- clientVersion method --- cfset strVersion = xmlin.Envelope.Body.clientVersion.strVersion.XmlText cfset xmlOut = '?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 clientVersionResponse xmlns=http://developer.intuit.com/; clientVersionResult xsi:type=xsd:stringO:2.0.0.139/clientVersionResult /clientVersionResponse /soap:Body /soap:Envelope' /cfcase This was built off of work by http://www.cf-ezcart.com/qwc-starter-kit.cfm. So thanks to them for helping me. Andy Quoting Matthew Friedman m...@hozgroup.com: I somewhat new to webservices (ie creating them) not consuming them... We need to create a webservice for an SAP intergrtaion that will send us an XML file and we will return an a packet of information that will tell them if it is success and provide a url to open a new window or some error code on why it failed. I created a CFC and was able to test our wdsl using soapUI but I am being told that the defensions that CF is creating in the WSDL are not valid and SAP can not consume the service. Also I am trying to understand how I return an xml package back in the soap return not just a single value. Any help on this would be great and if there are any good resourse on how to do this with SAP out there that would also be helpful. Thanks in advance. Matt ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338774 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Trying to create a Webservice for SAP Client [spamtrap bayes][spamtrap heur]
Matt, I tried to use the Web Services capability within Coldfusion for integrating into QuickBooks, and ended up with a work around. Here is some sample code that hopefully can help you: cfif isXmlDoc(xmlin) cftry cfset writeoutfile = 0 cfset filetime = #DateFormat(now(), MMDD)#-#TimeFormat(now(), HHmmss)# cfset wsmethod = xmlin.Envelope.Body.XmlChildren[1].XmlName cfswitch expression=#listlast(wsmethod, ':')# cfcase value = serverVersion !--- serverVersion method --- cfset xmlOut = '?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 serverVersionResponse xmlns=http://developer.intuit.com/; serverVersionResult xsi:type=xsd:stringV1/serverVersionResult /serverVersionResponse /soap:Body /soap:Envelope' /cfcase cfcase value = clientVersion !--- clientVersion method --- cfset strVersion = xmlin.Envelope.Body.clientVersion.strVersion.XmlText cfset xmlOut = '?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 clientVersionResponse xmlns=http://developer.intuit.com/; clientVersionResult xsi:type=xsd:stringO:2.0.0.139/clientVersionResult /clientVersionResponse /soap:Body /soap:Envelope' /cfcase This was built off of work by http://www.cf-ezcart.com/qwc-starter-kit.cfm. So thanks to them for helping me. Andy Quoting Matthew Friedman m...@hozgroup.com: I somewhat new to webservices (ie creating them) not consuming them... We need to create a webservice for an SAP intergrtaion that will send us an XML file and we will return an a packet of information that will tell them if it is success and provide a url to open a new window or some error code on why it failed. I created a CFC and was able to test our wdsl using soapUI but I am being told that the defensions that CF is creating in the WSDL are not valid and SAP can not consume the service. Also I am trying to understand how I return an xml package back in the soap return not just a single value. Any help on this would be great and if there are any good resourse on how to do this with SAP out there that would also be helpful. Thanks in advance. Matt ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338775 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm