27 Replies Latest reply on Dec 1, 2014 4:58 AM by BKBK

    Web Service Reply

    hertelt
      I am calling a web service with cfinvoke and I am trying to display the raw XML reply. If I just do a dump I only get the following output: org.tempuri.UserInfoListResult@b30ca4f5

      I know I am getting a correct response because I can use the following code to get the data.

      What I want is the RAW XML!
        • 1. Re: Web Service Reply
          dallaswebb
          if the web service returns an XML 'string' then you have have to cast that string as XML. If you veiw source you'll probably see xml, but the page will only render values. so,

          <cfset tempXML = XmlParse(users)>

          <cfdump var=#tempXML#>
          • 2. Re: Web Service Reply
            hertelt Level 1
            Thanks. Now it is telling me that content is not allowed in the prolog. I think it is sending back malformed XML...
            • 3. Re: Web Service Reply
              MorganWood

              I am having this same problem. I can only seem to get the Java Stub, but no returned (XML) information. Any ideas?

              • 4. Re: Web Service Reply
                ilssac Level 5

                Code?

                 

                Either you got an XML string that needed to be parsed into an XML object, thus you should be able to output the string.

                 

                OR

                 

                You are getting an XML string thet needs to be cast into a string with the toString() function.

                • 5. Re: Web Service Reply
                  MorganWood Level 1

                   

                  #tostring(ret)# = com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult@364bd7

                   

                  #ret# =  

                  object of com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult

                  Class Name     com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult

                  Methods     

                  Method     Return Type

                  equals(java.lang.Object)     boolean

                  getDeserializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)     org.apache.axis.encoding.Deserializer

                  getSerializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)     org.apache.axis.encoding.Serializer

                  getTypeDesc()     org.apache.axis.description.TypeDesc

                  get_any()     org.apache.axis.message.MessageElement[]

                  hashCode()     int

                  set_any(org.apache.axis.message.MessageElement[])     void

                  • 6. Re: Web Service Reply
                    ilssac Level 5

                    SO are we dealing with XML data?  A web-service may or my not be XML and XML may or may not be a web service.

                     

                    If you are looking for the WSDL, which is XML formated information, you would need to be using the WSDL url.

                     

                    Otherwise, I would expect you to be looking at the results of a web service method that is expected to return XML data.

                    • 7. Re: Web Service Reply
                      MorganWood Level 1

                      Let's try posting this again.

                       

                      Any help is appreciated. I've been banging my head for a couple days now. The client publishing this WebService says that the server is generating and returning XML, it just seems to be getting stuck in this Java Stub for some reason.

                       

                      <!------Code----->

                      <cfinvoke refreshWSDL="yes"  webservice="http://webservice?wsdl" method="Execute" returnvariable="ret">
                          <cfinvokeargument name="Header" value="#myHeader#"/>
                          <cfinvokeargument name="Data" value="#myData#"/>
                      </cfinvoke>

                       

                      <cfdump var="#tostring(ret)#">
                      <cfdump var="#ret#">

                      <!------Code----->

                       

                      tostring(ret) returns the Java Class/Stub name: com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult@364bd7

                      ret returns

                      object of com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult
                      Class Namecom.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult
                      Methods
                      Method Return Type
                      equals(java.lang.Object)boolean
                      getDeserializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Deserializer
                      getSerializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Serializer
                      getTypeDesc()org.apache.axis.description.TypeDesc
                      get_any()org.apache.axis.message.MessageElement[]
                      hashCode()int
                      set_any(org.apache.axis.message.MessageElement[])void

                      • 8. Re: Web Service Reply
                        ilssac Level 5

                        Have you tried what happens if you use some of those methods shown in your dump?

                         

                        <cfdump var="#ret.getAny()#">

                        OR

                        <cfdump var="#ret.getTypeDesc()#>

                         

                        I still find web services to be quite confusing and it usually takes me quite a bit of trial and error to get them working as expected.

                        • 9. Re: Web Service Reply
                          MorganWood Level 1
                          array
                          1
                          object of org.apache.axis.message.MessageElement
                          Class Nameorg.apache.axis.message.MessageElement
                          Methods
                          Method Return Type
                          addAttribute(java.lang.String, java.lang.String, javax.xml.namespace.QName)void
                          addAttribute(javax.xml.soap.Name, java.lang.String)javax.xml.soap.SOAPElement
                          addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String)void
                          addAttribute(java.lang.String, java.lang.String, java.lang.String)void
                          addChild(org.apache.axis.message.MessageElement)void
                          addChildElement(java.lang.String)javax.xml.soap.SOAPElement
                          addChildElement(javax.xml.soap.SOAPElement)javax.xml.soap.SOAPElement
                          addChildElement(java.lang.String, java.lang.String, java.lang.String)javax.xml.soap.SOAPElement
                          addChildElement(javax.xml.soap.Name)javax.xml.soap.SOAPElement
                          addChildElement(java.lang.String, java.lang.String)javax.xml.soap.SOAPElement
                          addMapping(org.apache.axis.utils.Mapping)void
                          addNamespaceDeclaration(java.lang.String, java.lang.String)javax.xml.soap.SOAPElement
                          addTextNode(java.lang.String)javax.xml.soap.SOAPElement
                          cloneNode(boolean)org.w3c.dom.Node
                          detachAllChildren()void
                          equals(java.lang.Object)boolean
                          getAllAttributes()java.util.Iterator
                          getAsDOM()org.w3c.dom.Element
                          getAsDocument()org.w3c.dom.Document
                          getAsString()java.lang.String
                          getAttribute(java.lang.String)java.lang.String
                          getAttributeNS(java.lang.String, java.lang.String)java.lang.String
                          getAttributeNode(java.lang.String)org.w3c.dom.Attr
                          getAttributeNodeNS(java.lang.String, java.lang.String)org.w3c.dom.Attr
                          getAttributeValue(javax.xml.soap.Name)java.lang.String
                          getAttributeValue(java.lang.String)java.lang.String
                          getAttributesEx()org.xml.sax.Attributes
                          getChildElement(javax.xml.namespace.QName)org.apache.axis.message.MessageElement
                          getChildElements()java.util.Iterator
                          getChildElements(javax.xml.namespace.QName)java.util.Iterator
                          getChildElements(javax.xml.soap.Name)java.util.Iterator
                          getChildren()java.util.List
                          getCompleteAttributes()org.xml.sax.Attributes
                          getDeserializationContext()org.apache.axis.encoding.DeserializationContext
                          getElementName()javax.xml.soap.Name
                          getElementsByTagName(java.lang.String)org.w3c.dom.NodeList
                          getElementsByTagNameNS(java.lang.String, java.lang.String)org.w3c.dom.NodeList
                          getEncodingStyle()java.lang.String
                          getEnvelope()org.apache.axis.message.SOAPEnvelope
                          getFixupDeserializer()org.apache.axis.encoding.Deserializer
                          getHref()java.lang.String
                          getID()java.lang.String
                          getLength()int
                          getName()java.lang.String
                          getNamespacePrefixes()java.util.Iterator
                          getNamespaceURI(java.lang.String)java.lang.String
                          getObjectValue(java.lang.Class)java.lang.Object
                          getObjectValue()java.lang.Object
                          getOwnerDocument()org.w3c.dom.Document
                          getPrefix(java.lang.String)java.lang.String
                          getQName()javax.xml.namespace.QName
                          getRealElement()org.apache.axis.message.MessageElement
                          getRecorder()org.apache.axis.message.SAX2EventRecorder
                          getTagName()java.lang.String
                          getType()javax.xml.namespace.QName
                          getValue()java.lang.String
                          getValueAsType(javax.xml.namespace.QName)java.lang.Object
                          getValueAsType(javax.xml.namespace.QName, java.lang.Class)java.lang.Object
                          getVisibleNamespacePrefixes()java.util.Iterator
                          hasAttribute(java.lang.String)boolean
                          hasAttributeNS(java.lang.String, java.lang.String)boolean
                          isRoot()boolean
                          item(int)org.w3c.dom.Node
                          output(org.apache.axis.encoding.SerializationContext)void
                          publishContents(org.xml.sax.ContentHandler)void
                          publishToHandler(org.xml.sax.ContentHandler)void
                          removeAttribute(javax.xml.soap.Name)boolean
                          removeAttribute(java.lang.String)void
                          removeAttributeNS(java.lang.String, java.lang.String)void
                          removeAttributeNode(org.w3c.dom.Attr)org.w3c.dom.Attr
                          removeContents()void
                          removeNamespaceDeclaration(java.lang.String)boolean
                          setAllAttributes(org.xml.sax.Attributes)void
                          setAttribute(java.lang.String, java.lang.String)void
                          setAttribute(java.lang.String, java.lang.String, java.lang.String)void
                          setAttributeNS(java.lang.String, java.lang.String, java.lang.String)void
                          setAttributeNode(org.w3c.dom.Attr)org.w3c.dom.Attr
                          setAttributeNodeNS(org.w3c.dom.Attr)org.w3c.dom.Attr
                          setContentsIndex(int)void
                          setEncodingStyle(java.lang.String)void
                          setEndIndex(int)void
                          setEnvelope(org.apache.axis.message.SOAPEnvelope)void
                          setFixupDeserializer(org.apache.axis.encoding.Deserializer)void
                          setNSMappings(java.util.ArrayList)void
                          setName(java.lang.String)void
                          setNamespaceURI(java.lang.String)void
                          setObjectValue(java.lang.Object)void
                          setQName(javax.xml.namespace.QName)void
                          setRecorder(org.apache.axis.message.SAX2EventRecorder)void
                          setType(javax.xml.namespace.QName)void
                          setValue(java.lang.String)void
                          toString()java.lang.String
                          Fields
                          Field Value
                          short ATTRIBUTE_NODE2
                          short CDATA_SECTION_NODE4
                          short COMMENT_NODE8
                          short DOCUMENT_FRAGMENT_NODE11
                          short DOCUMENT_NODE9
                          short DOCUMENT_POSITION_CONTAINED_BY16
                          short DOCUMENT_POSITION_CONTAINS8
                          short DOCUMENT_POSITION_DISCONNECTED1
                          short DOCUMENT_POSITION_FOLLOWING4
                          short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC32
                          short DOCUMENT_POSITION_PRECEDING2
                          short DOCUMENT_TYPE_NODE10
                          short ELEMENT_NODE1
                          short ENTITY_NODE6
                          short ENTITY_REFERENCE_NODE5
                          short NOTATION_NODE12
                          short PROCESSING_INSTRUCTION_NODE7
                          short TEXT_NODE3
                          java.util.ArrayList namespacesjava.util.ArrayList
                          Parent Class

                           

                          object of org.apache.axis.description.TypeDesc
                          Class Nameorg.apache.axis.description.TypeDesc
                          Methods
                          Method Return Type
                          addFieldDesc(org.apache.axis.description.FieldDesc)void
                          getAnyContentDescriptor()org.apache.axis.utils.BeanPropertyDescriptor
                          getAnyDesc()org.apache.axis.utils.BeanPropertyDescriptor
                          getAttributeNameForField(java.lang.String)javax.xml.namespace.QName
                          getElementNameForField(java.lang.String)javax.xml.namespace.QName
                          getFieldByName(java.lang.String)org.apache.axis.description.FieldDesc
                          getFieldNameForAttribute(javax.xml.namespace.QName)java.lang.String
                          getFieldNameForElement(javax.xml.namespace.QName, boolean)java.lang.String
                          getFields()org.apache.axis.description.FieldDesc[]
                          getFields(boolean)org.apache.axis.description.FieldDesc[]
                          getPropertyDescriptorMap()java.util.Map
                          getPropertyDescriptors()org.apache.axis.utils.BeanPropertyDescriptor[]
                          getTypeDescForClass(java.lang.Class)org.apache.axis.description.TypeDesc
                          getXmlType()javax.xml.namespace.QName
                          hasAttributes()boolean
                          registerTypeDescForClass(java.lang.Class, org.apache.axis.description.TypeDesc)void
                          setFields(org.apache.axis.description.FieldDesc[])void
                          setXmlType(javax.xml.namespace.QName)void
                          Fields
                          Field Value
                          java.lang.Class[] noClassesjava.lang.Class[]
                          java.lang.Object[] noObjectsjava.lang.Object[]
                          • 10. Re: Web Service Reply
                            -==cfSearching==- Level 4

                            1. What is the signature in the WSDL? ie What type of object is returned?

                            2. Have you tried dumping the response with GetSoapResponse()?

                            • 11. Re: Web Service Reply
                              MorganWood Level 1

                              1. WSDL Signature? It appears to be a Java Class/Stub?

                              2. Yeah, it returns:

                               

                              struct
                              EVENTNAME[empty string]
                              EXCEPTION
                              struct
                              Messagecom.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult
                              StackTracejava.lang.ClassCastException: com.millinfo.webservices.SubmitInspection.ExecuteResponseExecuteResult      at coldfusion.runtime.Cast._cast(Cast.java:243)      at cfws2ecfm1654921867.runPage(C:\Inetpub\wwwroot\cfc\test\ws\ws.cfm:15)      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)      at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:342)      at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)      at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)      at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)      at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)      at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)      at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)      at coldfusion.CfmServlet.service(CfmServlet.java:200)      at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)      at jrun.servlet.FilterChain.service(FilterChain.java:101)      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)      at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
                              TagContext
                              array
                              1
                              struct
                              COLUMN0
                              IDCF_CAST
                              LINE15
                              RAW_TRACEat cfws2ecfm1654921867.runPage(C:\Inetpub\wwwroot\cfc\test\ws\ws.cfm:15)
                              TEMPLATEC:\Inetpub\wwwroot\cfc\test\ws\ws.cfm
                              TYPECFML
                              Typejava.lang.ClassCastException

                               

                               

                               

                              • 12. Re: Web Service Reply
                                -==cfSearching==- Level 4

                                1. WSDL Signature? It appears to be a Java Class/Stub?

                                 

                                No, I mean what is the actual xml code from the WSDL that defines what objects are expected and returned from the method you are calling

                                 

                                2. Yeah, it returns:

                                 

                                Did you pass in an instance of the webservice and call the method after invoking it? Something like:

                                 

                                 

                                <cfdump var="#res#"

                                • 13. Re: Web Service Reply
                                  MorganWood Level 1

                                  1.

                                  CALL

                                  POST /SubmitInspection/Submitinspection.asmx HTTP/1.1
                                  Host: webservicestest.millinfo.com
                                  Content-Type: text/xml; charset=utf-8
                                  Content-Length: length
                                  SOAPAction: "http://webservice/Execute"

                                  <?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>
                                      <Execute xmlns="http://webservice/">
                                        <Header>string</Header>
                                        <Data>string</Data>
                                      </Execute>
                                    </soap:Body>
                                  </soap:Envelope>

                                  RESPONSE
                                  HTTP/1.1 200 OK
                                  Content-Type: text/xml; charset=utf-8
                                  Content-Length: length

                                  <?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>
                                      <ExecuteResponse xmlns="http://webservice/">
                                        <ExecuteResult>xml</ExecuteResult>
                                      </ExecuteResponse>
                                    </soap:Body>
                                  </soap:Envelope>

                                  2. I sure did. Here's my code:

                                  <cfinvoke refreshWSDL="yes"  webservice="http://webservice/Submitinspection.asmx?wsdl" method="Execute" returnvariable="ret">
                                       <cfinvokeargument name="Header" value="#myHeader#"/>
                                       <cfinvokeargument name="Data" value="#myData#"/>
                                  </cfinvoke>

                                  <cfdump var="#GetSoapResponse(ret)#">

                                  • 14. Re: Web Service Reply
                                    -==cfSearching==- Level 4

                                    It looks like the code snippet in my last response got cut off. Here is the full response:

                                     

                                    > 2. Yeah, it returns:

                                     

                                    Did you pass in an instance of the  webservice and call the method _after_ invoking it? Something like:

                                     

                                    <!--- create the webservice object  --->
                                    <cfset ws = createObject("webservice", "yourWebservice?wsdl")>
                                    <!---  call the method --->
                                    <cfset ret =  ws.yourMethodName(someParametersHere)>
                                    <!--- check the response using the webservice object  --->
                                    <cfset res = GetSoapResponse(ws)>
                                    <cfdump  var="#res#">

                                    • 15. Re: Web Service Reply
                                      MorganWood Level 1

                                      I ran the code you supplied and got the following returned:

                                       

                                      struct
                                      EVENTNAME[empty string]
                                      EXCEPTION
                                      struct
                                      DetailThere was an error while retrieving the SOAP envelope from the web service engine: ; nested exception is:       org.xml.sax.SAXParseException: Comment must start with "<!--".
                                      ErrNumber0
                                      MessageUnable get the SOAP envelope.
                                      StackTracecoldfusion.runtime.SOAPFunc$NoEnvelopeException: Unable get the SOAP envelope.      at coldfusion.runtime.SOAPFunc.getSOAPResponse(SOAPFunc.java:102)      at coldfusion.runtime.CFPage.GetSOAPResponse(CFPage.java:5624)      at cfws2ecfm1654921867.runPage(C:\Inetpub\wwwroot\cfc\test\ws\ws.cfm:17)      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)      at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:342)      at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)      at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)      at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)      at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)      at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)      at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)      at coldfusion.CfmServlet.service(CfmServlet.java:200)      at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)      at jrun.servlet.FilterChain.service(FilterChain.java:101)      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)      at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
                                      TagContext
                                      array
                                      1
                                      struct
                                      COLUMN0
                                      IDCF_CFPAGE
                                      LINE17
                                      RAW_TRACEat cfws2ecfm1654921867.runPage(C:\Inetpub\wwwroot\cfc\test\ws\ws.cfm:17)
                                      TEMPLATEC:\Inetpub\wwwroot\cfc\test\ws\ws.cfm
                                      TYPECFML
                                      TypeExpression
                                      errormsg; nested exception is:       org.xml.sax.SAXParseException: Comment must start with "<!--".

                                       

                                      • 16. Re: Web Service Reply
                                        -==cfSearching==- Level 4

                                        MorganWood wrote:

                                         

                                        1.

                                        CALL

                                        POST /SubmitInspection/Submitinspection.asmx HTTP/1.1
                                        Host: webservicestest.millinfo.com
                                        Content-Type: text/xml; charset=utf-8
                                        Content-Length: length
                                        SOAPAction: "http://webservice/Execute"

                                        Is that the request/response from a SOAP call or defintions from the actual wsdl file?

                                        • 17. Re: Web Service Reply
                                          MorganWood Level 1

                                          It's the definitions from the actual WSDL file.

                                          • 18. Re: Web Service Reply
                                            MorganWood Level 1

                                            It almost looks like getSOAPResponse won't work because the service is returning straight XML instead of SOAP...

                                            • 19. Re: Web Service Reply
                                              -==cfSearching==- Level 4

                                              Weird. I was under the impression the function works for any webservice response

                                              http://livedocs.adobe.com/coldfusion/8/htmldocs/webservices_27.html

                                               

                                              What happens if you try calling one of the methods on the ret.getAny() array? It looks like it contains xml nodes.

                                              • 20. Re: Web Service Reply
                                                MorganWood Level 1

                                                If I call <cfdump var="#ret.get_any().getLength()#"> I get:

                                                 

                                                Error Message: Either there are no methods with the specified method name and argument types or the getLength method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.

                                                • 21. Re: Web Service Reply
                                                  -==cfSearching==- Level 4

                                                  It looks like ret.get_any() returns an array. So it should behave the same as a CF array. Try grabbing the first element. Then testing the methods.

                                                   

                                                   

                                                  <cfdump var="#arr[1].someMethodName()#"

                                                  • 22. Re: Web Service Reply
                                                    MorganWood Level 1

                                                    Found it! It's at: #ret.get_any()[1].GetAsString())#.

                                                     

                                                    Thanks for the help!

                                                    • 23. Re: Web Service Reply
                                                      ilssac Level 5

                                                      Trial and error I tell you.

                                                       

                                                       

                                                      That is what I have allways have to go through to conume other web services like this.  Fetch, dump, experienment, fetch dump repeat over and over.

                                                       

                                                      Glad you got it figured out.

                                                      • 24. Re: Web Service Reply
                                                        -==cfSearching==- Level 4

                                                        Trial and error I tell you.

                                                         

                                                        Test. Dump. (Lather. Rinse. Repeat.)

                                                        • 25. Re: Web Service Reply
                                                          -==cfSearching==- Level 4

                                                          BTW, if the web service is returning a .net data  set (as in this recent thread)

                                                             http://forums.adobe.com/message/2466658#2466658

                                                           

                                                          ... as always, cflib.org has a function for that.

                                                             http://www.cflib.org/udf/convertDotNetDataset

                                                          • 26. Re: Web Service Reply
                                                            Niyaz Ahmad Imam Level 1

                                                            Dear All Technology Expert's,

                                                            I have a query related to Coldfusion SOAP services, that is most commonly asked in all the forum's but NONE of them has got answer.

                                                            If there is NO solution so I think Adobe has to come up with some patches so developer can able to do some customization.

                                                            I like to share with you all, in all other language ( PHP, JAVA, .NET etc) this option is available and you can customize the error.

                                                             

                                                             

                                                            Ok let me again explain the very basic error:

                                                             

                                                             

                                                            SOAP Request:

                                                             

                                                             

                                                            <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

                                                               <soapenv:Header/>

                                                               <soapenv:Body>

                                                                

                                                               </soapenv:Body>

                                                            </soapenv:Envelope>

                                                             

                                                             

                                                            SOAP Response:

                                                              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                                                               <soapenv:Body>

                                                                  <soapenv:Fault>

                                                                     <faultcode>soapenv:Server.userException</faultcode>

                                                                     <faultstring>java.lang.Exception: Body not found.</faultstring>

                                                                     <detail>

                                                                        <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.lang.Exception: Body not found.

                                                              at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)...</ns1:s tackTrace>

                                                                        <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">Coldfusion Error</ns2:hostname>

                                                                     </detail>

                                                                  </soapenv:Fault>

                                                               </soapenv:Body>

                                                            </soapenv:Envelope>

                                                             

                                                             

                                                            HOW we can customize the error, in all other languages you can simple customize the error like

                                                             

                                                             

                                                            Other languages SOAP response:

                                                              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                                                               <soapenv:Body>

                                                                  <soapenv:Fault>

                                                                     <faultcode>BODY_NOT_FOUND</faultcode>

                                                                     <faultstring>Body is missing in your request</faultstring>

                                                                    

                                                                  </soapenv:Fault>

                                                               </soapenv:Body>

                                                            </soapenv:Envelope>

                                                             

                                                             

                                                            But the same is NOT possible in Coldfusion, right?

                                                             

                                                             

                                                            AS you know it is vulnerability to display exception messages in the response.

                                                            We are developing this web service to access  from other language website (PHP, .NET).

                                                             

                                                             

                                                            We are also planning to upgrade server the Coldfusion 11, but do you think there is any solution with latest Coldfusion version.

                                                             

                                                             

                                                            Please response only if you know about these issue's or solution. 

                                                             

                                                             

                                                            Thanks

                                                            Niyaz

                                                            • 27. Re: Web Service Reply
                                                              BKBK Adobe Community Professional & MVP

                                                              @Niyaz

                                                              You will gain little by asking the same question in multiple places in the forum. In fact, many might consider it annoying or even spam.

                                                               

                                                              This question is being discussed in the thread that HaroonTyagi started. (Are you HaroonTyagi, by chance?) I will post an answer there shortly.